You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
containers test suite no longer builds with 1.20 #1806
$ 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.
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).
@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.
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.)
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?
@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.
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
.
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.
Activity
tibbe commentedon Apr 23, 2014
Here are the
-v3output:Here are the packages that are installed in the sandbox:
tibbe commentedon 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 commentedon Apr 23, 2014
It would be enlightening to see the
-v3 --dry-runoutput of 1.18 in comparison.Add Travis-CI job control file
dcoutts commentedon 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 commentedon 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
-v3is turned on.tibbe commentedon 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):
"Dependency tree exhaustively searched." is the last line before cabal exits.
tibbe commentedon Apr 23, 2014
I've backported the debugging output to 1.18. Here's the result:
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 commentedon 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 commentedon Apr 23, 2014
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
ChasingBottomsand whatever based on the new containers, and only then build the test suite forcontainers?23Skidoo commentedon Apr 23, 2014
I think that this was caused by #1565.
A workaround is to use
runhaskell Setup.hs configure.tibbe commentedon 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 commentedon Apr 24, 2014
Another option might be to allow a third solver called "dumb" that does what configure used to do when the solver failed.
23Skidoo commentedon Apr 24, 2014
Let's revert it in the 1.20 branch and try to come up with a better fix for 1.22.
tibbe commentedon Apr 24, 2014
Agreed.
On Apr 24, 2014 7:12 PM, "Mikhail Glushenkov" [email protected]
wrote:
tibbe commentedon 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.
Try to use CABALVER=1.20 again