Closed k-bx closed 9 years ago
Somewhat related, after adding:
extra-deps:
- base-orphans-0.4.0
- gloss-1.9.4.1
- gloss-rendering-1.9.3.1
I run stack build
and see:
➜ lens-gabriel git:(master) ✗ stack build
While constructing the BuildPlan the following exceptions were encountered:
-- Failure when adding dependencies:
base: needed (==4.8.*), latest is 4.8.0.0, but 4.7.0.2 found
ghc-prim: needed (==0.4.*), latest is 0.4.0.0, but 0.3.1.0 found
gloss-rendering: needed (==1.9.3.*), latest is 1.9.3.1, but couldn't resolve its dependencies
needed for package: gloss-1.9.4.1
-- Failure when adding dependencies:
base: needed (==4.8.*), latest is 4.8.0.0, but 4.7.0.2 found
needed for package: gloss-rendering-1.9.3.1
-- Failure when adding dependencies:
bifunctors: needed (>=5 && <6), latest is 5, but 4.2.1 found
profunctors: needed (>=5 && <6), latest is 5.1.1, but 4.4.1 found
semigroupoids: needed (>=5 && <6), latest is 5.0.0.2, but 4.3 found
needed for package: lens-4.11
-- Failure when adding dependencies:
gloss: needed (==1.7.*), latest is 1.9.4.1, but couldn't resolve its dependencies
lens: needed (-any), latest is 4.11, but couldn't resolve its dependencies
random: needed (==1.0.*), latest is 1.1, but 1.1 found
needed for package: lens-examples-0.1
-- Failure when adding dependencies:
lens: needed (>=4 && <5), latest is 4.11, but couldn't resolve its dependencies
needed for package: lens-properties-4.11
Why does it need base of ==4.8.*
? lts-2.16
lists 4.7.0.2
, lens.cabal
asks for < 5
. Really confusing to me.
UPDATE: sorry, this is resolved, I see the "needed for package" at the bottom now. On the other hand, those package-versions were advised to me by stack build
, so it would be nice to check if they will match versions before recommending them.
There's already an open issue to get more precise information about recommendations (#116). This entails having a full dependency solver, which we're waiting on other people to provide. In the interim, the stack solver
command will use cabal's dependency solver. We don't do that by default though due to the many bugs that exist there.
I just wanted to build some haddocks on https://github.com/Gabriel439/lens repo to check out Gabriel's lens tutorial, and found one place for improvement.
Current experience:
From this point, it is clear (to me), that the next desired step would be to add
extra-deps
into latest (or other desired) versions of these packages, but it might not be clear for a new user.Possible solutions:
stack init --resolver lts-2.16
to be more likestack build
output in terms of telling what to do to fix the issues.Thanks!