yesodweb/yesod — Issue #176: Dependency hell when installing from source
Author: pbrisbin
Created: 2011-11-24 17:31:24+00:00
State: open

### The issue

Following the instructions on the yesod README for installing from source results in dependency hell.

When installing the more base packages (hamlet/wai) a newer version of deepseq is automatically chosen (1.2.something). This is fine until yesod-core requires aeson -- since aeson has a requirement of deepseq < 1.2.

This triggers the installation of deepseq 1.1.something and a rebuild of all dependant packages. Since many of those dependent packages were installed from local sources they are left broken.

Unregistering and reinstalling them not only breaks yesod-* (also installed from source) but happily brings the newer deepseq back in. Therefore moving on to reinstall yesod-core begins the cycle again.

### Possible fixes

1. aeson should not have that upper version bound on deepseq

This would get things working again, but only until the same situation arises.

2. Cabal should have the ability to use local and/or github sources during its dependency resolution.

The rebuild that occurs due to the deepseq swap when installing yesod-core would automagically rebuild your other local or github-based yesod sources. This would be badass in general but I feel difficult to implement.

### Workaround

Manually installing deepseq-1.1.0.2 before proceeding with the instructions in the yesod README pevents the cycle mentioned above since cabal will prefer installed packages over latest during resolution.

There seems to be another issue with aeson-native changing versions during the install of yesod-json breaking yesod-core. Simply starting over again once the alternative aeson-native is in place gets passed that without angering `ghc-pkg check`.

I'm currently stuck at yesod-form with an unrecognized pragma in `Types.hs:79:1` but that seems unrelated to cabal or dependency hell.