-
Notifications
You must be signed in to change notification settings - Fork 843
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
"Cannot satisfy" errors when copying precompiled packages with custom snapshots #1103
Comments
Forgot to note: the version of things I'm using:
|
Can you provide a test case with a minimalist custom snapshot that can trigger this behavior? |
No, sadly I can't seem to. I've tried to reproduce in a test package which depends on aeson, and switching from one snapshot to another, but that just worked (it didn't copy the precompiled thing, since the transitive deps were different). I couldn't even reproduce it when compiling only part of our app, only when compiling the whole thing from scratch (all 360 packages, which takes a long time). What I'm doing is:
In the output I see it rebuilding |
It's based on installed package ID. This could be a result of a truly annoying Cabal bug that results in duplicated installed package IDs despite different inputs, see: Can you see if you have two identical package IDs for any of the packages involved (likely |
Not for vector, this was the first thing I looked at (see above). Primitive has actual different versions, so I doubt that one is the culprit. I've since wiped the snapshots again and restored the old state, to be able to continue working. Is there any other package I should check? I'll perhaps be able to do more testing tonight. |
I can't think of anything in particular. If you can repro and then check On Tue, Oct 6, 2015, 4:27 PM Erik Hesselink [email protected]
|
I've checked all the package ids of aeson and its (transitive) dependencies. All of them are the same, except for I still don't quite understand what's going on. I see stack installing For completeness, here's the package info:
|
I've finally got a reproduction! To reproduce:
This should fail when installing
|
Thanks, the repro triggers the problem for me. The issue seems to be with mwc-random. Still investigating. |
OK, I've found the problem. It's specifically related to Cabal 1.18; upgrading to Cabal 1.22 would work around it. The issue is that we're checking the configure options for the precompiled cache, but I forgot that - in Cabal 1.18 - the configure options don't give the installed package ID. Fix should be simple, though I'll have to be careful to avoid invalidating caches for Cabal 1.22. |
OK, I think this should be fixed on master, can you check? And thanks for the repro, I wouldn't have been able to figure this out otherwise. |
Yes, that fixed it for me, both for the repro case and for our actual code base. Thanks! |
We have custom snapshots that we treat as immutable and rename when upgrading. Stack sees that packages are the same and copies precompiled versions. However, this seems to lead to errors like this:
This makes sense, because the hash for vector in this sandbox is different:
It turns out the hash is from the previous snapshot:
This is after I completely wiped by
~/.stack
and all.stack-work
directories in the project. I can reproduce by unregistering all the packagesstack exec -- ghc-pkg check
reports as broken, and trying again: it copies the package again, and gives the same error.The text was updated successfully, but these errors were encountered: