-
Notifications
You must be signed in to change notification settings - Fork 696
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
Cabal-1.22.6.0 incompatible with binary-0.8 #3003
Comments
you can install |
@phadej it's a problem though as it breaks as soon as any install-plan automatically results in an (re)installation of |
Btw, adding
and adding |
@hvr, I'm not sure if reinstallation of Which OTOH might be good enough? |
With the new I hope you're right and this problem won't occur so much for users, but if it does, users will just have yet another complaint about cabal, and no amount of downplaying is gonna resolve that... :-( At the very least, we need to find a way to make this work properly with cabal 1.24+ if we can't fix this for pre-1.24 cabal |
I'm ok, with
for yet another release, if we really need |
@phadej are you sure that works? I.e. if I do something like
I run into the very same build-failure, because version constraints don't apply to |
@hvr, what if the |
Once you can use We would only need to reject |
Extreme solution, would to have |
Yet, the problem will probably still exist if user has both |
The analysis in this bug is incomplete. The problem is that 1.22 and prior release of Cabal had "build-type: Custom", which causes GHC to first try to build the Setup executable with "ghc --make" (using the default database) before actually building it proper. Prior to setup dependencies, no dependencies were specified for this call, which is why binary-0.8 is automatically being picked when this occurs. First, this should NOT be a problem with Cabal HEAD, because we have removed the self-bootstrapping behavior (build-type: Simple), so we should never attempt to build Cabal with the default package database. The normal build of Cabal will properly have version macros specified, so no problems there. Second, hvr's setup-depends solution WILL work (if we want bootstrapping), we just need to fix the Distribution.Simple.Utils to test for the availability of Paths_Cabal differently. Right now, it assumes that the presence of a version macro means that Paths_Cabal is available; in fact, with GHC 8.0, this will no longer be the case. This should be fixed. Third, constraints will do no good without setup-depends, so @phadej's proposed solution will not work. If our problem is that the cabal-install dependency solver will accidentally try to build old versions of Cabal when the new DB doesn't work, then there is a simple solution: we should make emergency new releases of the old release series of Cabal with "build-type: Custom" turned off, as far as possible. Assuming cabal-install prefers the latest version and no one has set patch level constraints, it will pick a version that will compile. One possible problem is that the self-bootstrapping behavior was necessary to build Cabal. In that case, if your cabal-install is too old and you try to install a new Cabal, it won't work. |
To summarise, to solve this we can either:
@ezyang says the following about the latter solution:
I think that this can only be the case when So unless someone objects, I think I'll just disable bootstrapping in the 1.22 branch (and maybe also 1.20 and 1.18). /cc @dcoutts |
Fwiw, we don't need to bump However, setting |
@hvr, your message seems to be clipped |
fixed =) |
I think Hackage itself does a correctness check on upload, though that can probably also be circumvented. |
Switched the 1.22, 1.20 and 1.18 branches to |
The problem is special casing in |
ok, but this won't be an issue for future |
Yes, I removed that special casing in |
NB: the move of the source directories breaks GHC's build system. I think you need this patch:
There is still something deeply dodgy going on here but I'm not sure what it is. |
@23Skidoo Re #3003 (comment), let me clarify this some more, because the rabbit hole goes deeper. Prior to 03b02fb, The PROBLEM is that every version of Cabal (including HEAD, but we'll get to that in a moment) has a bug, which is that it does NOT correctly set the To add INSULT to injury, the resulting Setup script is cached, which means that (1) if there was a GOOD cached setup script, then you would not see this behavior, and (2) if you poison your cache with a bad setup script, then you will perpetually see bad behavior until you blow away your setup cache (in practice, your OK, so what's going on with HEAD? Johann ended the nonsense in the case of What's the moral of the story. It seems to me that making it easy for users to bootstrap to a new version of Cabal/cabal-install that is not buggy is more important than ensuring old versions of Cabal build in the presence of a exposed
Honestly, I kind of like option (1) now. |
Continuation based on discussion with @hvr on IRC: proposal (1) is incomplete, since we still need What should this |
But this only matters in the case of
Correct me if I'm wrong, but with this change the only way cache can be poisoned is when compiling a version of Cabal that has |
To summarise the current situation. Let's say that the user has Cabal-1.18 installed and runs
|
OK, so there is a subtlety here regarding whether or not the cache is poisoned in the second column of your table. In the
Quite the opposite: cabal-install only attempts to globally cache the Setup script when it's NOT It is certainly true that |
OK, I think we agree that for Then if we revert the
So we won't have to worry about cache poisoning and the "unrecognized options" error. And we can tell people running into the |
Just to be totally clear, this workaround only helps for the Another problem with the |
Yep, and given that we now have new Cabal releases with |
See #3003 (comment). (cherry picked from commit b453d30)
See #3003 (comment). (cherry picked from commit b453d30)
See #3003 (comment). (cherry picked from commit b453d30)
Reverted the |
I've released cabal-install 1.22.8.0, 1.20.2.0 and 1.18.2.0, so I'll close this issue. |
Thanks to everyone involved! |
Here's what happens if you have
binary-0.8
installed (this was with GHC 7.10.3):The text was updated successfully, but these errors were encountered: