-
-
Notifications
You must be signed in to change notification settings - Fork 390
Make the eval plugin use the same default language extensions as ghci. #1596
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
Conversation
Many thanks!, a test case would be great to make visibly eval plugin is able to handle it and to avoid future changes breaks it |
@fmehta feel free to ask for help if you need some guidance to write the test |
@jneira : Thanks a lot for following up on my progress and pointing me in the right direction. And yes, of course I need to include a test for this change (what was I thinking 🙄). The reason for my delay: I was just wondering whether it even makes sense to enable this language extension at all. Maybe it makes sense to use exactly the same language extensions as ghc, since the generated comments will be part of the source code. Since there is no specification as to what the correct behaviour of the evals should be, I was wondering if you, or anyone else, could comment on what behaviour would be desirable. I also notice that I cannot enable this language extension within the eval plugin for some reason (I guess only those that are listed in https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md
I wonder whether they should not be the same? Do you (or anyone else) have any thoughts on all of this, or should I just move on and add the tests for this commit without getting too deep here? Thanks, FM |
I don't see anything wrong with enabilng The set of extensions that are enabled currently for the eval plugin seem arbitrary and should be removed. /cc @tittoassini |
I believe some of the extensions are used in the printing code (which is executed in Eval plugin session) of Eval plugin, so I guess it's not so trivial to remove.... |
@berberman removed that custom printing code recently |
Oh, I missed that, then probably we are good to go. |
@fmehta hi, do you still plan to continue working on this? thanks! |
Hi @jneira Could you please review and merge my changes in case they are OK. I will then create and work on a second followup issue for the rest of the default ghci extensions as mentioned in #1596 (comment). Followup issue: #1954 Thanks, |
Could you change the purpose of this PR, resolving #1954 together? |
Hi @berberman
#1954 needs some more work. In particular:
(In case you have any pointers, please let me know.) I therefore thought that I should start a new PR for the rest. But in case you think it is better to merge both together, I can do that as well. Just let me know. Thanks |
There is no negative type of extension, so If you want to disable one, you should unset it. As far as I can tell, And haskell-language-server/plugins/hls-eval-plugin/src/Ide/Plugin/Eval/CodeLens.hs Lines 304 to 306 in 0b3bb10
|
Dear @berberman Thanks for your input. I have added the fix for #1954 to this pull request as well. A third thing that I noticed and did not get my head around was that it seems that
I cannot find out where this is added. Do you have any idea? FM |
Reason: It was breaking GHC 8.6.2 tests.
Hi @berberman It should work now. Maybe one of you need to kickstart the CI. Best, |
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.
Looks great (love the comments in tests), many thanks
Thanks @jneira! |
@mergify rebase master |
Command
Hey, I reacted but my real name is @Mergifyio |
Co-authored-by: Potato Hatsue <berberman@yandex.com>
This pull request aims to fix #1591