ekmett / transformers-compat

transformers compatibility shim
Other
10 stars 12 forks source link

transformers-compat-0.3.3.4 incompatible with transformers-0.3.0.0 from latest HP #5

Closed Blaisorblade closed 8 years ago

Blaisorblade commented 10 years ago

I'm working around ekmett/lens#458 by installing transformers-compat, but the latest version refuses to install, unless I manually provide -f three:

$ cabal install -v --dry-run --one-shot transformers-compat-0.3.3.4 -f three
Reading available packages...
Choosing modular solver.
Resolving dependencies...
In order, the following would be installed:
transformers-compat-0.3.3.4 +three (new version)

I've later found this is documented in https://github.com/ekmett/transformers-compat/commit/v0.3.3.4, but that seems a bit too little. Also, that's not the default behavior I get:

$ cabal install -v --dry-run --one-shot transformers-compat
Reading available packages...
Choosing modular solver.
Resolving dependencies...
In order, the following would be installed:
transformers-0.4.1.0 (new version)
transformers-compat-0.3.3.4 (new version)
$ cabal install -v --dry-run --one-shot transformers-compat-0.3.3.4 transformers-0.3.0.0
Reading available packages...
Choosing modular solver.
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: transformers-compat-0.3.3.4 (user goal)
next goal: transformers (user goal)
rejecting: transformers-0.4.1.0 (global constraint requires ==0.3.0.0)
rejecting: transformers-0.3.0.0/installed-ff2..., 0.3.0.0 (conflict:
transformers-compat-0.3.3.4:three => transformers>=0.4.1 && <0.5)
rejecting: transformers-0.2.2.1, 0.2.2.0, 0.2.1.0, 0.2.0.0, 0.1.4.0, 0.1.3.0,
0.1.1.0, 0.1.0.1, 0.1.0.0, 0.0.1.0, 0.0.0.0, 0.4.0.0 (global constraint
requires ==0.3.0.0)
Dependency tree exhaustively searched.
$ cabal install -v --dry-run --one-shot transformers-compat transformers-0.3.0.0
Reading available packages...
Choosing modular solver.
Resolving dependencies...
In order, the following would be installed:
transformers-compat-0.3.3.3 (latest: 0.3.3.4) (new version)
robertmassaioli commented 10 years ago

Ran into this problem temporarily. Including some other dependencies made the problem go away but not sure why. But this is a pretty annoying problem when it happens.

benkolera commented 9 years ago

@robertmassaioli

FWIW, I just hit this issue because I had other dependency problems which seemed to confuse the solver into thinking that it was transformers-compat & transformers that were breaking things.

I installed transformers-compat with -f three and resolved my other conflicts. After everything built successfully I deleted and initialised the sandbox and everything installed just fine without passing the flag to transformers-compat.

It's annoying that this error comes up as a red-herring, but it's nice to know that it doesn't break a package with a sane dependency set. :)

pthariensflame commented 9 years ago

Running into this problem with GHC 7.8.4 and the transformers installed as part of it. Glad I found this thread, but it should probably be documented somewhere more prominent.

Blaisorblade commented 9 years ago

A relevant discussion might be the following one — if you still have this issue, please document the version of cabal-install you're using, since apparently transformers-compat runs into cabal completeness bugs when constructing the build plan (I'm confused whether the bugs only happen without --reorder-goals): https://github.com/haskell/cabal/issues/1855#issuecomment-43503323 https://github.com/haskell/cabal/issues/1855#issuecomment-50594924

RyanGlScott commented 8 years ago

Indeed, this is simply a cabal-install issue. As https://github.com/haskell/cabal/issues/1855#issuecomment-50594924 notes, modern cabal-install (version 1.22 and up) shouldn't have this problem, and if you're using an older version, you should be using the 1.20.0.3 or 1.18.0.5 patch releases.

I don't know what transformers-compat can do about this, so I'll close this issue.