2

I just upgraded to the latest version of cabal-install which is 1.20. I am not sure if it is related but cabal started fetching old versions of packages for some reason.

In my cabal file, all dependencies are specified without version numbers. So I believe, cabal should fetch the latest versions available unless there is a conflict, correct?

If I run cabal install --only-dependencies within a sandbox environment, cabal pulls all kind of rubbish and old package versions like mongoDB-1.2.2 instead of 1.4.4 and scotty-0.5 instead of 0.7.2. If I run a specific package installation like cabal install scotty then it fetches the latest version and all is well. So I have to install all dependencies manually to get the latest versions - one by one. Annoying. What is going on? Google gives me no hits.

If there are some kind of changes in cabal, what is it? And how do I pull all the latest dependencies within a sandbox.

Thanks.

1 Answer 1

2

Some of your dependencies have upper bounds that are forcing the usage of older versions of a given package. One thing that might help is to start over. Delete your package repository (~/.ghc on linux machines), and keep a discipline to work entirely within sandboxes. Use your package manager to install stuff you need globally, sandboxes for your development projects, and you can avoid a lot of the reasons this problem crops up. That said, if you're truly depending on a project that hasn't updated its upper bounds, then you're stuck using the older packages, short of submitting a patch to the library author or switching to a different dependency.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.