Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Invalid import is not reported and it breaks the eval plugin #4487

Open
noughtmare opened this issue Feb 5, 2025 · 0 comments
Open

Invalid import is not reported and it breaks the eval plugin #4487

noughtmare opened this issue Feb 5, 2025 · 0 comments
Labels
component: ghcide component: hls-eval-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@noughtmare
Copy link
Contributor

noughtmare commented Feb 5, 2025

My environment

OS: MacOS
GHC 9.10.1 from ghcup
Project: https://github.com/noughtmare/tmp.oYnk68xwKl
LSP client: VS Codium+vscode-haskell
HLS: 2.9.0.1 from ghcup
No special configuration

Steps to reproduce

  1. open app/Main.hs
  2. wait until HLS finishes loading
  3. (optional) click the Evaluate... action

Expected behaviour

First of all, of course there is an obvious error in the project: the Foo module is not listed in the cabal file. This issue is about how HLS functions in spite of that error.

I expect an error on the line import Foo in app/Main.hs, because that module is not valid in the cabal package. Furthermore, clicking the Evaluate... action should either work without problems or it would also be acceptable if the action was not shown in the first place.

Actual behaviour

HLS reports no errors in app/Main.hs. Clicking the Evaluate... action results in a cryptic error:

eval: Internal Error: BadDependency "GhcSessionDeps"

Debug information

2025-02-05T09:27:43.927413Z | Error | eval: Internal Error: BadDependency "GhcSessionDeps"
[Error - 10:27:43] Request workspace/executeCommand failed.
  Message: eval: Internal Error: BadDependency "GhcSessionDeps"
  Code: -32603 
@noughtmare noughtmare added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Feb 5, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
component: ghcide component: hls-eval-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

2 participants