ekmett / transformers-compat

transformers compatibility shim
Other
10 stars 12 forks source link

0.6 release of transformers-compat overwhelms cabal? #34

Closed nomeata closed 6 years ago

nomeata commented 6 years ago

Since transformers-compat-0.6.* was uploaded to Hackage, one of my projects fails to build for users on Ubuntu 16/04 (GHC 7.10), as reported on Github and confirmed by Travis (The Travis build built fine a month ago.):

cabal: Could not resolve dependencies:
trying: tttool-1.8 (user goal)
trying: base-4.8.0.0/installed-1b6... (dependency of tttool-1.8)
trying: blaze-svg-0.3.6.1 (dependency of tttool-1.8)
trying: blaze-markup-0.8.2.0 (dependency of blaze-svg-0.3.6.1)
trying: blaze-builder-0.4.1.0 (dependency of blaze-markup-0.8.2.0)
trying: semigroups-0.18.4 (dependency of blaze-builder-0.4.1.0)
trying: semigroups-0.18.4:+transformers
trying: transformers-compat-0.6.0.6 (dependency of
semigroups-0.18.4:+transformers)
next goal: transformers (dependency of semigroups-0.18.4:+transformers)
rejecting: transformers-0.4.2.0/installed-c1a... (conflict: transformers-compat-0.6.0.6:four => transformers>=0.5.3 && <0.6)
trying: transformers-0.5.5.0
trying: semigroups-0.18.4:+hashable
trying: semigroups-0.18.4:+unordered-containers
trying: semigroups-0.18.4:+text
trying: semigroups-0.18.4:+tagged
trying: semigroups-0.18.4:+deepseq
trying: semigroups-0.18.4:+containers
trying: semigroups-0.18.4:+bytestring
trying: semigroups-0.18.4:+binary
trying: yaml-0.8.28 (dependency of tttool-1.8)
next goal: resourcet (dependency of yaml-0.8.28)
rejecting: resourcet-1.2.0 (conflict: base==4.8.0.0/installed-1b6..., resourcet => base>=4.9 && <5) rejecting: resourcet-1.1.11, 1.1.10, 1.1.9, 1.1.8.1, 1.1.8, 1.1.7.5, 1.1.7.4, 1.1.7.3, 1.1.7.2 (conflict:  transformers-compat==0.6.0.6, resourcet => transformers-compat>=0.3 && <0.6)
rejecting: resourcet-1.1.7.1, 1.1.7, 1.1.6, 1.1.5, 1.1.4.1, 1.1.4, 1.1.3.3, 1.1.3.2, 1.1.3.1, 1.1.3, 1.1.2.3, 1.1.2.2 (conflict: transformers==0.5.5.0, resourcet => transformers>=0.2.2 && <0.5)
rejecting: resourcet-1.1.2.1, 1.1.2, 1.1.1, 1.1.0.1, 1.1.0, 0.4.10.2, 0.4.10.1, 0.4.10, 0.4.9, 0.4.8, 0.4.7.2, 0.4.7.1 (conflict: transformers==0.5.5.0, resourcet => transformers>=0.2.2 && <0.4)
rejecting: resourcet-0.4.7, 0.4.6, 0.4.5, 0.4.4, 0.4.3, 0.4.2, 0.4.1, 0.4.0.2 (conflict: base==4.8.0.0/installed-1b6..., resourcet => base>=4.3 && <4.7)
rejecting: resourcet-0.4.0.1, 0.4.0, 0.3.3.1, 0.3.3, 0.3.2.2, 0.3.2.1, 0.3.2 (conflict: transformers==0.5.5.0, resourcet => transformers>=0.2.2 && <0.4)
rejecting: resourcet-0.3.1, 0.3.0 (conflict: transformers==0.5.5.0, resourcet => transformers>=0.2.2 && <0.3)
Backjump limit reached (change with --max-backjumps).

Avoiding transformers-compat-0.6 with cabal install --constraint 'transformers-compat <0.6' works.

Is there anything that transformers-compat can do about this?

RyanGlScott commented 6 years ago

Weirdly enough, I can't reproduce this with a fresh GHC 7.10 installation:

$ cabal --version
cabal-install version 2.2.0.0
compiled using version 2.2.0.0 of the Cabal library
$ cabal install tttool -w /opt/ghc/7.10.3/bin/ghc --dry
Resolving dependencies...
In order, the following would be installed (use -v for more details):
base-compat-0.9.3
base64-bytestring-1.0.0.1
colour-2.3.3 (latest: 2.3.4)
dlist-0.8.0.4
executable-path-0.0.3.1
fail-4.9.0.0
generic-deriving-1.12.1
integer-logarithms-1.0.2.1
mtl-2.2.2
primitive-0.6.3.0
random-1.1
safe-0.3.17
split-0.2.3.3
stm-2.4.5.0
text-1.2.3.0
th-abstraction-0.2.6.0
time-locale-compat-0.1.1.3
unexceptionalio-0.3.0
zlib-0.6.2
ansi-terminal-0.8.0.2
transformers-compat-0.6.0.4 (latest: 0.6.0.6)
hashable-1.2.7.0
transformers-base-0.4.4
tagged-0.8.5
mmorph-1.1.1
exceptions-0.10.0
uuid-types-1.0.3
unordered-containers-0.2.9.0
scientific-0.3.5.3
monad-control-1.0.2.3
errors-2.2.5
semigroups-0.18.4
lifted-base-0.2.3.12
vector-0.12.0.1
parsec-3.1.13.0
blaze-builder-0.4.1.0
attoparsec-0.13.2.2
ansi-wl-pprint-0.6.8.2
resourcet-1.1.3.3 (latest: 1.2.0)
spool-0.1
JuicyPixels-3.2.9.5
HPDF-1.4.10
natural-sort-0.1.2
blaze-markup-0.8.2.0
aeson-1.2.4.0 (latest: 1.3.0.0)
optparse-applicative-0.14.2.0
conduit-1.2.13.1 (latest: 1.3.0.2)
blaze-svg-0.3.6.1
yaml-0.8.28
tttool-1.8

It's entirely possible that old versions of cabal-install aren't as adept at constraint solving, though. (I'm not sure what version is being used here.)

RyanGlScott commented 6 years ago

Ah, I just saw that the Travis build is using cabal-install-1.22. I tried using that, and now I can reproduce the bug.

Alas, I don't have a concrete workaround to suggest other than installing a newer version of cabal-install. Anecdotally, cabal-install-2.0 and later seem to work for me.

nomeata commented 6 years ago

Thanks, that’s useful to know, although still prevents users from that version of Ubuntu to easily install tttool. I guess I have to tell them to use cabal install cabal; ~/.cabal/bin/cabal install tttool. Or maybe increase --max-backjumps.

RyanGlScott commented 6 years ago

To be clear—I haven't the foggiest idea of what aspect of transformers-compat-0.6 in particular is giving old cabal-installs such a fit. After all, transformers-compat has always made heavy use of Cabal flags (ironically enough, to work around other cabal-install constraint solver bugs), so you're damned if you do, and damned if you don't :)

I agree that recommending cabal install cabal-install is likely the most sensible approach.

RyanGlScott commented 6 years ago

Good news: the transformers-compat-0.6.2 uses a different flag setup that no longer confuses cabal-install-1.22's constraint solver when using GHC 7.10.3:

$ /opt/cabal/1.22/bin/cabal install tttool -w /opt/ghc/7.10.3/bin/ghc --dry
Resolving dependencies...
In order, the following would be installed (use -v for more details):
base-compat-0.9.3 (latest: 0.10.1)
base-orphans-0.7
base64-bytestring-1.0.0.1
colour-2.3.3 (latest: 2.3.4)
ansi-terminal-0.8.0.4
dlist-0.8.0.4
executable-path-0.0.3.1
fail-4.9.0.0
generic-deriving-1.12.1
integer-logarithms-1.0.2.1
mtl-2.2.2
primitive-0.6.3.0
random-1.1
safe-0.3.17
split-0.2.3.3
stm-2.4.5.0
text-1.2.3.0
hashable-1.2.7.0
scientific-0.3.6.2
th-abstraction-0.2.6.0
time-locale-compat-0.1.1.4
transformers-compat-0.6.2
exceptions-0.10.0
errors-2.3.0
mmorph-1.1.2
tagged-0.8.5
transformers-base-0.4.5.2
monad-control-1.0.2.3
lifted-base-0.2.3.12
unliftio-core-0.1.1.0
resourcet-1.1.11 (latest: 1.2.1)
unordered-containers-0.2.9.0
semigroups-0.18.4
ansi-wl-pprint-0.6.8.2
attoparsec-0.13.2.2
blaze-builder-0.4.1.0
blaze-markup-0.8.2.1
blaze-svg-0.3.6.1
conduit-1.2.13.1 (latest: 1.3.0.2)
optparse-applicative-0.14.2.0
parsec-3.1.13.0
natural-sort-0.1.2
uuid-types-1.0.3
vector-0.12.0.1
aeson-1.2.4.0 (latest: 1.3.1.1)
spool-0.1
yaml-0.8.30
zlib-0.6.2
HPDF-1.4.10
JuicyPixels-3.2.9.5
tttool-1.8

I'll go ahead and close this.