-
-
Notifications
You must be signed in to change notification settings - Fork 389
Simple Eval plugin #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple Eval plugin #191
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice concept
Is it possible to use the approach here to evaluate arbitrary (closed) expressions, outside of comments? This is also a solution to #94 |
That would probably require some user interface. This approach leverages code lenses to avoid the need for that. The evaluation primitives, on the other hand, could be reused. |
91f3523
to
fa84985
Compare
I don't know what to do in terms of documentation - how will hls users learn about this feature? |
@pepeiborra I think a new section with current features would be nice and welcome! We could move some stuff from Haskell IDE Engine or write a complete new section. For this feature, it would be enough to just add it to the README and other features are added in different PRs. Unfortunately, when trying out this feature I get this error:
|
I'm not the best person to enumerate the features in hls or to port the one in hie, seeing as I've never been a user of either. But I want to document the Eval plugin. Should I just add a new section listing just the Eval plugin?
I don't know how to explain that, given it works locally and in CI. Maybe your ghcide submodule is out of sync? EDIT: Let me add a less trivial test that exercises module dependencies |
Yeah, that would be fine! I would not want to force you to write the documentation for every feature
Git submodule is at
for installation I used Just for completeness full logs: Full logs
|
Thanks @fendor for trying out the plugin and finding a bug with module dependencies before merging it! It's fixed now (and tested for). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
I notice, it removes trailing newlines, e.g.
-- >>> unwords ["hello,", "world"]
-- "hello, world"
--
Is changed to:
-- >>> unwords ["hello,", "world"]
-- "hello, world"
Also, it removes comments you might have added:
-- >>> unwords ["hello,", "world"]
-- "hello, world" -- output
-- >>> unwords ["hello,", "world"]
-- "hello, world"
I suppose, the latter is fine and the former can be fixed in a follow up PR, imo.
Also, I noticed some weird behaviour in the test-case One more bug in I am still fine with current state, I think we can easily fix it in follow up PRs. |
I think I've managed to fix the second round of bugs 🐛 |
The 8.6.4 is failing with a weird stack error, but other than that this is ready to go. |
Need to clear the caches, but I always forget how to do it, cc @alanz |
On circleci? You have to change the environment variable and give Update is by adding with the same name. I have just set it to cc @fendor |
Turns out, this was my mistake and is fixed by #199 |
I'm seeing a hard crash on this branch, not 100% sure what the error is yet since the log doesn't seem to include it but will try to find it and post it here in a bit
|
This is surprising and unexpected - I wasted a lot of time debugging test failures in CI that worked fine locally
Depending on GhcSessionDeps means we do not need to reload all the module dependencies in the GHC session. On the other hand, with the GhcSession dependency we *do* have to reload them (from interface files, hopefully) Unfortunately, the ModSummary objects that GhcSessionDeps puts in the GHC session are not suitable for reuse since they clear out the timestamps to avoid internal bugs. This can probably be relaxed so that plugins like Eval can reuse them.
Closes #51