-
Notifications
You must be signed in to change notification settings - Fork 320
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-install problems on GHC 7.8 #177
Comments
Proposed fix for haskell#177. This does have the downside that it would immediately require text-1.1, which might cause for some people committed to older versions of the Haskell Platform.
I just got here, after I had to install
to keep it from downgrading (PS: see also haskell/text#67) |
Right, the aeson package specifies:
so indeed, the solver is going to try if at all possible to respect that flag default and try to use The problem here is that we are using flags for a purpose that they were not really designed for, but we don't currently have a better way to express. The heurisitcs for flags work fine for things that we really think of as flags (like "try to add tls support if possible, don't bail out just because they don't have the tls package installed currently"), but the heuristics on how hard you should try don't work well for things like "if we're using bytestring >= 10.4 then we also need text >= 1.1". I have thought about adding a new construct like:
which would act like:
But the heuristic in the solver would be different. It wouldn't try as hard to make the flag go one way or the other. As things stand however, that's the behaviour and so the best thing to do in the short term is to change the aeson package. |
I've pushed an experimental change to the solver to my cabal-install fork: kosmikus/cabal@814e493 I think it might fix the original issue mentioned here. However, I haven't done proper testing yet. It might well not solve other similar issues, or cause regressions for other dependency resolution problems. |
For those tuning in from home, this is a little blocked on a fix from @lpsmith that unfortunately doesn't yet work with modern Cabal. |
@kosmikus is this fork on top of the current 1.19 branch? If so i'll try it (been wanting to try out that use newest flag) |
@cartazio It's on top of the master branch, if that's what you mean. But I'd expect the patch to be easy to cherry-pick into another branch as well. |
i'll have a look see later this week. buried with other stuff :( |
Well, in all fairness, it depends on your definition of "modern" cabal. |
Just dropping a note that this is still affecting people on the release version of GHC 7.8.1. |
Everyone on 7.8.1 is advised to upgrade to 7.8.2. There was a nasty bug in On Monday, April 14, 2014, NoMethodError [email protected] wrote:
|
This continues to be a problem with GHC 7.8 and cabal-install 1.20, and I'm afraid I still have not much of an idea how to resolve it. One possibility that I'm considering is writing a custom |
Yesterday, @tibbe uploaded new versions of |
Proposed fix for #177. This does have the downside that it would immediately require text-1.1, which might cause for some people committed to older versions of the Haskell Platform.
Aeson 0.7 doesn't cabal-install properly on GHC 7.8. Here I'm trying to install aeson with a package database populated only with default libraries:
The problem is that the dependency solver is doing too much work keeping the
new-bytestring-builder
flag set toFalse
, and installing an older copy ofbytestring
(which tends to cause a whole host of other problems). This is solvable by manually setting the flags appropriately, but still creates difficulty for many users.One possible solution would be to add a dependency on the
bytestring-builder
package, which compiles on GHC-6.12 and onwards, providing the new bytestring builder in a convenient package for older GHCs without upgrading bytestring itself. (bytestring-builder
will compile as an empty package when compiled against newer versions of bytestring, if you've upgraded bytestring on an older ghc.) Then you could get rid of thenew-bytestring-builder
andblaze-builder
flags altogether.You may want to hide this dependency behind an
if impl(ghc < 7.8)
conditional, to avoid the need of including thebytestring-builder
compatibility package along with the Haskell Platform. This assumes that anybody usingGHC-7.8
or later would also be usingbytestring-0.10.4
or later, which should be a safe assumption.The text was updated successfully, but these errors were encountered: