Version mismatch with Stack

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Version mismatch with Stack


I have library: mylib. And application: myapp. Library will use
Cardinality package. So, I added to mylib's stack.yaml:


# Override default flag values for local packages and extra-deps
    allow-never: true

and I added to mylib's cabal file:

    build-depends:  ...
                    , Cardinality

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

    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.

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
Beginners mailing list
[hidden email]