-
-
Notifications
You must be signed in to change notification settings - Fork 388
WIP: GHC-9.0 support for hls-tactics-plugin #2202
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
It compiles and most tests succeed, but some fail. In particular, the ones where it should suggest `show` fails to find that as a possible solution and fails to find evidence for `Show a`.
My attempt at analysing the issue with
|
THANK YOU SO MUCH for this PR. I've been dreading digging through the API changes. I really really appreciate you having looked into this, @anka-213. As for the regression, I'm not sure. I found that stuff originally by |
The main method I've been using is iterating through:
But yes, this process is definitely tedious at times, so I can see why you've been dreading it. I'm glad that my help is appreciated. 😊 |
@anka-213 is GoldenShow the only test that's failing? |
@isovector There are three
other than that, there's a bunch of tests that fail with this:
which I am not sure if it's related to some flakiness from me running it locally or if it's an actual bug. |
|
I also get this,
|
And finally I get this, which seems very minor and not like an actual change in behaviour, just a change in hole numbering:
|
It seems like most of the tests that failed for me also tests on CI: https://github.com/haskell/haskell-language-server/runs/3638594399?check_suite_focus=true |
Looking through the test results again, it looks like all of these:
are caused by the same bug where wingman doesn't get evidence for the constraints in context.
Now it instead says
We also have
where wingman doesn't produce code actions at all And there's this:
and finally we have a few flakey tests that fails with timeout or succeeds randomly or depending on other factors. In particular, I believe these failures:
are caused by all the tests being run in the same process now and that number is stored in some global variable. If you run the tests 3 times with |
Previously when wingman fails to find a solution, the test failure would say "Timed out when waiting for a message". Now it instead prints the error message from wingman.
Perhaps we could mark these tests as broken on ghc9 for now and open new issues to fix them later? Partial support is better than no support at all. |
@anka-213 that sounds good to me |
#if !MIN_VERSION_ghc(9,0,0) | ||
Development.IDE.GHC.Compat.Core.mkVisFunTys, | ||
Development.IDE.GHC.Compat.Core.mkInfForAllTys, | ||
#endif |
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.
Did this cause any issues or something? I would prefer to have as few CPP statements as possible, as you lose very quickly the big picture about what happens in Core.hs
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.
Oh, I see. Yeah, that should be fairly easy to workaround. I was trying to avoid having redundant
foo = Module.foo
definitions and just reexporting the existing things. I think removing these pragmas would just cause a few "duplicate exports" warnings, so another option could be to just disable that warning in this file.
Edit: The primary reason why is that I wanted to re-export the whole module, which is what caused the "duplicate exports" warnings. Getting rid of duplicate definitions was just a bonus.
agree, not sure if we could get that ready for this month release |
Should I try completing the tasks quickly or is it better to take it slowly an aim for it to be included in next month's release instead? |
As you consider, of course. There is no special rush to have it, so the slow path sounds good. |
I'd like to get this up and running. Interested in a hand on it, @anka-213 ? |
Yes please! |
@anka-213, @isovector Is there any update? |
I'll have more time to look at this now than I've had the last few weeks. |
I started looking into this. The show tests are failing because Wingman is failing to pull |
My assumption is that theta evidence is stored somewhere different in the tcs_binds as of GHC 9. Here's a new minimal dump:
|
Looks like the evidence is now inside of the FunBind of the AbsBinds. |
I've got the theta issues worked out. Now the tests that are failing are:
None are failing due to bad output, but to crashing the server (or flakey tests). |
AutoThetaRankN fails because the code actions don't appear on the hole. Fixed if I eta expand the hole. MetaBegin/MetaBeginNoWildify fail with FmapJoin and FmapJoinInLet work, but are slow af and probably timing out the test. |
So the problem with BeginMeta is not exactprint --- it's correctly producing the program
but GHC is failing to parse this. Looks like I need to turn on TH syntax in the dflags? |
I think we can close this and focus in the new one, thanks @anka-213 |
It compiles and most tests succeed, but some fail. In particular, the ones where it should suggest
show
fails to find that as a possible solution and fails to find evidence forShow a
.