You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
component: cliAbout the pure command line interface of the hls executabletype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Clone the project and run haskell-language-server-wrapper
Expected behaviour
Loads the project.
Actual behaviour
Fails with multiple instances of something like
Maybe.fromJust: Nothing
CallStack (from HasCallStack):
error, called at libraries/base/Data/Maybe.hs:148:21 in base:Data.Maybe
fromJust, called at src/Development/IDE/Core/Rules.hs:842:51 in
ghcide-1.6.0.0-inplace:Development.IDE.Core.Rules
Yup, thanks. I didn't even try it in an editor when I saw the cli invocation doesn't work tbh.
I rely on the cli invocation to provide debug info and to also troubleshoot issues if something isn't working from inside my editor. What do I need to do to be able to use it?
I am also getting this error message independent of polysemy.
2022-02-15 10:58:09.561056426 [ThreadId 463] INFO hls: File: /home/dominik/Shared/haskell/circular/src/Data/Stack/Circular.hs
Hidden: no
Range: 1:1-2:1
Source: compiler
Severity: DsError
Message:
Maybe.fromJust: Nothing
CallStack (from HasCallStack):
error, called at libraries/base/Data/Maybe.hs:148:21 in base:Data.Maybe
fromJust, called at src/Development/IDE/Core/Rules.hs:842:51 in
ghcide-1.6.0.0-7wqffKHWPjBDdiU2g7XF1:Development.IDE.Core.Rules
Same here, no Polysemy either, although in my case I can no longer get it to work with any editor.
Edit:
Looks like my problem was caused by the static binaries downloaded by GHCUP (as explained here).
So I uninstalled HLS and ran ghcup compile hls -v 1.6.1.0 --ghc 8.10.7 to compile from source.
Now HLS works again from my text editor, the issues reported by OP remain, but at least it works.
component: cliAbout the pure command line interface of the hls executabletype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Activity
fendor commentedon Feb 1, 2022
I can reproduce it on the cli as described, but in VSCode everything seems to be fine 0.o.
googleson78 commentedon Feb 1, 2022
Has calling the cli perhaps gotten more complicated in some way? (some env needs to be provided etc)
jneira commentedon Feb 1, 2022
@googleson78 does it work for you in the editor?
googleson78 commentedon Feb 1, 2022
Yup, thanks. I didn't even try it in an editor when I saw the cli invocation doesn't work tbh.
I rely on the cli invocation to provide debug info and to also troubleshoot issues if something isn't working from inside my editor. What do I need to do to be able to use it?
fendor commentedon Feb 1, 2022
It should work, so there is at least one bug somewhere.
I can trigger the same error on the hie-bios code-base, but everything seems to load fine, so this is likely to be a bug in the cli loader.
[-]1.6.1.0 Doesn't work on polysemy[/-][+]1.6.1.0 cli execution doesn't work on polysemy[/+]solomon-b commentedon Feb 10, 2022
FYI I also am hitting this bug and am not using polysemy:
dschrempf commentedon Feb 15, 2022
I am also getting this error message independent of
polysemy.[-]1.6.1.0 cli execution doesn't work on polysemy[/-][+]1.6.1.0 cli execution doesn't work[/+]googleson78 commentedon Feb 15, 2022
I amended the title to represent the fact that this seems independent of polysemy.
kamek-pf commentedon Feb 17, 2022
Same here, no Polysemy either, although in my case I can no longer get it to work with any editor.
Edit:
Looks like my problem was caused by the static binaries downloaded by GHCUP (as explained here).
So I uninstalled HLS and ran
ghcup compile hls -v 1.6.1.0 --ghc 8.10.7to compile from source.Now HLS works again from my text editor, the issues reported by OP remain, but at least it works.
hasufell commentedon Feb 18, 2022
This bug happens only if you don't run in lsp mode.
The reason is here:
haskell-language-server/ghcide/src/Development/IDE/Core/Rules.hs
Line 842 in f4022c5
lspEnv/envisNothingfor non-lsp initializations:haskell-language-server/ghcide/src/Development/IDE/Main.hs
Line 355 in 96ea854
haskell-language-server/ghcide/src/Development/IDE/Main.hs
Line 409 in 96ea854
Fix is here: #2719
You can build and fix locally via ghcup: