user2879704
user2879704

Reputation:

Yesod's wrap needs transformers > 0.2.2 and < 0.4, it conflicts with local version

I created a new yesod project as,

yesod init
cd lemonstand && cabal sandbox init && cabal install

Package dependency resolution fails as,

next goal: warp (dependency of lemonstand-0.0.0)
rejecting: warp-3.0.12.1, 3.0.12,,,,(conflict: lemonstand => warp>=1.3 && <1.4)
rejecting: warp-1.3.10.2, 1.3.10.1,,,,(conflict: transformers==0.4.3.0, warp => transformers>=0.2.2 && <0.4)
rejecting: warp-1.2.2, 1.2.1.1,,,,(conflict: lemonstand =>warp>=1.3 && <1.4)
Backjump limit reached (change with --max-backjumps)

On running cabal exec ghc-pkg list transformers, it shows,

/opt/ghc/7.8.4/lib/ghc-7.8.4/package.conf.d
   transformers-0.3.0.0
/home/user/ws/yesod/lemonstand/.cabal-sandbox/x86_64-linux-ghc-7.8.4-packages.conf.d

What does conflict: transformers==0.4.3.0 mean in the error line? And since warp expects the transformers versioned > 0.2.2 and < 0.4, can i install transformers inside the sandbox folder?

Since transformers come as part of ghc's inbuilt libraries, i am not sure how to install a different version of transformers?

Upvotes: 0

Views: 53

Answers (1)

Michael Snoyman
Michael Snoyman

Reputation: 31345

Looks like you've hit the limits of cabal's dependency solver backjumps. You can:

  • Add the flags --max-backjumps=-1 --reorder-goals
  • Follow the quickstart guide which uses Stackage to avoid this problem
  • Use stack instead of cabal, which fixes this and many other problems. Note that this workflow is still being refined

Upvotes: 1

Related Questions