Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  Version mismatch with Stack (Baa)


----------------------------------------------------------------------

Message: 1
Date: Wed, 3 Jan 2018 14:14:54 +0200
From: Baa <aqua...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: [Haskell-beginners] Version mismatch with Stack
Message-ID: <20180103141454.41051c14@Pavel>
Content-Type: text/plain; charset=US-ASCII

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


------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 115, Issue 3
*****************************************

Reply via email to