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

hie-8.4.4 no longer builds #1219

Open bscottm opened 5 years ago

bscottm commented 5 years ago

Cabal can't build because dependencies are now out of sync (something must've updated in the stack-8.4.4.yaml resolver, I'm going to guess):

PS > stack runghc --stack-yaml=shake.yaml --package shake --package directory --package extra install.hs hie-8.4.4
# git (for submodules)
Synchronizing submodule url for 'submodules/HaRe'
Synchronizing submodule url for 'submodules/HaRe/submodules/cabal-helper'
Synchronizing submodule url for 'submodules/HaRe/submodules/ghc-mod'
Synchronizing submodule url for 'submodules/brittany'
Synchronizing submodule url for 'submodules/cabal-helper'
Synchronizing submodule url for 'submodules/floskell'
Synchronizing submodule url for 'submodules/ghc-mod'
# git (for submodules)
# stack (for check-stack)
# cabal (for cabal)
# cabal (for cabal)
Warning: The update command is a part of the legacy v1 style of cabal usage.

Please switch to using either the new project style and the new-update command
or the legacy v1-update alias as new-style projects will become the default in
the next version of cabal-install. Please file a bug if you cannot replicate a
working v1- use case with the new-style commands.

For more information, see: https://wiki.haskell.org/Cabal/NewBuild

Downloading the latest package list from hackage.haskell.org
To revert to previous state run:
    cabal update --index-state='2019-04-29T23:28:49Z'
# stack (for hie-8.4.4)

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for Cabal-2.2.0.1:
    containers-0.6.0.1 from stack configuration does not match >=0.4.2.1 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to haskell-ide-engine-0.8.0.0 -> Cabal-2.2.0.1

In the dependencies for apply-refact-0.5.0.0:
    ghc-8.6.2 from stack configuration does not match >=8.4.0 && <8.6  (latest matching version
              is 8.4.4)
needed due to haskell-ide-engine-0.8.0.0 -> apply-refact-0.5.0.0

In the dependencies for butcher-1.3.2.0:
    base-4.12.0.0 from stack configuration does not match >=4.9 && <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> butcher-1.3.2.0

In the dependencies for cabal-install-2.2.0.0(+lib -native-dns):
    containers-0.6.0.1 from stack configuration does not match >=0.4 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to haskell-ide-engine-0.8.0.0 -> cabal-install-2.2.0.0

In the dependencies for contravariant-1.4.1:
    base-4.12.0.0 from stack configuration does not match <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> contravariant-1.4.1

In the dependencies for free-5.0.2:
    containers-0.6.0.1 from stack configuration does not match <0.6  (latest matching version
                       is 0.5.11.0)
needed due to hie-plugin-api-0.6.0.0 -> free-5.0.2

In the dependencies for haddock-api-2.20.0:
    base-4.12.0.0 from stack configuration does not match ^>=4.11.0  (latest matching version
                  is 4.11.1.0)
    ghc-8.6.2 from stack configuration does not match ^>=8.4.2  (latest matching version is 8.4.4)
needed due to haskell-ide-engine-0.8.0.0 -> haddock-api-2.20.0

In the dependencies for haddock-library-1.6.0:
    base-4.12.0.0 from stack configuration does not match >=4.5 && <4.12  (latest matching version
                  is 4.11.1.0)
    containers-0.6.0.1 from stack configuration does not match >=0.4.2.1 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to haskell-ide-engine-0.8.0.0 -> haddock-library-1.6.0

In the dependencies for lens-4.16.1:
    containers-0.6.0.1 from stack configuration does not match >=0.4.0 && <0.6  (latest matching
                       version is 0.5.11.0)
    template-haskell-2.14.0.0 from stack configuration does not match >=2.4 && <2.14  (latest
                              matching version is 2.13.0.0)
needed due to haskell-ide-engine-0.8.0.0 -> lens-4.16.1

In the dependencies for polyparse-1.12:
    base-4.12.0.0 from stack configuration does not match <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> polyparse-1.12

In the dependencies for primitive-0.6.3.0:
    base-4.12.0.0 from stack configuration does not match >=4.5 && <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> primitive-0.6.3.0

In the dependencies for semigroupoids-5.2.2:
    containers-0.6.0.1 from stack configuration does not match >=0.3 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to hie-plugin-api-0.6.0.0 -> semigroupoids-5.2.2

In the dependencies for stm-2.4.5.1:
    base-4.12.0.0 from stack configuration does not match >=4.3 && <4.12  (latest matching version
                  is 4.11.1.0)
needed due to hie-plugin-api-0.6.0.0 -> stm-2.4.5.1

In the dependencies for tagged-0.8.5:
    template-haskell-2.14.0.0 from stack configuration does not match >=2.8 && <2.14  (latest
                              matching version is 2.13.0.0)
needed due to hie-plugin-api-0.6.0.0 -> tagged-0.8.5

Some different approaches to resolving this:

  * Set 'allow-newer: true' in C:\sr\config.yaml to ignore all version constraints and build anyway.

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some
    working build configuration. This can be convenient when dealing with many complicated
    constraint errors, but results may be unpredictable.

  * Build requires unattainable version of base. Since base is a part of GHC, you most likely need
    to use a different GHC version with the matching base.

Plan construction failed.

******************************************************************
Building failed, Try running `stack clean` and restart the build
If this does not work, open an issue at
        https://github.com/haskell/haskell-ide-engine
******************************************************************

Error when running Shake build system:
  at src/Development/Shake/Internal/Args.hs:81:69-79:
* Depends on: hie-8.4.4
* Raised the exception:
user error (Development.Shake.command_, system command failed
Command: stack --stack-yaml=stack-8.4.4.yaml build
Exit code: 1
Stderr:
Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for Cabal-2.2.0.1:
    containers-0.6.0.1 from stack configuration does not match >=0.4.2.1 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to haskell-ide-engine-0.8.0.0 -> Cabal-2.2.0.1

In the dependencies for apply-refact-0.5.0.0:
    ghc-8.6.2 from stack configuration does not match >=8.4.0 && <8.6  (latest matching version
              is 8.4.4)
needed due to haskell-ide-engine-0.8.0.0 -> apply-refact-0.5.0.0

In the dependencies for butcher-1.3.2.0:
    base-4.12.0.0 from stack configuration does not match >=4.9 && <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> butcher-1.3.2.0

In the dependencies for cabal-install-2.2.0.0(+lib -native-dns):
    containers-0.6.0.1 from stack configuration does not match >=0.4 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to haskell-ide-engine-0.8.0.0 -> cabal-install-2.2.0.0

In the dependencies for contravariant-1.4.1:
    base-4.12.0.0 from stack configuration does not match <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> contravariant-1.4.1

In the dependencies for free-5.0.2:
    containers-0.6.0.1 from stack configuration does not match <0.6  (latest matching version
                       is 0.5.11.0)
needed due to hie-plugin-api-0.6.0.0 -> free-5.0.2

In the dependencies for haddock-api-2.20.0:
    base-4.12.0.0 from stack configuration does not match ^>=4.11.0  (latest matching version
                  is 4.11.1.0)
    ghc-8.6.2 from stack configuration does not match ^>=8.4.2  (latest matching version is 8.4.4)
needed due to haskell-ide-engine-0.8.0.0 -> haddock-api-2.20.0

In the dependencies for haddock-library-1.6.0:
    base-4.12.0.0 from stack configuration does not match >=4.5 && <4.12  (latest matching version
                  is 4.11.1.0)
    containers-0.6.0.1 from stack configuration does not match >=0.4.2.1 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to haskell-ide-engine-0.8.0.0 -> haddock-library-1.6.0

In the dependencies for lens-4.16.1:
    containers-0.6.0.1 from stack configuration does not match >=0.4.0 && <0.6  (latest matching
                       version is 0.5.11.0)
    template-haskell-2.14.0.0 from stack configuration does not match >=2.4 && <2.14  (latest
                              matching version is 2.13.0.0)
needed due to haskell-ide-engine-0.8.0.0 -> lens-4.16.1

In the dependencies for polyparse-1.12:
    base-4.12.0.0 from stack configuration does not match <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> polyparse-1.12

In the dependencies for primitive-0.6.3.0:
    base-4.12.0.0 from stack configuration does not match >=4.5 && <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> primitive-0.6.3.0

In the dependencies for semigroupoids-5.2.2:
    containers-0.6.0.1 from stack configuration does not match >=0.3 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to hie-plugin-api-0.6.0.0 -> semigroupoids-5.2.2

In the dependencies for stm-2.4.5.1:
    base-4.12.0.0 from stack configuration does not match >=4.3 && <4.12  (latest matching version
                  is 4.11.1.0)
needed due to hie-plugin-api-0.6.0.0 -> stm-2.4.5.1

In the dependencies for tagged-0.8.5:
    template-haskell-2.14.0.0 from stack configuration does not match >=2.8 && <2.14  (latest
                              matching version is 2.13.0.0)
needed due to hie-plugin-api-0.6.0.0 -> tagged-0.8.5

Some different approaches to resolving this:

  * Set 'allow-newer: true' in C:\sr\config.yaml to ignore all version constraints and build anyway.

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some
    working build configuration. This can be convenient when dealing with many complicated
    constraint errors, but results may be unpredictable.

  * Build requires unattainable version of base. Since base is a part of GHC, you most likely need
    to use a different GHC version with the matching base.

Plan construction failed.
)
nponeccop commented 5 years ago

Can you use the recommended command line, which is stack ./install.hs hie-8.4.4?

bscottm commented 5 years ago

@nponeccop: Doesn't make a difference, same output. (BTW: stack runghc ... is the same as stack ./install.hs ..., if you peek into install.hs.)

PS > stack ./install.hs hie-8.4.4
# git (for submodules)
Synchronizing submodule url for 'submodules/HaRe'
Synchronizing submodule url for 'submodules/HaRe/submodules/cabal-helper'
Synchronizing submodule url for 'submodules/HaRe/submodules/ghc-mod'
Synchronizing submodule url for 'submodules/brittany'
Synchronizing submodule url for 'submodules/cabal-helper'
Synchronizing submodule url for 'submodules/floskell'
Synchronizing submodule url for 'submodules/ghc-mod'
# git (for submodules)
# stack (for check-stack)
# cabal (for cabal)
# cabal (for cabal)
Warning: The update command is a part of the legacy v1 style of cabal usage.

Please switch to using either the new project style and the new-update command
or the legacy v1-update alias as new-style projects will become the default in
the next version of cabal-install. Please file a bug if you cannot replicate a
working v1- use case with the new-style commands.

For more information, see: https://wiki.haskell.org/Cabal/NewBuild

Downloading the latest package list from hackage.haskell.org
To revert to previous state run:
    cabal update --index-state='2019-04-30T00:27:42Z'
# stack (for hie-8.4.4)

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for Cabal-2.2.0.1:
    containers-0.6.0.1 from stack configuration does not match >=0.4.2.1 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to haskell-ide-engine-0.8.0.0 -> Cabal-2.2.0.1

In the dependencies for apply-refact-0.5.0.0:
    ghc-8.6.2 from stack configuration does not match >=8.4.0 && <8.6  (latest matching version
              is 8.4.4)
needed due to haskell-ide-engine-0.8.0.0 -> apply-refact-0.5.0.0

In the dependencies for butcher-1.3.2.0:
    base-4.12.0.0 from stack configuration does not match >=4.9 && <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> butcher-1.3.2.0

In the dependencies for cabal-install-2.2.0.0(+lib -native-dns):
    containers-0.6.0.1 from stack configuration does not match >=0.4 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to haskell-ide-engine-0.8.0.0 -> cabal-install-2.2.0.0

In the dependencies for contravariant-1.4.1:
    base-4.12.0.0 from stack configuration does not match <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> contravariant-1.4.1

In the dependencies for free-5.0.2:
    containers-0.6.0.1 from stack configuration does not match <0.6  (latest matching version
                       is 0.5.11.0)
needed due to hie-plugin-api-0.6.0.0 -> free-5.0.2

In the dependencies for haddock-api-2.20.0:
    base-4.12.0.0 from stack configuration does not match ^>=4.11.0  (latest matching version
                  is 4.11.1.0)
    ghc-8.6.2 from stack configuration does not match ^>=8.4.2  (latest matching version is 8.4.4)
needed due to haskell-ide-engine-0.8.0.0 -> haddock-api-2.20.0

In the dependencies for haddock-library-1.6.0:
    base-4.12.0.0 from stack configuration does not match >=4.5 && <4.12  (latest matching version
                  is 4.11.1.0)
    containers-0.6.0.1 from stack configuration does not match >=0.4.2.1 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to haskell-ide-engine-0.8.0.0 -> haddock-library-1.6.0

In the dependencies for lens-4.16.1:
    containers-0.6.0.1 from stack configuration does not match >=0.4.0 && <0.6  (latest matching
                       version is 0.5.11.0)
    template-haskell-2.14.0.0 from stack configuration does not match >=2.4 && <2.14  (latest
                              matching version is 2.13.0.0)
needed due to haskell-ide-engine-0.8.0.0 -> lens-4.16.1

In the dependencies for polyparse-1.12:
    base-4.12.0.0 from stack configuration does not match <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> polyparse-1.12

In the dependencies for primitive-0.6.3.0:
    base-4.12.0.0 from stack configuration does not match >=4.5 && <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> primitive-0.6.3.0

In the dependencies for semigroupoids-5.2.2:
    containers-0.6.0.1 from stack configuration does not match >=0.3 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to hie-plugin-api-0.6.0.0 -> semigroupoids-5.2.2

In the dependencies for stm-2.4.5.1:
    base-4.12.0.0 from stack configuration does not match >=4.3 && <4.12  (latest matching version
                  is 4.11.1.0)
needed due to hie-plugin-api-0.6.0.0 -> stm-2.4.5.1

In the dependencies for tagged-0.8.5:
    template-haskell-2.14.0.0 from stack configuration does not match >=2.8 && <2.14  (latest
                              matching version is 2.13.0.0)
needed due to hie-plugin-api-0.6.0.0 -> tagged-0.8.5

Some different approaches to resolving this:

  * Set 'allow-newer: true' in C:\sr\config.yaml to ignore all version constraints and build anyway.

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some
    working build configuration. This can be convenient when dealing with many complicated
    constraint errors, but results may be unpredictable.

  * Build requires unattainable version of base. Since base is a part of GHC, you most likely need
    to use a different GHC version with the matching base.

Plan construction failed.

******************************************************************
Building failed, Try running `stack clean` and restart the build
If this does not work, open an issue at
        https://github.com/haskell/haskell-ide-engine
******************************************************************

Error when running Shake build system:
  at src/Development/Shake/Internal/Args.hs:81:69-79:
* Depends on: hie-8.4.4
* Raised the exception:
user error (Development.Shake.command_, system command failed
Command: stack --stack-yaml=stack-8.4.4.yaml build
Exit code: 1
Stderr:
Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for Cabal-2.2.0.1:
    containers-0.6.0.1 from stack configuration does not match >=0.4.2.1 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to haskell-ide-engine-0.8.0.0 -> Cabal-2.2.0.1

In the dependencies for apply-refact-0.5.0.0:
    ghc-8.6.2 from stack configuration does not match >=8.4.0 && <8.6  (latest matching version
              is 8.4.4)
needed due to haskell-ide-engine-0.8.0.0 -> apply-refact-0.5.0.0

In the dependencies for butcher-1.3.2.0:
    base-4.12.0.0 from stack configuration does not match >=4.9 && <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> butcher-1.3.2.0

In the dependencies for cabal-install-2.2.0.0(+lib -native-dns):
    containers-0.6.0.1 from stack configuration does not match >=0.4 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to haskell-ide-engine-0.8.0.0 -> cabal-install-2.2.0.0

In the dependencies for contravariant-1.4.1:
    base-4.12.0.0 from stack configuration does not match <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> contravariant-1.4.1

In the dependencies for free-5.0.2:
    containers-0.6.0.1 from stack configuration does not match <0.6  (latest matching version
                       is 0.5.11.0)
needed due to hie-plugin-api-0.6.0.0 -> free-5.0.2

In the dependencies for haddock-api-2.20.0:
    base-4.12.0.0 from stack configuration does not match ^>=4.11.0  (latest matching version
                  is 4.11.1.0)
    ghc-8.6.2 from stack configuration does not match ^>=8.4.2  (latest matching version is 8.4.4)
needed due to haskell-ide-engine-0.8.0.0 -> haddock-api-2.20.0

In the dependencies for haddock-library-1.6.0:
    base-4.12.0.0 from stack configuration does not match >=4.5 && <4.12  (latest matching version
                  is 4.11.1.0)
    containers-0.6.0.1 from stack configuration does not match >=0.4.2.1 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to haskell-ide-engine-0.8.0.0 -> haddock-library-1.6.0

In the dependencies for lens-4.16.1:
    containers-0.6.0.1 from stack configuration does not match >=0.4.0 && <0.6  (latest matching
                       version is 0.5.11.0)
    template-haskell-2.14.0.0 from stack configuration does not match >=2.4 && <2.14  (latest
                              matching version is 2.13.0.0)
needed due to haskell-ide-engine-0.8.0.0 -> lens-4.16.1

In the dependencies for polyparse-1.12:
    base-4.12.0.0 from stack configuration does not match <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> polyparse-1.12

In the dependencies for primitive-0.6.3.0:
    base-4.12.0.0 from stack configuration does not match >=4.5 && <4.12  (latest matching version
                  is 4.11.1.0)
needed due to haskell-ide-engine-0.8.0.0 -> primitive-0.6.3.0

In the dependencies for semigroupoids-5.2.2:
    containers-0.6.0.1 from stack configuration does not match >=0.3 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to hie-plugin-api-0.6.0.0 -> semigroupoids-5.2.2

In the dependencies for stm-2.4.5.1:
    base-4.12.0.0 from stack configuration does not match >=4.3 && <4.12  (latest matching version
                  is 4.11.1.0)
needed due to hie-plugin-api-0.6.0.0 -> stm-2.4.5.1

In the dependencies for tagged-0.8.5:
    template-haskell-2.14.0.0 from stack configuration does not match >=2.8 && <2.14  (latest
                              matching version is 2.13.0.0)
needed due to hie-plugin-api-0.6.0.0 -> tagged-0.8.5

Some different approaches to resolving this:

  * Set 'allow-newer: true' in C:\sr\config.yaml to ignore all version constraints and build anyway.

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some
    working build configuration. This can be convenient when dealing with many complicated
    constraint errors, but results may be unpredictable.

  * Build requires unattainable version of base. Since base is a part of GHC, you most likely need
    to use a different GHC version with the matching base.

Plan construction failed.
)
alanz commented 5 years ago

Perhaps this is related to us recently removing Cabal from the install requirements in https://github.com/haskell/haskell-ide-engine/pull/1184

cc @power-fungus

nponeccop commented 5 years ago

this is related to us recently removing

I wonder how CI works then. Should we rebuild the caches?

VledicFranco commented 5 years ago

I have the same issue, I'm on a Windows computer

fendor commented 5 years ago

@FrancoAra, Can you post your stack version and windows version? Also, which command did you invoke to produce this error? Is the project up-to-date, e.g. git pull does not pull in updates?

jneira commented 5 years ago

I've reproduced it with both stack-1.9.3 and stack-2.1.3 and executing stack build --stack-yaml=stack-8.4.4.yaml and stack install.hs hie-8.4.4. The error with stack-2.1.3 is:

....
In the dependencies for haddock-api-2.20.0:
    base-4.12.0.0 from stack configuration does not match ^>=4.11.0  (latest matching
                  version is 4.11.1.0)
    ghc-8.6.5 from stack configuration does not match ^>=8.4.2  (latest matching version
              is 8.4.4)
needed due to haskell-ide-engine-0.12.0.0 -> haddock-api-2.20.0

In the dependencies for haddock-library-1.6.0:
    base-4.12.0.0 from stack configuration does not match >=4.5 && <4.12  (latest matching
                  version is 4.11.1.0)
    containers-0.6.0.1 from stack configuration does not match >=0.4.2.1 && <0.6  (latest
                       matching version is 0.5.11.0)
needed due to haskell-ide-engine-0.12.0.0 -> haddock-library-1.6.0

Some different approaches to resolving this:

  * Set 'allow-newer: true'
    in D:\sr\config.yaml to ignore all version constraints and build anyway.

  * Build requires unattainable version of base. Since base is a part of GHC, you most
    likely need to use a different GHC version with the matching base.

Plan construction failed.
jneira commented 5 years ago

Strangely i have not ghc-8.4.4 installed but stack doesn't download it but uses the ghc system wide:

PS D:\dev\ws\haskell\haskell-ide-engine> stack path --stack-yaml=stack-8.4.4.yaml 
...
compiler-exe: D:\bin\stack\x86_64-windows\ghc-8.6.5\bin\ghc.EXE
...
jneira commented 5 years ago

A stack setup --stack-yaml=stack-8.4.4.yaml doesn't install ghc-8.4.4 but a stack setup --stack-yaml=stack-8.4.4.yaml --reinstall does it. So it seems the error is triggered when you have a newer ghc (>= 8.6) in the global path. Probably this is the cause that makes the build work in the ci env. I have to investigate more on this but maybe it will need open a ticket upstream.

jneira commented 5 years ago

After installing ghc-8.4.4 i have not able to reproduce again the error, even "uninstalling" it again, so there must be some other factor involved. 😟

jneira commented 5 years ago

Maybe another reporter still hits the error so we could reproduce it? @FrancoAra @bscottm?