Changes in src/ are not picked up by lsp when analyzing test/ in stack project. #2269
Labels
build tool: stack
type: bug
Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:haskell-language-server version: 1.4.0.0 (GHC: 8.10.4) (PATH: /home/martin/.ghcup/bin/haskell-language-server-wrapper-1.4.0) (GIT hash: 253547816ee216c53ee7dacc0ad3cac43e863d30) Tool versions found on the $PATH cabal: 3.4.1.0 stack: 2.7.3 ghc: 8.10.7
Which OS do you use: ArchLinux
Which lsp-client do you use: emacs (spacemacs)
Describe your project (alternative: link to the project): https://github.com/Martinsos/quad-ci/tree/8a9095f5f83224cf0e59d33d0a1cec3a1b519945 -> very simple Stack project with only one source and one test file.
Contents of
hie.yaml
: Doesn't existSteps to reproduce
Make some changes in
src/
dir, e.g. change some type insrc/Core.hs
.Then, go to
test/
dir and notice that no errors are reported by lsp, even if changes insrc/
should break the code intest/
.Try making the changes you know are needed -> you will get false errors by lsp, which is behaving as if code in
src/
never changed.Restarting
lsp
does not help.What does help is running
stack build
and then restartinglsp
, now it works correctly (takes into account the latest code in src/).Expected behaviour
When changes are made in
src/
, lsp should be aware of that when analyzing code intest/
. Right now it does not and I have to runstack build
and restartlsp
for it to pick up the changes.Actual behaviour
Explained above.
Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:Debug output:
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The text was updated successfully, but these errors were encountered: