Description
I'm taking a look at packaging haskell-language-server-2.7.0.0
for Gentoo Linux. Currently, I have 2.6.0.0
and most plugins installed to my system, although I do not have the hls-fourmolu-plugin
or fourmolu
packages installed. Just experimenting with the Setup.hs
interface, I notice that the fourmolu
dependency is being pulled in even when the fourmolu
flag is disabled:
cd haskell-language-server-2.7.0.0/
runhaskell Setup.hs configure --flag=-fourmolu
As you can see, it is still looking for fourmolu
:
Configuring haskell-language-server-2.7.0.0...
Setup.hs: Encountered missing or private dependencies:
fourmolu >=0.14 && <0.16,
ghcide ==2.7.0.0,
hiedb >=0.6.0.0 && <0.7,
hls-graph ==2.7.0.0,
hls-plugin-api ==2.7.0.0,
lsp >=2.4 && <2.5
The changes made in #3976 seem to be selectively choosing which sub-libraries to build using build-depends
:
haskell-language-server/haskell-language-server.cabal
Lines 1298 to 1301 in 41de40e
It seems to me that Setup.hs
does not seem to have the functionality to handle this, and instead tries to build all sub-libraries mentioned in the .cabal
file, regardless of what flags are toggled.
This experiment was done using ghc-9.2.8
and Cabal-3.6.3.0
.