-
-
Notifications
You must be signed in to change notification settings - Fork 389
For haskell/test-framework
, HLS has mysterious errors showing up in VSCode
#4505
New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No 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? No Sign in to your account
Comments
Actually, this error is even appearing if the irrelevant directory It may be that the particular project structure is not handled correctly by HLS (or its underlying tools). I am seeing:
|
Am I right to assume, this only happens when running This issue is known, the HLS cli is not well-developed. HLS just traverses the current directory for all haskell files it can find (often including We could argue, HLS should honour any potential |
Originally, I noticed problems in VSCode, but I thought running the HLS cli would be the way to report bugs, or did I misunderstand this? |
Unfortunately, it depends on the kind of issue you are reporting :) Since the CLI and LSP mode are not always identical. Generally, both ways are fine and appreciated to report issues, it just so happens that I made some assumptions about this issue based on how it is reported. Which might be my mistake. |
In this case, I get the correct error that files are not belonging to the project. In my initial report, I thought that the original reason for the malfunctioning in VSCode was that HLS considered also directories outside the project. So the real issue is that if I open the I attach screenshots this time (to not divert the focus to the CLI version of HLS). However, these errors are also reported by the CLI. ![]() ![]() I suppose the problems are reproducible by cloning https://github.com/haskell/test-framework , opening the root in VSCode and randomly open files from its subprojects and subfolders (even excluding the |
haskell/test-framework
, HLS has mysterious errors showing up in VSCode
To reproduce:
This fails, while e.g.
cabal build all -w ghc-9.10.1
succeeds without error.The
cabal.project
here has:However, there is also a directory
./quickcheck
containing legacy code for the deprecated packagetest-framework-quickcheck
. This code is not functioning and should be ignored by a build process.The first error by HLS is:
HLS seems to leave the path to salvation here, by getting seduced to look into the broken package:
From there the road to hell is paved:
One wants to happily ignore this error, but it seems to derail HLS because we later see:
This then causes a real type error:
Maybe HLS should not poke its nose into packages not listed in
cabal.project
orstack.yaml
...The text was updated successfully, but these errors were encountered: