Closed
Description
I’m building hls 1.0.0 with the system ghc on current Debian testing & the build fails with the following error:
Failed to build hls-eval-plugin-1.0.0.0.
Build log (
/home/phil/.cabal/logs/ghc-8.8.4/hls-eval-plugin-1.0.0.0-fd202380e159bf63e100807e79526cf88201becc008bd0eda9354dda4b023a89.log
):
Configuring library for hls-eval-plugin-1.0.0.0..
Preprocessing library for hls-eval-plugin-1.0.0.0..
Building library for hls-eval-plugin-1.0.0.0..
[1 of 8] Compiling Ide.Plugin.Eval.Parse.Option ( src/Ide/Plugin/Eval/Parse/Option.hs, dist/build/Ide/Plugin/Eval/Parse/Option.o )
src/Ide/Plugin/Eval/Parse/Option.hs:31:6: error:
• Variable not in scope:
hspace :: ParsecT Void String Data.Functor.Identity.Identity a0
• Perhaps you meant one of these:
‘space’ (imported from Text.Megaparsec.Char),
‘space1’ (imported from Text.Megaparsec.Char)
|
31 | (hspace *> chunk ":set"
| ^^^^^^
src/Ide/Plugin/Eval/Parse/Option.hs:32:12: error:
• Variable not in scope:
hspace1 :: ParsecT Void String Data.Functor.Identity.Identity a1
• Perhaps you meant one of these:
‘space1’ (imported from Text.Megaparsec.Char),
‘space’ (imported from Text.Megaparsec.Char)
|
32 | *> hspace1 *> takeRest
| ^^^^^^^
cabal: Failed to build hls-eval-plugin-1.0.0.0 (which is required by
exe:haskell-language-server from haskell-language-server-1.0.0.0). See the
build log above for details.
Error when running Shake build system:
at want, called at src/Development/Shake/Internal/Args.hs:83:69 in shake-0.18.5-8c746a775315a1506c9fb0a2e67fd2a051d000e12ffe4a3a609e40163570868c:Development.Shake.Internal.Args
* Depends on: hls
* Depends on: latest
* Depends on: hls-8.8.4
at command, called at src/Cabal.hs:29:13 in hls-install-0.8.0.0-inplace:Cabal
* Raised the exception:
Development.Shake.command, system command failed
Command line: cabal v2-install exe:haskell-language-server exe:haskell-language-server-wrapper -w /usr/bin/ghc-8.8.4 --write-ghc-environment-files=never --installdir /home/phil/.cabal/bin --max-backjumps=5000 --overwrite-policy=always --project-file=cabal.project -v1
Exit code: 1
Stderr:
cabal: Failed to build hls-eval-plugin-1.0.0.0 (which is required by
exe:haskell-language-server from haskell-language-server-1.0.0.0). See the
build log above for details.
I think you need a floor version on MegaParsec: hspace is not defined in MegaParsec version 8, which is the system version currently shipping with Debian, you need a minimum of version 9.0.0 according to https://hackage.haskell.org/package/megaparsec-9.0.1/docs/Text-Megaparsec-Char.html
(This is mostly a me problem, as I can build my own MegaParsec library for hls, but the build specs should probably be updated!)
cheers, Phil