-
Notifications
You must be signed in to change notification settings - Fork 1
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 multi-component bug in primer-service and primer-test #181
Comments
So does this mean we're doing something wrong at Haskell/Cabal level with our dependencies, or is this purely an HLS issue? |
I'm pretty certain this is purely an HLS issue. Although I wasn't sure when I started investigating. Given there's nothing we can actually do on our end, would you prefer this closed? It would still serve as a useful record. |
Nah, let's track the upstream issue. It turns out that GitHub recently added a feature that does it automatically, so long as you format it something like this: (Actually it seems the automatic tracking label on the upstream repo only works if you put the checkbox + link in the original post? |
That's pretty cool. I've edited the OP. |
Unfortunately, #625 has made us considerably more vulnerable to this. Fix is essentially the same - load a module from |
For the record, until this is fixed upstream, my fix is to load one file from each component in to VSCode:
I'm sure this can be adapted for other editors. |
(Just tracking this here in case anyone bumps in to it, and so that I've got a record of what the issue is for when I inevitably hit it again.)
If we load
primer/primer-service/exe-server/Main.hs
in to an editor running Haskell Language Server, we'll see a bizarre error inrunDB
:This is an instance of haskell/haskell-language-server#1370.
Workaround: load some module from
lib:primer-service
in to the editor. e.g.primer-service/src/Primer/Server.hs
(EDIT: and one fromprimer-selda
e.g.primer-selda/src/Primer/Database/Selda.hs
). This may take a few seconds for HLS to re-initialise with the new component, but it should resolve the error.The text was updated successfully, but these errors were encountered: