A "HLS acting up" experience #3478
simonmichael
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello friends! First post in github Discussions. Thanks as always for the gift of your care and hard work on HLS, VSC Haskell extension, and all the rest.
Last night "HLS was acting up" for me, and I'm just cc'ing this experience report from chat, as requested, in case any known issues or new issues seem appropriate. I'm not bad at wrestling with Haskell tools but I lost this time.. I have bolded each perceived problem (9 in this session).
sm: G'day all. VSC Haskell extension has just now become really keen on picking cabal instead of stack as cradle. Every time I restart it, dist-newstyle/ gets recreated at project root. What could be causing this ?
aha, maybe these stray processes:
no.. killing these made no difference
maerwald: Did you specify stack in hie.yaml?
sm: I have no hie.yaml, which has been working fine
I believe
recently I switched the default ghc to an older version, and forgot that I had done that. Since then I switched it back. I wonder if that has disturbed it.
shouldn't, as hls should be using the project's ghc
but hmm, yes.. after adding a minimal stack hie.yaml, it chooses stack again, but fails with
9.0 is the default ghc I had switched to with ghcup set. 9.4 is the project ghc hls should be using
maerwald: Project ghc?
How did you set that?
sm: by project ghc I mean the one implied by stack.yaml. Adding an explicit
stackYaml: "stack.yaml"
to hie.yaml has made it choose the right ghc again. But now a new error. Looks like I have to specify all the components in hie.yaml nowah yes:
finally, a fully specified hie.yaml made it work again
but it logged this weird line (note both 9.0 and 9.4 mentioned):
or is that fine ?
maerwald: Might not matter
If it's launching stack
sm: ha.. I should have tried this before: restarting VSC completely (not Haskell: Restart Haskell LSP Server or Developer: Reload Window) has made it work as before: no hie.yaml necessary, and it now logs
(no mention of ghc 9.0)
bloody thing >:|
thanks
maerwald: Interesting
sm: here's a higher level problem: I did a big refactor, but VSC Problems pane doesn't show errors until I visit the module in question. That's not normal, is it ? Hasn't HLS tried building everything ?
I was running ghcid or stack build to find the next broken module, but that was causing HLS to have fits (multiple new and interesting error messages reported)
so now I'm clicking on each .hs file in turn in the Explorer pane, like a cave man :)
also, HLS keeps moaning about packages being hidden. All this project-wide navigation seems to be stressing it
to fix those I have to Reload Window
I can't keep it working.. it keeps switching into "could not load... hidden package" mode, I think as I navigate between packages
I give up, haskell tools win this round
Beta Was this translation helpful? Give feedback.
All reactions