-
-
Notifications
You must be signed in to change notification settings - Fork 390
[partial function] Map.!: given key is not an element in the map #3002
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
Comments
Hmmm, I actually included |
I have this bug too, and I'm not using Wingman. It started after our latest upgrade to NixOS. An upgrade to GHC 9.2.3 was part of that. |
The problem with this is that it could conceivably come from a dependency too :( |
It's also possible that my hlinting was somehow insufficient and there are more lurking. |
You can compile HLS with profiling and use |
The profiling build in my config failed when I tried last time. I'll give it another try when I have more time. @PaulJohnson May I ask, are you using haskell.nix? |
@kokobd Its complicated. My employer uses their own Nix based on haskell.nix. The workaround in your original report works for us. |
1 similar comment
I can verify it's indeed the case. I forked ghc-check, and added a debug trace here:
Log:
We can see |
I tried all four combinations of two known configs that will affect this behavior:
Conclusion:
|
related issue: input-output-hk/haskell.nix#1527 |
Update: I fixed the problem of haskell.nix input-output-hk/haskell.nix#1536 |
It would still be good to fix |
Maybe we could let it behave as if |
Your environment
Which OS do you use: NixOS
Which LSP client (editor/plugin) do you use: VSCode Haskell
Describe your project (alternative: link to the project):
Use my fork, but comment out the following section in flake.nix, like this:
With the
modules
config, hls works. Without it, hls fails withMap.!: given key is not an element in the map
Steps to reproduce
nix build
to generate a hls executable atresult/bin/haskell-language-server
nix develop
result/bin/haskell-language-server
to see it failresult/bin/haskell-language-server
and use nix environment selector.Expected behaviour
HLS should work normally
Actual behaviour
Every file reports this error on the first line.
Include debug information
log
My thoughts on this
There might be something wrong on haskell.nix side, but HLS shouldn't panic on partial function in any case. So something has to be fixed in HLS too.
The text was updated successfully, but these errors were encountered: