Multiple Components HLS doesn't recompile on *.cabal change #4236
Labels
build tool: cabal
multi-component
Issues relating to multi-component support
status: needs info
Not actionable, because there's missing information
type: bug
Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Summary
When Multiple Component Support enabled, HLS won't update the state even when any
*.cabal
file update.Your environment
Which OS do you use? macOS
Which version of GHC do you use and how did you install it? GHC 9.4.8
How is your project built (alternative: link to the project)? Cabal 3.11.0.0 prerelease (installed by
ghcup --no-cache install cabal -u 'https://gitlab.haskell.org/haskell/cabal/-/jobs/1848320/artifacts/raw/out/cabal-install-3.11.0.0-x86_64-linux-alpine3_12.tar.xz' 3.12.0.0-prerelease
)Which LSP client (editor/plugin) do you use? VSCode
Which version of HLS do you use and how did you install it? HLS 2.8.0.0, installed via ghcup
Have you configured HLS in any way (especially: a
hie.yaml
file)? Nohie.yaml
Steps to reproduce
Install cabal 3.12.0.0 prerelease. For example:
ghcup --no-cache install cabal -u 'https://gitlab.haskell.org/haskell/cabal/-/jobs/1848320/artifacts/raw/out/cabal-install-3.11.0.0-x86_64-linux-alpine3_12.tar.xz' 3.12.0.0-prerelease --no-set
Clone
konn/hls-cabal-monorepo-multihome-recomp-repro
Make sure LSP client uses HLS 2.8 and Cabal 3.11.0.0. You don't have to any configuration if you are using VSCode, as it contains the necessary configuration file.
Open
package-a/src/MyLibA.hs
andpackage-b/src/MyLibB.hs
and wait for HLS to warmup.After HLS has been successfully launched, add
package-a
as thebuild-depends
ofpackage-b
, removesomeFunc
fromMyLibB.hs
and importMyLibA
instead.Expected behaviour
HLS should reconfigure package-b so that
MyLibA
can be imported inMyLibB
without any hassle.Actual behaviour
HLS seems to make no recompilation/state update, and complaining
MyLibA
not found.Side note
sessionLoading
tosingleComponent
, then HLS updates/recompiles when*.cabal
changes.Debug information
lop.log
The text was updated successfully, but these errors were encountered: