-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Eval Plugin cannot handle internal library imports #509
Comments
I think this an instance of https://github.com/haskell/ghcide#limitations-to-multi-component-support but we need to confirm this:
If there is no dependency then it is not an instance of the limitation linked above and might be an actual bug. NB: #485 was not a bug with |
I’m running into the same issue. Is there a workaround? |
Just fyi, the WIP does unfortunately not work at the moment. |
Oh, that is unfortunate, there is no usable previous commit? |
Well maybe, but you have to use the right cabal commit as well for it to work |
+1 $ haskell-language-server --version
haskell-language-server version: 1.7.0.0 (GHC: 9.0.2) (PATH: /nix/store/0mlwa968v3bw6g9qgb3ldih6d9bqxcli-haskell-language-server-1.7.0.0/bin/haskel Every time I try to evaluate a function from a comment I get the following "error" (taken from lsp-haskell::stderr; IPTypes module defined within internal library):
|
Subject of the issue
Similar to already fixed #485, Eval plugin cannot handle imports from local internal libraries.
In particular, the issue will occur when we have a package with three components:
As with #485, this issue should be a bug in ghcide's
GhcSessionDeps
, but I have no idea to testGhcSessionDeps
with this situation, since the HLS and ghcide works if we don't do any Eval invocation, so I decided to report this error here at first; sorry for the inconvenience.Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
Which lsp-client do you use: VSCode
Describe your project: repro repo here
Contents of
hie.yaml
: as contained above:N.B. You need to use cabal cradle, since the current stack doesn't support internal libraries.
Steps to reproduce
Open
internals/InternalLib.hs
Open
app/Main.hs
Click
Evaluate...
code lens.Expected behaviour
The line
-- "This is internal"
gets added right below the doctest comment.Actual behaviour
HLS silently fails with the following error dumped to OUTPUT region:
On the other hand, if we just open
app/Main.hs
ONLY and NOTinternals/InternalLib.hs
, then the Eval Plugin successfully prints the comment-- "This is internal"
.Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:Debug output:
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The text was updated successfully, but these errors were encountered: