Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack test fails and requires containers dependency #607

Closed
felixlinker opened this issue Feb 13, 2019 · 7 comments · Fixed by #738
Closed

stack test fails and requires containers dependency #607

felixlinker opened this issue Feb 13, 2019 · 7 comments · Fixed by #738

Comments

@felixlinker
Copy link

felixlinker commented Feb 13, 2019

Hi there,

I tried running the stack build steps. stack build worked fine and resulted in the final output:

Installing library in
C:\Users\felix\git\containers\.stack-work\install\69301fa4\lib\x86_64-windows-ghc-8.0.2\containers-0.6.0.1-COngnqYhRMXJCJyW6qUDAj
Registering containers-0.6.0.1...

However, running stack test and stack bench failed. Both commands failed to find a matching containers dependency which is rather odd to me. I guess I should not take the steps recommended by stack:

PS C:\Users\felix\git\containers> stack test

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

In the dependencies for ChasingBottoms-1.3.1.3:
    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 containers-0.6.0.1 -> ChasingBottoms-1.3.1.3

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.

  * Recommended action: try adding the following to your extra-deps
    in C:\Users\felix\git\containers\stack.yaml:

containers-0.5.11.0@sha256:28ad7337057442f75bc689315ab4ec7bdf5e6b2c39668f306672cecd82c02798

Plan construction failed.
PS C:\Users\felix\git\containers> stack bench

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

In the dependencies for Glob-0.8.0:
    containers-0.6.0.1 from stack configuration does not match <0.6  (latest matching version
                       is 0.5.11.0)
needed due to containers-0.6.0.1 -> Glob-0.8.0

In the dependencies for cassava-0.4.5.1:
    containers-0.6.0.1 from stack configuration does not match <0.6  (latest matching version
                       is 0.5.11.0)
needed due to containers-0.6.0.1 -> cassava-0.4.5.1

In the dependencies for hastache-0.6.1:
    containers-0.6.0.1 from stack configuration does not match <0.6  (latest matching version
                       is 0.5.11.0)
needed due to containers-0.6.0.1 -> hastache-0.6.1

In the dependencies for parallel-3.2.1.1:
    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 containers-0.6.0.1 -> parallel-3.2.1.1

In the dependencies for scientific-0.3.5.2:
    containers-0.6.0.1 from stack configuration does not match >=0.1 && <0.6  (latest matching
                       version is 0.5.11.0)
needed due to containers-0.6.0.1 -> scientific-0.3.5.2

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.

  * Recommended action: try adding the following to your extra-deps
    in C:\Users\felix\git\containers\stack.yaml:

containers-0.5.11.0@sha256:28ad7337057442f75bc689315ab4ec7bdf5e6b2c39668f306672cecd82c02798

Plan construction failed.

My stack version is:

PS C:\Users\felix\git\containers> stack --version
Version 1.9.3, Git revision 40cf7b37526b86d1676da82167ea8758a854953b (6211 commits) x86_64 hpack-0.31.1

...and you probably have already noted that I'm on Windows 10.

@treeowl
Copy link
Contributor

treeowl commented Apr 12, 2019

Have you tried following the instructions in https://github.com/haskell/containers/blob/master/CONTRIBUTING.md?

@felixlinker
Copy link
Author

felixlinker commented Apr 16, 2019

Well, that's not particularly hard as the only step suggested is to make sure that my stack version is >= 1.6.1 which it is.

@treeowl
Copy link
Contributor

treeowl commented Apr 16, 2019 via email

@felixlinker
Copy link
Author

Yes, as I wrote in the OP stack build completed successfully. To get you the full log I just deleted the .stack-work directory an ran stack build again. Below you can find the complete output:

PS C:\Users\felix\git\containers> stack build
containers-0.6.0.1: configure (lib)
Configuring containers-0.6.0.1...
containers-0.6.0.1: build (lib)
Preprocessing library containers-0.6.0.1...
[ 1 of 35] Compiling Utils.Containers.Internal.TypeError ( Utils\Containers\Internal\TypeError.hs, .stack-work\dist\ca59d0ab\build\Utils\Containers\Internal\TypeError.o )
[ 2 of 35] Compiling Utils.Containers.Internal.StrictPair ( Utils\Containers\Internal\StrictPair.hs, .stack-work\dist\ca59d0ab\build\Utils\Containers\Internal\StrictPair.o )
[ 3 of 35] Compiling Utils.Containers.Internal.StrictMaybe ( Utils\Containers\Internal\StrictMaybe.hs, .stack-work\dist\ca59d0ab\build\Utils\Containers\Internal\StrictMaybe.o )
[ 4 of 35] Compiling Utils.Containers.Internal.State ( Utils\Containers\Internal\State.hs, .stack-work\dist\ca59d0ab\build\Utils\Containers\Internal\State.o )
[ 5 of 35] Compiling Utils.Containers.Internal.PtrEquality ( Utils\Containers\Internal\PtrEquality.hs, .stack-work\dist\ca59d0ab\build\Utils\Containers\Internal\PtrEquality.o )
[ 6 of 35] Compiling Utils.Containers.Internal.Coercions ( Utils\Containers\Internal\Coercions.hs, .stack-work\dist\ca59d0ab\build\Utils\Containers\Internal\Coercions.o )
[ 7 of 35] Compiling Utils.Containers.Internal.BitUtil ( Utils\Containers\Internal\BitUtil.hs, .stack-work\dist\ca59d0ab\build\Utils\Containers\Internal\BitUtil.o )
[ 8 of 35] Compiling Utils.Containers.Internal.BitQueue ( Utils\Containers\Internal\BitQueue.hs, .stack-work\dist\ca59d0ab\build\Utils\Containers\Internal\BitQueue.o )
[ 9 of 35] Compiling Data.Set.Internal ( Data\Set\Internal.hs, .stack-work\dist\ca59d0ab\build\Data\Set\Internal.o )

C:\Users\felix\git\containers\Data\Set\Internal.hs:359:33: warning: [-Wincomplete-patterns]
    Pattern match(es) are non-exhaustive
    In a case alternative:
        Patterns not matched: (_, p) where p is not one of {1, 0}
[10 of 35] Compiling Data.Set         ( Data\Set.hs, .stack-work\dist\ca59d0ab\build\Data\Set.o )
[11 of 35] Compiling Data.Sequence.Internal ( Data\Sequence\Internal.hs, .stack-work\dist\ca59d0ab\build\Data\Sequence\Internal.o )
[12 of 35] Compiling Data.Sequence.Internal.Sorting ( Data\Sequence\Internal\Sorting.hs, .stack-work\dist\ca59d0ab\build\Data\Sequence\Internal\Sorting.o )
[13 of 35] Compiling Data.Sequence    ( Data\Sequence.hs, .stack-work\dist\ca59d0ab\build\Data\Sequence.o )
[14 of 35] Compiling Data.Tree        ( Data\Tree.hs, .stack-work\dist\ca59d0ab\build\Data\Tree.o )
[15 of 35] Compiling Data.Map.Internal ( Data\Map\Internal.hs, .stack-work\dist\ca59d0ab\build\Data\Map\Internal.o )
[16 of 35] Compiling Data.Map.Internal.Debug ( Data\Map\Internal\Debug.hs, .stack-work\dist\ca59d0ab\build\Data\Map\Internal\Debug.o )
[17 of 35] Compiling Data.Map.Internal.DeprecatedShowTree ( Data\Map\Internal\DeprecatedShowTree.hs, .stack-work\dist\ca59d0ab\build\Data\Map\Internal\DeprecatedShowTree.o )
[18 of 35] Compiling Data.Map.Lazy    ( Data\Map\Lazy.hs, .stack-work\dist\ca59d0ab\build\Data\Map\Lazy.o )
[19 of 35] Compiling Data.Map.Merge.Lazy ( Data\Map\Merge\Lazy.hs, .stack-work\dist\ca59d0ab\build\Data\Map\Merge\Lazy.o )
[20 of 35] Compiling Data.Map.Strict.Internal ( Data\Map\Strict\Internal.hs, .stack-work\dist\ca59d0ab\build\Data\Map\Strict\Internal.o )
[21 of 35] Compiling Data.Map.Merge.Strict ( Data\Map\Merge\Strict.hs, .stack-work\dist\ca59d0ab\build\Data\Map\Merge\Strict.o )
[22 of 35] Compiling Data.Map.Strict  ( Data\Map\Strict.hs, .stack-work\dist\ca59d0ab\build\Data\Map\Strict.o )
[23 of 35] Compiling Data.Map         ( Data\Map.hs, .stack-work\dist\ca59d0ab\build\Data\Map.o )
[24 of 35] Compiling Data.IntSet.Internal ( Data\IntSet\Internal.hs, .stack-work\dist\ca59d0ab\build\Data\IntSet\Internal.o )
[25 of 35] Compiling Data.IntSet      ( Data\IntSet.hs, .stack-work\dist\ca59d0ab\build\Data\IntSet.o )
[26 of 35] Compiling Data.IntMap.Internal ( Data\IntMap\Internal.hs, .stack-work\dist\ca59d0ab\build\Data\IntMap\Internal.o )
[27 of 35] Compiling Data.IntMap.Internal.Debug ( Data\IntMap\Internal\Debug.hs, .stack-work\dist\ca59d0ab\build\Data\IntMap\Internal\Debug.o )
[28 of 35] Compiling Data.IntMap.Internal.DeprecatedDebug ( Data\IntMap\Internal\DeprecatedDebug.hs, .stack-work\dist\ca59d0ab\build\Data\IntMap\Internal\DeprecatedDebug.o )
[29 of 35] Compiling Data.IntMap.Lazy ( Data\IntMap\Lazy.hs, .stack-work\dist\ca59d0ab\build\Data\IntMap\Lazy.o )
[30 of 35] Compiling Data.IntMap.Merge.Lazy ( Data\IntMap\Merge\Lazy.hs, .stack-work\dist\ca59d0ab\build\Data\IntMap\Merge\Lazy.o )
[31 of 35] Compiling Data.IntMap.Merge.Strict ( Data\IntMap\Merge\Strict.hs, .stack-work\dist\ca59d0ab\build\Data\IntMap\Merge\Strict.o )
[32 of 35] Compiling Data.IntMap.Strict ( Data\IntMap\Strict.hs, .stack-work\dist\ca59d0ab\build\Data\IntMap\Strict.o )
[33 of 35] Compiling Data.IntMap      ( Data\IntMap.hs, .stack-work\dist\ca59d0ab\build\Data\IntMap.o )
[34 of 35] Compiling Data.Graph       ( Data\Graph.hs, .stack-work\dist\ca59d0ab\build\Data\Graph.o )
[35 of 35] Compiling Data.Containers.ListUtils ( Data\Containers\ListUtils.hs, .stack-work\dist\ca59d0ab\build\Data\Containers\ListUtils.o )
containers-0.6.0.1: copy/register
Installing library in
C:\Users\felix\git\containers\.stack-work\install\69301fa4\lib\x86_64-windows-ghc-8.0.2\containers-0.6.0.1-COngnqYhRMXJCJyW6qUDAj
Registering containers-0.6.0.1...

@jwaldmann
Copy link
Contributor

I observe the same behaviour (containers-master, stack test fails for ghc-8.4.4/lts-12.13, also for ghc-8.6.4/lts-13.17), with or without stack build before.

But when I do as the error message suggests (Set 'allow-newer: true' ...) the test seem to be running fine.

I guess the reason is that

The constraint mentioned in the last item was lifted (in ChasingBottoms-1.3.1.5), so perhaps stack.yaml can be adapted accordingly.

@jwaldmann
Copy link
Contributor

There is still something strange going on here:

PATH=/opt/ghc/ghc-8.6.5/bin:$PATH stack --resolver=lts test
Selected resolver: lts-13.29

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

In the dependencies for text-1.2.3.1(-integer-simple):
    binary needed, but the stack configuration has no specified version  (latest
           matching version is 0.8.7.0)
needed due to containers-tests-0 -> text-1.2.3.1

In the dependencies for containers-tests-0:
    ChasingBottoms needed, but the stack configuration has no specified version 
                   (latest matching version is 1.3.1.6)
needed since containers-tests is a build target.

and

PATH=/opt/ghc/ghc-8.4.4/bin:$PATH stack  test

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

In the dependencies for text-1.2.3.1(-integer-simple):
    binary needed, but the stack configuration has no specified version  (latest
           matching version is 0.8.7.0)
needed due to containers-tests-0 -> text-1.2.3.1

I can solve this by putting this in stack.yaml:

extra-deps:
- ChasingBottoms-1.3.1.6
- binary-0.8.7.0

@sjakobi
Copy link
Member

sjakobi commented Jul 15, 2020

Oof, this still seems relevant:

$ stack test

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

In the dependencies for text-1.2.3.1(-integer-simple):
    binary needed, but the stack configuration has no specified version  (latest matching version is 0.8.8.0)
needed due to containers-tests-0 -> text-1.2.3.1

Some different approaches to resolving this:

  * Recommended action: try adding the following to your extra-deps in /home/simon/src/containers/stack.yaml:

- binary-0.8.8.0@sha256:e9387a7ef2b34c6a23b09664c306e37cc01ae2cb4e4511a1c96ffb14008c24b0,6262

Plan construction failed.

#675 is related.

Building, testing and benchmarking really shouldn't be so hard.

We ought to properly document this too.

@sjakobi sjakobi pinned this issue Jul 15, 2020
@sjakobi sjakobi unpinned this issue Jul 15, 2020
@sjakobi sjakobi mentioned this issue Jul 15, 2020
@sjakobi sjakobi linked a pull request Jul 15, 2020 that will close this issue
sjakobi added a commit that referenced this issue Jul 15, 2020
Previously these commands would fail due to cyclical dependency issues.

Fixes #607, fixes #671.
sjakobi added a commit to sjakobi/containers that referenced this issue Jul 15, 2020
Previously these commands would fail due to circular dependency issues.

Fixes haskell#607, fixes haskell#671.
sjakobi added a commit to sjakobi/containers that referenced this issue Jul 15, 2020
Previously this command would fail due to circular dependency issues.

Fixes haskell#607, fixes haskell#671.
sjakobi added a commit that referenced this issue Jul 17, 2020
Previously this command would fail due to circular dependency issues.

Fixes #607, fixes #671.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants