haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 211 forks source link

Current master fails to build with Cabal #1700

Closed mouse07410 closed 4 years ago

mouse07410 commented 4 years ago

2bbc536670c0c66c broke the build:

$ ./cabal-hie-install hie-8.8.3
Resolving dependencies...
Build profile: -w ghc-8.8.3 -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-ide-engine/dist-newstyle/build/x86_64-osx/ghc-8.8.3/fake-package-0/x/script/build/script/script-tmp/Main.dyn_o )
Linking /Users/uri/src/haskell-ide-engine/dist-newstyle/build/x86_64-osx/ghc-8.8.3/fake-package-0/x/script/build/script/script ...
# cabal (for check)
# git (for submodules)
# git (for submodules)
Options:
    Verbosity level: Info
# cabal (for hie-8.8.3)
# cabal (for hie-8.8.3)
cabal: Could not resolve dependencies:
[__0] trying: hie-plugin-api-1.2 (user goal)
[__1] next goal: unliftio-core (dependency of hie-plugin-api)
[__1] rejecting: unliftio-core-0.2.0.1, unliftio-core-0.2.0.0 (constraint from
project config TODO requires <0.2.0.0)
[__1] rejecting: unliftio-core-0.1.2.0, unliftio-core-0.1.1.0,
unliftio-core-0.1.0.0 (conflict: hie-plugin-api => unliftio-core^>=0.2.0.1)
[__1] fail (backjumping, conflict set: hie-plugin-api, unliftio-core)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: unliftio-core, hie-plugin-api

Error when running Shake build system:
  at want, called at src/Development/Shake/Internal/Args.hs:83:69 in shk-0.18.5-6439af40:Development.Shake.Internal.Args
* Depends on: hie-8.8.3
  at command, called at src/Cabal.hs:28:13 in hie-install-0.8.1.0-inplace:Cabal
* Raised the exception:
Development.Shake.command, system command failed
Command line: cabal v2-install -w /Users/uri/.ghcup/bin/ghc-8.8.3 --write-ghc-environment-files=never --installdir /Users/uri/.cabal/bin --max-backjumps=5000 exe:hie exe:hie-wrapper --overwrite-policy=always --project-file=cabal.project-8.8.3 -v1
Exit code: 1
Stderr:
cabal: Could not resolve dependencies:
[__0] trying: hie-plugin-api-1.2 (user goal)
[__1] next goal: unliftio-core (dependency of hie-plugin-api)
[__1] rejecting: unliftio-core-0.2.0.1, unliftio-core-0.2.0.0 (constraint from
project config TODO requires <0.2.0.0)
[__1] rejecting: unliftio-core-0.1.2.0, unliftio-core-0.1.1.0,
unliftio-core-0.1.0.0 (conflict: hie-plugin-api => unliftio-core^>=0.2.0.1)
[__1] fail (backjumping, conflict set: hie-plugin-api, unliftio-core)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: unliftio-core, hie-plugin-api
jneira commented 4 years ago

Hi, do you have a cabal.project-8.8.3? If you have it and it has a constraint unliftio-core < 0.2.0.0 , it is the cause of the failing build. Actual cabal.project doesn't have it. In that case you should be replace the contents of cabal.project-8.8.3 with the actual one of cabal.project-8.8.2

mouse07410 commented 4 years ago

@jneira you're right. Replaced, building as we speak. Will report.

Update 1

Should I worry about this:

. . . . .
Wrote tarball sdist to
/Users/ur20980/Src/haskell-ide-engine/dist-newstyle/sdist/cabal-helper-1.0.0.0.tar.gz
Warning: The package list for 'hackage.haskell.org' is 25 days old.
Run 'cabal update' to get the latest list of available packages.
Warning: Requested index-state2020-03-03T21:13:56Z is newer than
'hackage.haskell.org'! Falling back to older state (2020-02-16T22:49:19Z).
Resolving dependencies...
. . . . .

Update 2

As you expected, build succeeded

mouse07410 commented 4 years ago

In case it matters - build with Stack also succeeds. Thanks!

jneira commented 4 years ago

Should I worry about this

Well, usually it is good to have the package list updated, you can do it running cabal update. Thanks for report!