-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Ghc 9.0.1 support for ghcide #1649
Conversation
Nvm, the formatting is not applied for hiecompat |
965cef8
to
534221a
Compare
There are still a few test cases that fail on ghc-9.0.1 for me, most notably the benchmark tests. I don't really understand how they work. I'm also considering adding ghc-9.0.1 to the CI, but in that case, we would only want to test ghcide, since that is the only thing that is currently supported. |
@jneira This is ghcide and not just hiecompat, so it's probably still relevant. |
Does the CI machines have too little disk space?
|
Sure @pepeiborra could help us in that side
github job steps can be skipped adding conditions to |
Ignore local failures in benchmark tests - they can time out fairly easily. As long as they work in CI... |
@pepeiborra It seemed like they didn't time out, but rather didn't run at all. Every single benchmark test failed in less than 10 seconds with |
Run them with LSP_TEST_LOG_MESSAGES=1 LSP_TEST_LOG_STDERR=1 to find out what's going on |
The CI failure |
@pepeiborra Ah, I see, thanks. The problem was that the benchmark suite is trying to build |
You can change that in ghcide/bench/config.yaml |
The tests |
How do I make the github actions CI run again? Do I need to resolve the merge conflicts first? Currently only the Circle CI seems to run. |
A tiny step towards haskell#297
The lazy solution to making things compile
I tried to limit the use of CPP to the Compat module as much as possible by re-exporting the new functions under the old names, but there is still plenty of pragmas all over the code. I'm using ghc-api-compat so the imports doesn't need to be changed as much.
Yeah, you need resolve conflicts to trigger github actions. |
98144b0
to
0ad1de1
Compare
"This code is only concerned with extracting argument names, so I don't see how multiplicity would be relevant here" haskell#1649 (comment)
I may have accidentally created a bunch of "duplicate" jobs in the github CI by pushing many times in quick succession. We can probably cancel the older ones so the newest ones get in front of the queue more quickly. Circle CI does this automatically, but that doesn't seem to happen on github. |
I've cancelled them |
I think the build failed on ghc9 because I rebased to master on the PR for LSP. Let me update the reference |
Future work: (Could be included in this pr though)
The sad thing is that now we would have three copies of all those upstream patches, one for each method for building hls. Edit: Which reminds me that I forgot to update the commit hash in the stack.yaml file |
Oh, wait, why did stack successfully build it with the old commit hash for lsp, while cabal failed? It must be in a cache, so it didn't notice that the commit had disappeared. |
Oh, no! Test failures again. I thought I have fixed those, but maybe there's a regression after upgrading a package or something. |
Here are the four that are currently consistently failing on my local machine:
It might be something silly like a currently disabled plugin being required for the test. I'll look a bit more at it. |
Ok, more debugging: It looks like it's one of the upstream changes is what triggers these errors, since they also occur on ghc-8.10.4, even if I enable all plugins, when I run it with After testing some more: More specifically, it's with the newest version of |
A git bisect points me to this PR: haskell/lsp#326 This might also be an answer to the question posed in that PR:
|
Lsp changing the current directory was causing other problems and had to be removed. It's unfortunate that this is blocking the 9.0 upgrade, but it will need to be fixed on the hls plugins side. It should be a simple matter of making sure all relative paths to config files are made absolute using the workspace root |
Ah, I see. It's not really blocking the 9.0 upgrade, it's blocking the
I tried building |
That patch was causing test failures, but the issues should be fixed for real at some point, so that patch can be incluede
I opted for option 1 for now, but if someone knows how to fix the test failures or judges that those test failures are a smaller problem than those caused by lsp changing the current directory, we can change that. |
I've created issue #1895 for the problems related to haskell/lsp#326 and a draft PR #1894 for testing it. |
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.
Good to merge!
This builds on top of #1635
Significant progress on #297
It includes a bunch of upstream fixes via
source-repository-package
incabal.project
:It also sets
allow-newer: *
incabal.project
, since that was the fastest way to get things going and the process to figure out the exact bounds is tedious.I've added a whole bunch of compatibility functions to
Development.IDE.GHC.Compat
, many of which are probably useful for ghc9 compatibility outside ghcide as well. Maybe they should be extracted?Currently, some of theghcide
tests fail for ghc-9.0.1 and I haven't fully figured out why yet.