Haskell-language-server: Current master fails to build

Created on 16 Sep 2020  路  5Comments  路  Source: haskell/haskell-language-server

Subject of the issue

Build of HLS fails.

Your environment

$ haskell-language-server --probe-tools
haskell-language-server version: 0.4.0.0 (GHC: 8.10.2) (PATH: /Users/uri/.cabal/store/ghc-8.10.2/hskll-lngg-srvr-0.4.0.0-bbc2b03d/bin/haskell-language-server)
Tool versions found on the $PATH
cabal:      3.2.0.0
stack:      2.3.3
ghc:        8.10.2

Steps to reproduce

$ ./cabal-hls-install hls-8.8.4
Resolving dependencies...
Build profile: -w ghc-8.10.2 -O1
In order, the following will be built (use -v for more details):
 - fake-package-0 (exe:script) (configuration changed)
Configuring executable 'script' for fake-package-0..
Preprocessing executable 'script' for fake-package-0..
Building executable 'script' for fake-package-0..
[1 of 1] Compiling Main             ( Main.hs, /Users/uri/src/haskell-language-server/dist-newstyle/build/x86_64-osx/ghc-8.10.2/fake-package-0/x/script/build/script/script-tmp/Main.dyn_o )
Linking /Users/uri/src/haskell-language-server/dist-newstyle/build/x86_64-osx/ghc-8.10.2/fake-package-0/x/script/build/script/script ...
# cabal (for check)
# git (for submodules)
Synchronizing submodule url for 'ghcide'
# git (for submodules)
Options:
    Verbosity level: Info
# cabal (for hls-8.8.4)
# cabal (for hls-8.8.4)
cabal: Could not resolve dependencies:
[__0] trying: ghcide-0.3.0 (user goal)
[__1] trying: ghcide:-ghc-lib
[__2] next goal: implicit-hie-cradle (dependency of ghcide -ghc-lib)
[__2] rejecting: implicit-hie-cradle-0.1.0.0 (conflict: ghcide -ghc-lib =>
implicit-hie-cradle>=0.2.0.0 && <0.3)
[__2] fail (backjumping, conflict set: ghcide, implicit-hie-cradle,
ghcide:ghc-lib)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghcide, ghcide:ghc-lib,
implicit-hie-cradle

Error when running Shake build system:
  at want, called at src/Development/Shake/Internal/Args.hs:83:69 in shk-0.18.5-87487824:Development.Shake.Internal.Args
* Depends on: hls-8.8.4
  at command, called at src/Cabal.hs:28: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 /Users/uri/.ghcup/bin/ghc-8.8.4 --write-ghc-environment-files=never --installdir /Users/uri/.cabal/bin --max-backjumps=5000 --overwrite-policy=always --project-file=cabal.project -v1
Exit code: 1
Stderr:
cabal: Could not resolve dependencies:
[__0] trying: ghcide-0.3.0 (user goal)
[__1] trying: ghcide:-ghc-lib
[__2] next goal: implicit-hie-cradle (dependency of ghcide -ghc-lib)
[__2] rejecting: implicit-hie-cradle-0.1.0.0 (conflict: ghcide -ghc-lib =>
implicit-hie-cradle>=0.2.0.0 && <0.3)
[__2] fail (backjumping, conflict set: ghcide, implicit-hie-cradle,
ghcide:ghc-lib)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghcide, ghcide:ghc-lib,
implicit-hie-cradle

$ ./cabal-hls-install hls-8.10.2
Resolving dependencies...
Build profile: -w ghc-8.10.2 -O1
In order, the following will be built (use -v for more details):
 - fake-package-0 (exe:script) (configuration changed)
Configuring executable 'script' for fake-package-0..
Preprocessing executable 'script' for fake-package-0..
Building executable 'script' for fake-package-0..
[1 of 1] Compiling Main             ( Main.hs, /Users/uri/src/haskell-language-server/dist-newstyle/build/x86_64-osx/ghc-8.10.2/fake-package-0/x/script/build/script/script-tmp/Main.dyn_o )
Linking /Users/uri/src/haskell-language-server/dist-newstyle/build/x86_64-osx/ghc-8.10.2/fake-package-0/x/script/build/script/script ...
# cabal (for check)
# git (for submodules)
Synchronizing submodule url for 'ghcide'
# git (for submodules)
Options:
    Verbosity level: Info
# cabal (for hls-8.10.2)
# cabal (for hls-8.10.2)
cabal: Could not resolve dependencies:
[__0] trying: ghcide-0.3.0 (user goal)
[__1] trying: ghcide:-ghc-lib
[__2] next goal: implicit-hie-cradle (dependency of ghcide -ghc-lib)
[__2] rejecting: implicit-hie-cradle-0.1.0.0 (conflict: ghcide -ghc-lib =>
implicit-hie-cradle>=0.2.0.0 && <0.3)
[__2] fail (backjumping, conflict set: ghcide, implicit-hie-cradle,
ghcide:ghc-lib)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghcide, ghcide:ghc-lib,
implicit-hie-cradle

Error when running Shake build system:
  at want, called at src/Development/Shake/Internal/Args.hs:83:69 in shk-0.18.5-87487824:Development.Shake.Internal.Args
* Depends on: hls-8.10.2
  at command, called at src/Cabal.hs:28: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 /Users/uri/.ghcup/bin/ghc-8.10.2 --write-ghc-environment-files=never --installdir /Users/uri/.cabal/bin --max-backjumps=5000 --overwrite-policy=always --project-file=cabal.project -v1
Exit code: 1
Stderr:
cabal: Could not resolve dependencies:
[__0] trying: ghcide-0.3.0 (user goal)
[__1] trying: ghcide:-ghc-lib
[__2] next goal: implicit-hie-cradle (dependency of ghcide -ghc-lib)
[__2] rejecting: implicit-hie-cradle-0.1.0.0 (conflict: ghcide -ghc-lib =>
implicit-hie-cradle>=0.2.0.0 && <0.3)
[__2] fail (backjumping, conflict set: ghcide, implicit-hie-cradle,
ghcide:ghc-lib)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghcide, ghcide:ghc-lib,
implicit-hie-cradle

Expected behaviour

Successful builds, like before the last one or two commits.

Actual behaviour

Build fails - see above.

build bug

Most helpful comment

cabal update?

All 5 comments

cabal update?

Indeed, cabal update remedied the problem. And I do it regularly - apparently it was only a few days or a week old.

I'd still prefer the build be somewhat more explicit about things like this one.

well, the hackage index (timestamp) in cabal.project was newer than @mouse07410 one for sure.
cabal could give a warning in those cases, but not sure if we can do something sensible in the build script. I dont like to do an auto cabal update cause you are changing a global system state that can affect negatively other builds.
@mouse07410 i would close this one, if you agree

Let me have the honor. ;-)

Update

On a second thought, you may want to print a warning - or maybe even abort the script? Especially, if in this case it's likely to produce an error like mine?

comparing the timestamp in cabal.project with the actual index state in the build script? (doing something that cabal should do imo)
uff, it would be doable but it would not have a high priority imho 馃槈

Was this page helpful?
0 / 5 - 0 ratings