cabal-sort: Topologically sort cabal packages
If you have a bunch of packages you may want to compile or recompile, then you need an order of compilation that meets the dependencies. Given a number of cabal package files, this program reads all those files and emits them topologically sorted according to their dependencies. This way you can compile many packages at once, say if a very low-level package has changed.
For compiling a couple of packages from their local darcs repositories in the right order, you may run something like
for dir in `find . -name "*.cabal" | fgrep -v _darcs | xargs cabal-sort --info=dir`; do (cd $dir && cabal install); done
For uploading a set of packages to Hackage in the right order you may run
for dir in `find . -name "*.cabal" | fgrep -v _darcs | xargs cabal-sort --info=dir`; do (cd $dir && rm dist/*.tar.gz && cabal sdist && cabal upload dist/*.tar.gz); done
Problem: Given packages A, B, C, where C depends on B and B depends on A, and you call
cabal-sort C.cabal A.cabal
then the emitted order of packages may be wrong, because cabal-sort does not get to know the dependency of C on B. Even if the order is correct, B.cabal is missing in the output and thus the list of cabal files cannot immediately be used for a sequence of cabal-install runs.
Downloads
- cabal-sort-0.0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.0.1, 0.0.2, 0.0.2.1, 0.0.3, 0.0.3.1, 0.0.4, 0.0.4.1, 0.0.4.2, 0.0.5, 0.0.5.1, 0.0.5.2, 0.0.5.3, 0.0.5.4, 0.0.5.5, 0.1, 0.1.1, 0.1.1.1, 0.1.1.2, 0.1.2, 0.1.2.1, 0.1.2.2 |
---|---|
Dependencies | base (>=2 && <5), Cabal (>=1.6 && <1.10), containers (>=0.2 && <0.4), directory (>=1 && <1.1), explicit-exception (>=0.1.4 && <0.2), fgl (>=5.4.2 && <5.5), filepath (>=1.1 && <1.2), transformers (>=0.2 && <0.3) [details] |
Tested with | ghc ==6.10.4 |
License | BSD-3-Clause |
Author | Henning Thielemann <haskell@henning-thielemann.de> |
Maintainer | Henning Thielemann <haskell@henning-thielemann.de> |
Category | Distribution |
Source repo | head: darcs get http://code.haskell.org/~thielema/cabal-sort/ this: darcs get http://code.haskell.org/~thielema/cabal-sort/ --tag 0.0.1 |
Uploaded | by HenningThielemann at 2010-05-05T10:13:33Z |
Distributions | LTSHaskell:0.1.2.1, Stackage:0.1.2.1 |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Executables | cabal-sort |
Downloads | 11382 total (31 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs not available [build log] All reported builds failed as of 2016-12-29 [all 8 reports] |