-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
HLS fails to find modules with .hs-boot files in the root project directory #3794
Comments
Another funny thing is that when using the |
Hey, thanks for the triage, @fendor. Have you by any chance identified what specifically is at fault in GHCide? Perhaps it's something easy to fix that I could take a crack at. |
Hi! I did not find time to properly investigate this issue. I think the issue is located in https://github.com/haskell/haskell-language-server/blob/master/ghcide/src/Development/IDE/Import/FindImports.hs#L106. I don't think it is too tricky to fix it, but writing the test is the annoying thing. I am currently briefly looking into the issue and it seems like stuff starts working in the editor if you also open the modules |
Gotcha. Thanks! |
So, I did some digging, and it didn't seem like a simple thing to fix. Apparently, we only guess the location of This was mostly a brain dump on my end and not a suggestion for you to work on it. |
Thanks for the behind-the-scenes tech details nonetheless! |
If the issue is as you described @fendor I'm pretty sure I fixed it in #3462: haskell-language-server/ghcide/session-loader/Development/IDE/Session.hs Lines 770 to 772 in 7db6215
|
That seems reasonable, and I think I tested master, let me recheck, maybe I am missing something. |
The issue persists on current master, I will debug a little bit further. |
Hey,
This is a continuation of a discussion we had with @fendor on IRC in #haskell-language-server.
Long story short, HLS seems to fail to find two self-recursive modules with .hs-boot files if they happen to live in the project root and you have a minimal
hie.yaml
. That ishs-source-dirs: .
. This with GHC v9.2.8, HLS v2.2.0.0.Here's the gist/Gist reproducing this and the error message it results in: https://gist.github.com/moll/591c08e1c6fa75b237214c298e3a97e5. There's also what gen-hie generates and what
hie.yaml
looked like.I also confirmed that moving the X and Y modules to subdirectory (like
Lib
), while leavinghs-source-dirs: .
, works.Cheers
The text was updated successfully, but these errors were encountered: