-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
When main module is a symlink, HLS fails to load it #4462
Comments
While the error message is bad and incorrect, cabal is the reason this fails: > cabal repl Main.hs
Error: [Cabal-7121]
Failed extracting script block: `{- cabal:` start marker not found Can you confirm this? |
@fendor yes, although a bare |
|
Yeah, but HLS uses There is a workaround, but it is not universally applicable. cradle:
cabal:
component: all and telling HLS to use multi component loading ala This setup implements an eager loading strategy where HLS loads all components in your project at once, which is likely the best user experience, as long as your RAM can take it. Don't forget to |
Cool beans, I opened haskell/cabal#10627. |
Your environment
Which OS do you use?
NixOS 24.05.6966.190c31a89e5e (Uakari)
Which version of GHC do you use and how did you install it?
The Glorious Glasgow Haskell Compilation System, version 9.6.5 from OS package
How is your project built (alternative: link to the project)?
cabal build
Which LSP client (editor/plugin) do you use?
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jan 01 1980 00:00:00)
+ coc.nvim
Which version of HLS do you use and how did you install it?
haskell-language-server-9.6.5 from OS package
Have you configured HLS in any way (especially: a
hie.yaml
file)?No
Steps to reproduce
cabal init
to create an executable packagemv Main.hs Real.hs
ln -s Real.hs Main.hs
Expected behaviour
HLS should load the module and provide hints.
Actual behaviour
I get a popup on line 1 with text:
The error message is incorrect, at the very least.
Debug information
The text was updated successfully, but these errors were encountered: