[Haskell-beginners] Version mismatch with Stack
Baa
aquagnu at gmail.com
Wed Jan 3 12:14:54 UTC 2018
Hello!
I have library: mylib. And application: myapp. Library will use
Cardinality package. So, I added to mylib's stack.yaml:
==added===
extra-deps:
- https://hackage.haskell.org/package/Cardinality-0.2/Cardinality-0.2.tar.gz
# Override default flag values for local packages and extra-deps
flags:
Cardinality:
allow-never: true
===end-of-added===
and I added to mylib's cabal file:
===added===
build-depends: ...
...
, Cardinality
===end-of-added===
Seems that it's compiling. OK, now I try to build myapp, which early
was building without any problems (it depends on mylib). But I get
error:
===error===
Cardinality must match -any, but the stack configuration has no specified version (latest matching version is 0.2)
needed since mylib is a build target.
Some potential ways to resolve this:
* Recommended action: try adding the following to your extra-deps
in /xxxxx/myapp/stack.yaml:
- Cardinality-0.2
* Set 'allow-newer: true' to ignore all version constraints and build anyway.
* You may also want to try using the 'stack solver' command.
Plan construction failed.
===end-of-error===
So, what am I doing wrongly? Why stack want adding of the same things
in myapp's stack.yaml which were already added in mylib's stack.yaml?!
/Best regards, Paul
More information about the Beginners
mailing list