Fresheyeball
Fresheyeball

Reputation: 30015

Haskell on Travis CI fails, passes locally

https://travis-ci.org/Fresheyeball/fbatch

Preprocessing library monad-parallel-0.5...
Control/Monad/Parallel.hs:67:8:
    Could not find module `Control.Monad.Identity'
    It is a member of the hidden package `mtl-2.2.1'.
    Perhaps you need to add `mtl' to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
monad-parallel-0.5 failed during the building phase. The exception was:
ExitFailure 1

I am new to haskell, and just can't seem to get past this. I've tinkered with my .cabal file all I can, and the sub dependency fails on Travis every time.

Please help.

Upvotes: 2

Views: 250

Answers (1)

leftaroundabout
leftaroundabout

Reputation: 120711

If a build fails while resolving a dependency, it's worth having a look a what version of that package gets installed. Normally, cabal should default to the most recent possible, which if well-maintained should install fine. Older versions do of course often mean trouble, if some dependency of theirs has now a newer, incompatible version installed.

In your case, cabal tried to install the somewhat ancient monad-parallel-0.5, which imports a module that doesn't exist in transformers (namely Control.Monad.Identity). The more recent version 0.7.1.2 does not try this and thus builds successfully. You can force such a recent install by giving a lower bound to the dependency in your .cabal file, in this case monad-parallel >= 0.7.

Upvotes: 3

Related Questions