Dependency conflict for yesod-platform-1.2.10 #742

Closed
mietek opened this Issue May 17, 2014 · 19 comments

Projects

None yet

4 participants

@mietek
mietek commented May 17, 2014

Installing alex and happy is required to install yesod-platform. yesod-platform-1.2.10 conflicts with one of the dependencies pulled in by alex-3.1.3 and happy-1.19.3.

Unfortunately, it is not possible to specify alex and happy as dependencies in yesod-platform.cabal, because Cabal does not manage executable-only packages properly:

  • Listing executable-only packages in build-tools causes Cabal to expect the executables to be installed, but not to install the packages. (cabal#220)
  • Listing executable-only packages in build-depends causes Cabal to install the packages, and to fail to recognise the packages have been installed. (cabal#779)

To reproduce, start with ghc-7.8.2 and cabal-install-1.20.0.1:

$ mkdir /tmp/yesod-platform-test

$ cd /tmp/yesod-platform-test

$ cabal sandbox init
Writing a default package environment file to
/private/tmp/yesod-platform-test/cabal.sandbox.config
Creating a new sandbox at /private/tmp/yesod-platform-test/.cabal-sandbox

$ cabal update
Downloading the latest package list from hackage.haskell.org

$ cabal install alex happy
Resolving dependencies...
Notice: installing into a sandbox located at
/private/tmp/yesod-platform-test/.cabal-sandbox
...
Installed happy-1.19.3
Installed alex-3.1.3

$ cabal install yesod-platform-1.2.10
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: primitive-0.5.3.0/installed-488... (user goal)
next goal: yesod-platform (user goal)
rejecting: yesod-platform-1.2.10 (conflict:
primitive==0.5.3.0/installed-488..., yesod-platform => primitive==0.5.2.1)
rejecting: yesod-platform-1.2.9.3, 1.2.9.1, 1.2.9, 1.2.8.2, 1.2.8.1, 1.2.8,
1.2.7.2, 1.2.7.1, 1.2.7, 1.2.6.1, 1.2.6, 1.2.5.3, 1.2.5.2, 1.2.5.1, 1.2.5,
1.2.4.4, 1.2.4.3, 1.2.4.2, 1.2.4.1, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0.1,
1.2.0, 1.1.9.2, 1.1.9.1, 1.1.9, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, 1.1.6.1,
1.1.6, 1.1.5, 1.1.4.1, 1.1.4, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.6.1, 1.0.6,
1.0.5, 1.0.4.2, 1.0.4.1, 1.0.4, 1.0.3.4, 1.0.3.3, 1.0.3.2, 1.0.2, 1.0.1,
1.0.0, 0.10.3, 0.10.2 (global constraint requires ==1.2.10)
Dependency tree exhaustively searched.
@pbrisbin
Member

Just curious -- what if you install alex, happy, and yesod-platform altogether in one invocation?

@mietek
mietek commented May 17, 2014

Installing them in one invocation does work:

$ cabal install alex happy yesod-platform-1.2.10 --dry-run
Resolving dependencies...
In order, the following would be installed (use -v for more details):
...
happy-1.19.3
...
primitive-0.5.2.1 (latest: 0.5.3.0)
...
alex-3.1.3
...
yesod-platform-1.2.10

Unfortunately, requiring these three packages to be installed in one invocation complicates automatic deployment of Yesod web applications.

@pbrisbin
Member

I guess my next question is then why does yesod-platform not just specify happy/alex as dependencies so that cabal install yesod-platform is all that's required.

@mietek
mietek commented May 17, 2014

As above, alex and happy are executable-only packages, which confuse Cabal.

@pbrisbin
Member

Ah, I see. Apologies for missing that.

@mietek
mietek commented May 17, 2014

No problem. I have now updated the issue description to improve clarity.

@snoyberg
Member

What happens if you follow the recommended invocation from the quickstart guide:

cabal install yesod-platform yesod-bin --max-backjumps=-1 --reorder-goals
@mietek
mietek commented May 18, 2014

When starting with ghc-7.8.2 and cabal-install-1.20.0.1, the recommended invocation fails, because language-javascript-0.5.12 requires alex and happy, which are not included with ghc, only with the Haskell Platform.

$ cabal install yesod-platform yesod-bin --max-backjumps=-1 --reorder-goals
Resolving dependencies...
Notice: installing into a sandbox located at
/private/tmp/hello-yesod-platform/.cabal-sandbox
...
Failed to install language-javascript-0.5.12
Last 10 lines of the build log ( /private/tmp/hello-yesod-platform/.cabal-sandbox/logs/language-javascript-0.5.12.log ):
Configuring language-javascript-0.5.12...
setup-Simple-Cabal-1.18.1.3-x86_64-osx-ghc-7.8.2: The program happy version
>=1.18.5 is required but it could not be found.
...
cabal: Error: some packages failed to install:
hjsmin-0.1.4.6 depends on language-javascript-0.5.12 which failed to install.
language-javascript-0.5.12 failed during the configure step. The exception
was:
ExitFailure 1
yesod-platform-1.2.10 depends on language-javascript-0.5.12 which failed to
install.
yesod-static-1.2.2.5 depends on language-javascript-0.5.12 which failed to
install.
@snoyberg
Member

What I mean is: after installing happy and alex, what happens if you use the normal invocation?

@mietek
mietek commented May 19, 2014

Then, depending on the value of avoid-reinstalls, Cabal either installs yesod-platform-1.2.9.3, or installs primitive-0.5.2.1, reinstalls tf-random-0.5 (to switch from depending on primitive-0.5.3.0 to primitive-0.5.2.1) and installs yesod-platform-1.2.10.

@snoyberg
Member

In that case, I'm not sure what else we can do in the Yesod world for this.

@mietek
mietek commented May 19, 2014

yesod-platform-1.2.10 has a constraint on primitive-0.5.2.1. Why not update this constraint to primitive-0.5.3.0, which is the version pulled in by installing alex-3.1.3?

In general, why not keep the constraints in yesod-platform always in sync with constraints resulting from installing the two executable-only packages needed to build yesod-platform?

@snoyberg
Member

Because the goal of yesod-platform is to give a stable set of packages known to work together. It's merely an issue of timing: we don't want to have yesod-platform changing too rapidly, and I'm not able to produce and test a new version every time a dependency bumps.

That said, I don't know a problem with making a new release of yesod-platform now, it seems like a good time to do so.

@snoyberg
Member

OK, I've released a new yesod-platform.

@darthdeus

Just out of curiosity, why isn't yesod init generating yesod-platform in the dependencies? When should it be used over specifying the dependencies explicitly and vice versa?

@snoyberg
Member

@darthdeus This came up on the mailing list very recently. @gregwebs reminded me that, if we had placed yesod-platform in the dependencies, it would require installing all of those packages, even if the scaffolded site itself only needs a subset of them.

@mietek mietek referenced this issue in haskell/cabal May 26, 2014
Closed

Inconsistent behaviour in default solver #1872

@mietek
mietek commented May 29, 2014

Thanks. yesod-platform-1.2.11 works for me.

I do have one question: Why is cipher-des-0.0.6 a dependency of yesod-1.2.5.2, and not a dependency of yesod-platform-1.2.11, even though yesod-1.2.5.2 is a dependency of yesod-platform-1.2.11?

This is not a big deal, but it does mean that a sandbox prepared for yesod-platform-1.2.11 is not a strict superset of a sandbox prepared for yesod-1.2.5.2.

@snoyberg
Member

Where do you see that dependency? cipher-des isn't a direct dependency of yesod, and I get a build plan on my system that doesn't include cipher-des:

$ cabal install --dry-run yesod-platform-1.2.11 --constraint 'cipher-des >= 1' --package-db=clear --package-db=global
Resolving dependencies...
In order, the following would be installed (use -v for more details):
HUnit-1.2.5.2
SHA-1.6.4
ansi-terminal-0.6.1.1
ansi-wl-pprint-0.6.7.1
asn1-types-0.2.3
base16-bytestring-0.1.1.6
base64-bytestring-1.0.0.1
byteable-0.1.1
byteorder-1.0.4
cereal-0.4.0.1
crypto-pubkey-types-0.4.2.2
cryptohash-0.11.4 (latest: 0.11.5)
data-default-class-0.0.1
data-default-instances-base-0.0.1
data-default-instances-containers-0.0.1
data-default-instances-old-locale-0.0.1
dlist-0.7.0.1
data-default-instances-dlist-0.0.1
data-default-0.5.3
entropy-0.2.2.4 (latest: 0.3)
file-embed-0.0.6 (latest: 0.0.7)
hspec-expectations-0.5.0.1
mmorph-1.0.3
monad-loops-0.4.2
mtl-2.1.3.1 (latest: 2.2.0.1)
exceptions-0.6.1
optparse-applicative-0.8.1 (latest: 0.9.0)
pem-0.2.2
primitive-0.5.3.0
random-1.0.1.1
pwstore-fast-2.4.1
safe-0.3.4
securemem-0.1.3
crypto-cipher-types-0.0.9
cipher-aes-0.2.7
cipher-rc4-0.1.4
setenv-0.1.1.1
silently-1.2.4.1
stm-2.4.3
async-2.0.1.5
stm-chans-3.0.0.2
stringsearch-0.3.6.5
syb-0.4.1
tagged-0.7.2
crypto-api-0.13
skein-1.0.9
text-1.1.1.3
asn1-encoding-0.8.1.3
asn1-parse-0.8.1
blaze-builder-0.3.3.2
blaze-markup-0.6.1.0
blaze-html-0.7.0.2
cookie-0.4.1.1
fast-logger-2.1.5
hashable-1.2.2.0
case-insensitive-1.2.0.0
http-types-0.8.4 (latest: 0.8.5)
mime-mail-0.4.5.2
mime-types-0.1.0.4
nats-0.2
parsec-3.1.5
network-2.5.0.0
path-pieces-0.1.3.1
scientific-0.3.2.1
attoparsec-0.11.3.4
css-text-0.1.2.1
email-validate-2.0.1
http-date-0.0.4
socks-0.5.4
system-filepath-0.4.11
system-fileio-0.3.13
tagsoup-0.13.1
tf-random-0.5
QuickCheck-2.7.5
quickcheck-io-0.1.1
hspec-1.9.5
transformers-base-0.4.2
monad-control-0.3.3.0
lifted-base-0.2.2.2
resourcet-1.1.2.2
simple-sendfile-0.2.14
unix-compat-0.4.1.1
unix-time-0.2.2
unordered-containers-0.2.4.0
semigroups-0.14 (latest: 0.15)
utf8-string-0.3.8
language-javascript-0.5.13
hjsmin-0.1.4.6
publicsuffixlist-0.1
vault-0.3.0.3
vector-0.10.9.1 (latest: 0.10.9.2)
aeson-0.7.0.6
crypto-random-0.0.7
cprng-aes-0.5.2
clientsession-0.9.0.3
crypto-numbers-0.2.3
crypto-pubkey-0.2.4
resource-pool-0.2.2.0
shakespeare-2.0.0.3
hamlet-1.2.0
shakespeare-css-1.1.0
shakespeare-i18n-1.1.0
shakespeare-js-1.3.0
shakespeare-text-1.1.0
void-0.6.1
conduit-1.1.2.1 (latest: 1.1.3)
attoparsec-conduit-1.1.0
blaze-builder-conduit-1.1.0
network-conduit-1.1.0
word8-0.0.4
x509-1.4.11
x509-store-1.4.4
x509-system-1.4.5
x509-validation-1.5.0
tls-1.2.7 (latest: 1.2.8)
connection-0.2.1
xml-types-0.3.4
xss-sanitize-0.3.5.2
yaml-0.8.8.2 (latest: 0.8.8.3)
yesod-routes-1.2.0.6
zlib-0.5.4.1
streaming-commons-0.1.2.4 (latest: 0.1.3)
conduit-extra-1.1.0.3
cryptohash-conduit-0.1.1
http-client-0.3.2.2 (latest: 0.3.3)
http-client-tls-0.2.1.1
http-conduit-2.1.2
monad-logger-0.3.6.1
persistent-1.3.1.1
esqueleto-1.4.1 (latest: 1.4.1.2)
persistent-template-1.3.1.3
wai-2.1.0.2 (latest: 2.1.0.3)
wai-logger-2.1.1
http-reverse-proxy-0.3.1.7
wai-test-2.0.1.2 (latest: 2.0.1.3)
warp-2.1.5.1 (latest: 2.1.5.2)
warp-tls-2.0.5
xml-conduit-1.2.0.1 (latest: 1.2.0.2)
tagstream-conduit-0.5.5.1
authenticate-1.3.2.8
html-conduit-1.1.0.5
zlib-conduit-1.1.0
wai-extra-2.1.1.1 (latest: 2.1.1.2)
wai-app-static-2.0.1
yesod-core-1.2.15.1
yesod-persistent-1.2.2.3
yesod-form-1.3.9
yesod-auth-1.3.0.5
yesod-1.2.5.2
yesod-auth-hashdb-1.3.0.1
yesod-static-1.2.3
yesod-test-1.2.1.5
yesod-platform-1.2.11
@mietek
mietek commented May 30, 2014

Right. Sorry, I should have answered my own question by looking at the constraints in yesod-platform.

The answer is: yesod-1.2.5.2 currently pulls in tls-1.2.8, which is newer than tls-1.2.7 constrained in yesod-platform-1.2.11. This newer tls pulls in the one additional dependency, cipher-des-0.0.6. Mystery solved.

@mietek mietek closed this May 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment