Skip to content

containers test suite no longer builds with 1.20 #1806

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

Closed
tibbe opened this issue Apr 23, 2014 · 15 comments
Closed

containers test suite no longer builds with 1.20 #1806

tibbe opened this issue Apr 23, 2014 · 15 comments

Comments

@tibbe
Copy link
Member

tibbe commented Apr 23, 2014

This used to work in 1.18:

$ git clone [email protected]:haskell/containers.git
$ cd containers
$ cabal sandbox init
# Test dependencies must be installed manually to avoid a dependency cycle:
$ cabal install 'test-framework >= 0.3.3' 'test-framework-quickcheck2 >= 0.2.9' 'QuickCheck >= 2.4.0.1' 'ChasingBottoms'  'HUnit' 'test-framework-hunit'
$ cabal configure --enable-tests
$ cabal build

With 1.20 this fails with:

$ cabal configure --enable-tests
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: containers-0.5.5.1 (user goal)
rejecting: containers-0.5.5.1:!test (global constraint requires opposite flag
selection)
trying: containers-0.5.5.1:*test
next goal: ChasingBottoms (dependency of containers-0.5.5.1:*test)
rejecting: ChasingBottoms-1.3.0.7/installed-ebe... (conflict:
containers==0.5.5.1, ChasingBottoms => containers==0.5.0.0/installed-ab1...)
Dependency tree exhaustively searched.

None of the changes under cabal-install/Distribution/Client/Dependency since 1.18 looks suspicious, so the culprit is likely elsewhere. The only other thing that I can think of that touched dependency related things was the ability to pass the exact package hash when configuring, but I don't know if we use that functionality internally.

/cc @kosmikus @dcoutts

@tibbe
Copy link
Member Author

tibbe commented Apr 23, 2014

Here are the -v3 output:

Using a sandbox located at /Users/tibbe/src/containers/.cabal-sandbox
Searching for ghc in path.
Found ghc at /usr/bin/ghc
("/usr/bin/ghc",["--numeric-version"])
/usr/bin/ghc is version 7.6.3
looking for tool ghc-pkg near compiler in /usr/bin
found ghc-pkg in /usr/bin/ghc-pkg
("/usr/bin/ghc-pkg",["--version"])
/usr/bin/ghc-pkg is version 7.6.3
("/usr/bin/ghc",["--supported-languages"])
("/usr/bin/ghc",["--info"])
The package database already exists:
/Users/tibbe/src/containers/.cabal-sandbox/x86_64-osx-ghc-7.6.3-packages.conf.d
Reading available packages...
Reading installed packages...
("/usr/bin/ghc-pkg",["dump","--global","-v0"])
("/usr/bin/ghc-pkg",["dump","--package-db=/Users/tibbe/src/containers/.cabal-sandbox/x86_64-osx-ghc-7.6.3-packages.conf.d","-v0"])
("/usr/bin/ghc",["--print-libdir"])
Reading available packages...
Choosing modular solver.
Resolving dependencies...
[__0] trying: containers-0.5.5.1 (user goal)
[__1] trying: base-4.6.0.1/installed-6c3... (dependency of containers-0.5.5.1)
[__2] trying: rts-1.0/installedbuil... (dependency of
base-4.6.0.1/installed-6c3...)
[__3] trying: integer-gmp-0.5.0.0/installed-2f1... (dependency of
base-4.6.0.1/installed-6c3...)
[__4] rejecting: containers-0.5.5.1:!test (global constraint requires opposite
flag selection)
[__4] trying: containers-0.5.5.1:*test
[__5] next goal: ChasingBottoms (dependency of containers-0.5.5.1:*test)
[__5] rejecting: ChasingBottoms-1.3.0.7/installed-ebe... (conflict:
containers==0.5.5.1, ChasingBottoms => containers==0.5.0.0/installed-ab1...)
[__1] fail (backjumping, conflict set: ChasingBottoms, containers,
containers-0.5.5.1:test)
[__0] rejecting: containers-0.5.0.0/installed-ab1... (global constraint
requires ==0.5.5.1)
[__0] fail (backjumping, conflict set: ChasingBottoms, containers,
containers-0.5.5.1:test)
cabal: Could not resolve dependencies:
trying: containers-0.5.5.1 (user goal)
rejecting: containers-0.5.5.1:!test (global constraint requires opposite flag
selection)
trying: containers-0.5.5.1:*test
next goal: ChasingBottoms (dependency of containers-0.5.5.1:*test)
rejecting: ChasingBottoms-1.3.0.7/installed-ebe... (conflict:
containers==0.5.5.1, ChasingBottoms => containers==0.5.0.0/installed-ab1...)
Dependency tree exhaustively searched.

Here are the packages that are installed in the sandbox:

/Users/tibbe/src/containers/.cabal-sandbox/x86_64-osx-ghc-7.6.3-packages.conf.d
   Cabal-1.18.1.3
   ChasingBottoms-1.3.0.7
   ansi-terminal-0.6.1.1
   ansi-wl-pprint-0.6.7.1
   extensible-exceptions-0.1.1.4
   hostname-1.0
   test-framework-0.8.0.3
   test-framework-hunit-0.3.0.1
   test-framework-quickcheck2-0.3.0.3
   xml-1.3.13

@tibbe
Copy link
Member Author

tibbe commented Apr 23, 2014

Both the top-down and the modular solver has the issue, so it's likely due to how the solver is invoked.

@kosmikus
Copy link
Contributor

It would be enlightening to see the -v3 --dry-run output of 1.18 in comparison.

hvr added a commit to haskell/containers that referenced this issue Apr 23, 2014
This builds and tests containers with GHC 7.0, 7.4, 7.6, 7.8, and GHC HEAD

(Once haskell/cabal#1806 is fixed we can use CABALVER=1.20 w/ GHCVER=7.8.2)
@dcoutts
Copy link
Contributor

dcoutts commented Apr 23, 2014

It may be useful as a debug mechanism to add a way to dump the inputs to the solver. In this case we'd want to compare 1.18 with 1.20, but one can imagine other use cases (like why does freeze behave oddly, answer because we can see that we're passing the solver strange input).

@tibbe
Copy link
Member Author

tibbe commented Apr 23, 2014

@dcoutts I agree. I think I've asked for that feature a couple of days ago. Preferably we'd dump the constraints and preferences (separately) when -v3 is turned on.

@tibbe
Copy link
Member Author

tibbe commented Apr 23, 2014

Here's the, slightly cleaned up, output using @kosmikus's patch on HEAD (which should have the same behavior as 1.20):

Choosing modular solver.
Resolving dependencies...
targets: containers
constraints:
  base installed
  ghc-prim installed
  integer-gmp installed
  template-haskell installed
  flags containers
  stanzas containers test
  containers ==0.5.5.1
preferences:
  HSlippyMap <0.1.0.0 || >0.1.0.0 && <1.0 || >1.0 && <1.2 || >1.2 && <1.4 ||
  >1.4 && <1.6 || >1.6 && <1.8 || >1.8 && <2.0 || >2.0 && <2.1 || >2.1
  HTTP >=4000.2.5
  Spock >0.4.2.3
  atomic-primops <0.1.0.0 || >0.1.0.0 && <0.1.0.2 || >0.1.0.2 && <0.2.2 ||
  >0.2.2 && <0.2.2.1 || >0.2.2.1 && <0.3 || >0.3 && <0.4 || >0.4 && <0.5 || >0.5
  base-compat >=0.4.2
  base32-bytestring <0.2.0.0 || >0.2.0.0 && <0.2.0.1 || >0.2.0.1
  bencoding <0.2.1.0 || >0.2.1.0
  binary-conduit <1.2.1.1 || >1.2.1.1
  bindings-DSL <1.0.18 || >1.0.18
  blas >=0.7.6
  bugzilla <0.1.0.0 || >0.1.0.0
  cereal-plus <0.3.0 || >0.3.0
  clafer <0.3.5 || >0.3.5
  claferIG <0.3.5 || >0.3.5
  claferwiki <0.3.5 || >0.3.5
  conduit-extra <0.1.0 || >0.1.0 && <0.1.1 || >0.1.1 && <0.1.2 || >0.1.2 &&
  <0.1.3 || >0.1.3 && <0.1.4 || >0.1.4 && <0.1.5 || >0.1.5 && <0.1.6 || >0.1.6
  && <0.1.7 || >0.1.7 && <1.0.0 || >1.0.0
  cubical <0.1.1 || >0.1.1
  depends <0.0.0 || >0.0.0
  equational-reasoning <0.2.0.1 || >0.2.0.1
  free-game <0.2.0.0 || >0.2.0.0 && <0.9 || >0.9 && <0.9.2 || >0.9.2
  haskell-awk <1.0 || >1.0
  hasktags <0.68.3 || >0.68.3 && <0.68.4 || >0.68.4 && <0.68.5 || >0.68.5
  helm <0.1.0 || >0.1.0 && <0.2.0 || >0.2.0 && <0.3.0 || >0.3.0 && <0.3.1 ||
  >0.3.1 && <0.4 || >0.4
  heroku <0.1.1 || >0.1.1
  hspec >=1.8.1
  hspec-discover ==0.2.0
  hspec-expectations <0.4.0 || >0.4.0
  ihaskell <0.2.0.0 || >0.2.0.0 && <0.2.0.1 || >0.2.0.1 && <0.2.0.2 || >0.2.0.2
  && <0.2.0.3 || >0.2.0.3 && <0.2.0.4 || >0.2.0.4 && <0.2.0.5 || >0.2.0.5 &&
  <0.3.0.0 || >0.3.0.0
  imagemagick >=0.0.2
  inspection-proxy <0.1.0.0 || >0.1.0.0 && <0.1.0.1 || >0.1.0.1
  leankit-api <0.1 || >0.1 && <0.2 || >0.2 && <0.3 || >0.3
  lvish <1.0 || >1.0 && <1.0.0.2 || >1.0.0.2
  markup-preview <0.1.0.0 || >0.1.0.0 && <0.2 || >0.2
  mongodb-queue <0.4 || >0.4
  persistent <1.2.3.1 || >1.2.3.1
  persistent-mongoDB <1.3.0 || >1.3.0 && <1.3.1 || >1.3.1
  pipes-cereal-plus <0.3.0 || >0.3.0
  pipes-p2p <0.1 || >0.1 && <0.2 || >0.2
  pipes-p2p-examples <0.1 || >0.1 && <0.2 || >0.2
  pipes-parse <3.0.0 || >3.0.0
  postgresql-orm <0.2 || >0.2 && <0.2.1 || >0.2.1
  ref <0.1.0.0 || >0.1.0.0
  shelly <1.5 || >1.5
  sized-vector <1.3.1.0 || >1.3.1.0
  snap-utils <0.1.0 || >0.1.0 && <0.1.1 || >0.1.1
  soap >0.2.1
  stripe <0.3.0.1 || >0.3.0.1
  tasty-rerun >=1.1.0
  texmath <0.6.5.1 || >0.6.5.1
  thorn >=0.1.0.3
  twitter-conduit <0.0.1 || >0.0.1 && <0.0.2 || >0.0.2
  unsafely <0.1.0.0 || >0.1.0.0
  yocto >=1
strategy: PreferLatestForSelected
[__0] trying: containers-0.5.5.1 (user goal)
[__1] trying: base-4.7.0.0/installed-b1a... (dependency of containers-0.5.5.1)
[__2] trying: rts-1.0/installedbuil... (dependency of
base-4.7.0.0/installed-b1a...)
[__3] trying: integer-gmp-0.5.1.0/installed-557... (dependency of
base-4.7.0.0/installed-b1a...)
[__4] rejecting: containers-0.5.5.1:!test (global constraint requires opposite
flag selection)
[__4] trying: containers-0.5.5.1:*test
[__5] next goal: ChasingBottoms (dependency of containers-0.5.5.1:*test)
[__5] rejecting: ChasingBottoms-1.3.0.7/installed-82a... (package is broken)
[__0] fail (backjumping, conflict set: ChasingBottoms, containers,
containers-0.5.5.1:test)
cabal: Could not resolve dependencies:
trying: containers-0.5.5.1 (user goal)
rejecting: containers-0.5.5.1:!test (global constraint requires opposite flag
selection)
trying: containers-0.5.5.1:*test
next goal: ChasingBottoms (dependency of containers-0.5.5.1:*test)
rejecting: ChasingBottoms-1.3.0.7/installed-82a... (package is broken)
Dependency tree exhaustively searched.

"Dependency tree exhaustively searched." is the last line before cabal exits.

@tibbe
Copy link
Member Author

tibbe commented Apr 23, 2014

I've backported the debugging output to 1.18. Here's the result:

Reading available packages...
Choosing modular solver.
Resolving dependencies...
targets: containers
constraints:
  base installed
  ghc-prim installed
  flags containers
  stanzas containers test
  containers ==0.5.5.1
preferences:
  HSlippyMap <0.1.0.0 || >0.1.0.0 && <1.0 || >1.0 && <1.2 || >1.2 && <1.4 ||
  >1.4 && <1.6 || >1.6 && <1.8 || >1.8 && <2.0 || >2.0 && <2.1 || >2.1
  HTTP >=4000.2.5
  Spock >0.4.2.3
  atomic-primops <0.1.0.0 || >0.1.0.0 && <0.1.0.2 || >0.1.0.2 && <0.2.2 ||
  >0.2.2 && <0.2.2.1 || >0.2.2.1 && <0.3 || >0.3 && <0.4 || >0.4 && <0.5 || >0.5
  base-compat >=0.4.2
  base32-bytestring <0.2.0.0 || >0.2.0.0 && <0.2.0.1 || >0.2.0.1
  bencoding <0.2.1.0 || >0.2.1.0
  binary-conduit <1.2.1.1 || >1.2.1.1
  bindings-DSL <1.0.18 || >1.0.18
  blas >=0.7.6
  bugzilla <0.1.0.0 || >0.1.0.0
  cereal-plus <0.3.0 || >0.3.0
  clafer <0.3.5 || >0.3.5
  claferIG <0.3.5 || >0.3.5
  claferwiki <0.3.5 || >0.3.5
  conduit-extra <0.1.0 || >0.1.0 && <0.1.1 || >0.1.1 && <0.1.2 || >0.1.2 &&
  <0.1.3 || >0.1.3 && <0.1.4 || >0.1.4 && <0.1.5 || >0.1.5 && <0.1.6 || >0.1.6
  && <0.1.7 || >0.1.7 && <1.0.0 || >1.0.0
  cubical <0.1.1 || >0.1.1
  depends <0.0.0 || >0.0.0
  equational-reasoning <0.2.0.1 || >0.2.0.1
  free-game <0.2.0.0 || >0.2.0.0 && <0.9 || >0.9 && <0.9.2 || >0.9.2
  haskell-awk <1.0 || >1.0
  hasktags <0.68.3 || >0.68.3 && <0.68.4 || >0.68.4 && <0.68.5 || >0.68.5
  helm <0.1.0 || >0.1.0 && <0.2.0 || >0.2.0 && <0.3.0 || >0.3.0 && <0.3.1 ||
  >0.3.1 && <0.4 || >0.4
  heroku <0.1.1 || >0.1.1
  hspec >=1.8.1
  hspec-discover ==0.2.0
  hspec-expectations <0.4.0 || >0.4.0
  ihaskell <0.2.0.0 || >0.2.0.0 && <0.2.0.1 || >0.2.0.1 && <0.2.0.2 || >0.2.0.2
  && <0.2.0.3 || >0.2.0.3 && <0.2.0.4 || >0.2.0.4 && <0.2.0.5 || >0.2.0.5 &&
  <0.3.0.0 || >0.3.0.0
  imagemagick >=0.0.2
  inspection-proxy <0.1.0.0 || >0.1.0.0 && <0.1.0.1 || >0.1.0.1
  leankit-api <0.1 || >0.1 && <0.2 || >0.2 && <0.3 || >0.3
  lvish <1.0 || >1.0 && <1.0.0.2 || >1.0.0.2
  markup-preview <0.1.0.0 || >0.1.0.0 && <0.2 || >0.2
  mongodb-queue <0.4 || >0.4
  persistent <1.2.3.1 || >1.2.3.1
  persistent-mongoDB <1.3.0 || >1.3.0 && <1.3.1 || >1.3.1
  pipes-cereal-plus <0.3.0 || >0.3.0
  pipes-p2p <0.1 || >0.1 && <0.2 || >0.2
  pipes-p2p-examples <0.1 || >0.1 && <0.2 || >0.2
  pipes-parse <3.0.0 || >3.0.0
  postgresql-orm <0.2 || >0.2 && <0.2.1 || >0.2.1
  ref <0.1.0.0 || >0.1.0.0
  shelly <1.5 || >1.5
  sized-vector <1.3.1.0 || >1.3.1.0
  snap-utils <0.1.0 || >0.1.0 && <0.1.1 || >0.1.1
  soap >0.2.1
  stripe <0.3.0.1 || >0.3.0.1
  tasty-rerun >=1.1.0
  texmath <0.6.5.1 || >0.6.5.1
  thorn >=0.1.0.3
  twitter-conduit <0.0.1 || >0.0.1 && <0.0.2 || >0.0.2
  unsafely <0.1.0.0 || >0.1.0.0
  yocto >=1
strategy: PreferLatestForSelected
[__0] trying: containers-0.5.5.1 (user goal)
[__1] trying: base-4.7.0.0/installed-b1a... (dependency of containers-0.5.5.1)
[__2] trying: rts-1.0/installedbuil... (dependency of
base-4.7.0.0/installed-b1a...)
[__3] trying: integer-gmp-0.5.1.0/installed-557... (dependency of
base-4.7.0.0/installed-b1a...)
[__4] rejecting: containers-0.5.5.1:!test (global constraint requires opposite
flag selection)
[__4] trying: containers-0.5.5.1:*test
[__5] next goal: ChasingBottoms (dependency of containers-0.5.5.1:*test)
[__5] rejecting: ChasingBottoms-1.3.0.7/installed-82a... (package is broken)
[__0] fail (backjumping, conflict set: ChasingBottoms, containers,
containers-0.5.5.1:test)
Could not resolve dependencies:
trying: containers-0.5.5.1 (user goal)
rejecting: containers-0.5.5.1:!test (global constraint requires opposite flag
selection)
trying: containers-0.5.5.1:*test
next goal: ChasingBottoms (dependency of containers-0.5.5.1:*test)
rejecting: ChasingBottoms-1.3.0.7/installed-82a... (package is broken)
Dependency tree exhaustively searched.
Using internal setup method with build-type Simple and args:
["configure","--verbose=3","--ghc","--prefix=/usr/local/google/home/tibell/src/containers/.cabal-sandbox","--bindir=$prefix/bin","--libdir=$prefix/lib","--libsubdir=$arch-$os-$compiler/$pkgid","--libexecdir=$prefix/libexec","--datadir=$prefix/share","--datasubdir=$arch-$os-$compiler/$pkgid","--docdir=$datadir/doc/$arch-$os-$compiler/$pkgid","--htmldir=$docdir/html","--haddockdir=$htmldir","--sysconfdir=$prefix/etc","--enable-library-profiling","--global","--package-db=/usr/local/google/home/tibell/src/containers/.cabal-sandbox/x86_64-linux-ghc-7.8.1-packages.conf.d","--extra-prog-path=/usr/local/google/home/tibell/.cabal/bin","--enable-tests"]
Configuring containers-0.5.5.1...
creating dist
Searching for ghc in path.
Found ghc at /usr/local/bin/ghc
("/usr/local/bin/ghc",["--numeric-version"])
/usr/local/bin/ghc is version 7.8.1
looking for tool ghc-pkg near compiler in /usr/local/bin
found ghc-pkg in /usr/local/bin/ghc-pkg
("/usr/local/bin/ghc-pkg",["--version"])
/usr/local/bin/ghc-pkg is version 7.8.1
("/usr/local/bin/ghc",["--supported-languages"])
("/usr/local/bin/ghc",["--info"])
Reading installed packages...
("/usr/local/bin/ghc-pkg",["dump","--global","-v0"])
("/usr/local/bin/ghc-pkg",["dump","--package-db=/usr/local/google/home/tibell/src/containers/.cabal-sandbox/x86_64-linux-ghc-7.8.1-packages.conf.d","-v0"])
("/usr/local/bin/ghc",["--print-libdir"])
Dependency ChasingBottoms -any: using ChasingBottoms-1.3.0.7
Dependency HUnit -any: using HUnit-1.2.5.2
Dependency QuickCheck >=2.4.0.1: using QuickCheck-2.6
Dependency array -any: using array-0.5.0.0
Dependency base >=4.2 && <5: using base-4.7.0.0
Dependency deepseq >=1.2 && <1.4: using deepseq-1.3.0.2
Dependency ghc-prim -any: using ghc-prim-0.3.1.0
Dependency test-framework >=0.3.3: using test-framework-0.8.0.3
Dependency test-framework-hunit -any: using test-framework-hunit-0.3.0.1
Dependency test-framework-quickcheck2 >=0.2.9: using
test-framework-quickcheck2-0.3.0.3
...

So the difference is that in 1.18 we continued (and subsequently succeeded) after dependency resolution failed. In 1.20 we stop and thus fail.

@tibbe
Copy link
Member Author

tibbe commented Apr 23, 2014

The constraints output doesn't seem to be working, it doesn't contains any of the package's dependencies (and no dependencies of dependencies and so on.)

@kosmikus
Copy link
Contributor

Right. So the situation for the solver hasn't actually changed. There was a fallback for configure, which I personally think made sense. Why has it been removed?

For the dependency solver to work in this situation, we must either implement private dependencies, or relax some of the underlying assumptions in a different way.

If we had separate units, would it then just work? We'd install the new containers first, then build ChasingBottoms and whatever based on the new containers, and only then build the test suite for containers?

@23Skidoo
Copy link
Member

I think that this was caused by #1565.
A workaround is to use runhaskell Setup.hs configure.

@tibbe
Copy link
Member Author

tibbe commented Apr 24, 2014

@kosmikus I think it would just work if we had separate units. In this case the test suite doesn't even depend on the library (instead it just uses the same source dir), so with separate units we'd have test-suite -> ChasingBottoms -> containers.

@23Skidoo I think we should, reluctantly, revert #1565 (unless it can be fixed somehow.) The cost of having none of our core libraries' test suites not work is too high.

@kosmikus
Copy link
Contributor

Another option might be to allow a third solver called "dumb" that does what configure used to do when the solver failed.

@23Skidoo
Copy link
Member

Let's revert it in the 1.20 branch and try to come up with a better fix for 1.22.

@tibbe
Copy link
Member Author

tibbe commented Apr 24, 2014

Agreed.
On Apr 24, 2014 7:12 PM, "Mikhail Glushenkov" [email protected]
wrote:

Let's revert it in the 1.20 branch and try to come up with a better fix
for 1.22.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1806#issuecomment-41306570
.

@tibbe
Copy link
Member Author

tibbe commented May 2, 2014

Fixed in 8dd4441 on the 1.20 branch. Since the 1.20 branch will eventually be merged back into master again this means that if we do nothing we'll eventually revert to the old behavior in 1.22.

@tibbe tibbe closed this as completed May 2, 2014
hvr added a commit to haskell/containers that referenced this issue May 3, 2014
...hoping that haskell/cabal#1806 has been resolved for good
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants