Skip to content

Solver gives bad error when inplace package version incompatible with other inplace package version #4403

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
ezyang opened this issue Mar 20, 2017 · 2 comments

Comments

@ezyang
Copy link
Contributor

ezyang commented Mar 20, 2017

Steps to repro:

  1. I had a local copy of hackage-server, which has a fixed dependency Cabal == 1.24.*
  2. I added a dev copy of Cabal (2.1.x) to my Nix project
  3. I ran the solver:
hackage@back-hackage:~/hackage-server$ cabal new-build -j                                      
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: directory-1.3.0.0/installed-1.3... (dependency of Cabal-2.1.0.0)
trying: hackage-server-0.5.1 (user goal)
trying: hackage-server-0.5.1:-build-hackage-import
trying: hackage-server-0.5.1:+build-hackage-build
trying: hackage-server-0.5.1:+build-hackage-mirror
rejecting: hackage-server-0.5.1:+build-hackage-server (conflict:
directory==1.3.0.0/installed-1.3..., hackage-server-0.5.1:build-hackage-server
=> directory>=1.0 && <1.3)
rejecting: hackage-server-0.5.1:-build-hackage-server (manual flag can only be
changed explicitly)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: hackage-server-0.5.1:flag, Cabal,
hackage-server

I don't know why it's complaining about directory. I verified that changing the bound in hackage-server solved the problem. This is probably just the "solver rejects reasonable plan early, but then doesn't emit it on default verbosity".

@grayjay
Copy link
Collaborator

grayjay commented Mar 20, 2017

I think this is #941 (The solver only prints the message from the first conflict, even if it isn't relevant). Another sign that the message about directory is irrelevant is that directory isn't contained in the final conflict set, on the last line. I think that my suggestion in #941 (comment) would also work here, because the conflict set is so small.

@ezyang
Copy link
Contributor Author

ezyang commented Mar 22, 2017

Yes! And I thought this seemed familiar to me, because I had recently reported another iteration of this #4139 and forgotten I had done so. Too bad closed tickets don't show up on search. I'll close this one too.

@ezyang ezyang closed this as completed Mar 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants