Changes between Version 7 and Version 8 of PackageEnvironments

Show
Ignore:
Timestamp:
04/22/12 04:26:15 (13 months ago)
Author:
duncan
Comment:

add info about cabal-src

Legend:

Unmodified
Added
Removed
Modified
  • PackageEnvironments

    v7 v8  
    9393 * https://github.com/creswick/cabal-dev/blob/master/README.md 
    9494 
    95 cabal-dev provides what it calls a sandbox for source packages and installed packages. `cabal-dev` has a command line interface that is very similar to that of `cabal`, so that it can be used as a drop-in replacement. It is implemented as a wrapper around the cabal-install command. 
     95`cabal-dev` provides what it calls a sandbox for source packages and installed packages. It has a command line interface that is very similar to that of `cabal`, so that it can be used as a drop-in replacement. It is implemented as a wrapper around the `cabal` command. 
    9696 
    9797For source packages, the sandboxing mean providing a local source package set that overrides the global package index. Tarballs can be added to this index. It provides a command `cabal-dev add-source /path/to/source/code` which generate an `sdist` snapshot of the given package and adds that tarball to the local source index. 
     
    111111 * http://hackage.haskell.org/package/cabal-src 
    112112 * https://github.com/yesodweb/cabal-src/blob/master/README.md 
     113 
     114`cabal-src` is intended to solve the problem that cabal does not know about the source versions of local packages, so it cannot use those source packages in its dependency planning. It has a command line interface that is very similar to that of `cabal`, so that it can be used as a drop-in replacement. It is implemented as a wrapper around the `cabal` command. 
     115 
     116Ordinarily, if you `cabal install` in a local directory, `cabal` knows only about the packages that are already installed, and the source packages available from hackage. It does not know about other local build trees. If you make a change to a package and install it, then go to build another local package then `cabal` will usually use the instance of the package that you just installed. However this is not always possible: to use consistent versions of dependencies it is sometimes necessary to rebuild a package. This is where the problem occurs, if `cabal` cannot see that source package then it cannot rebuild from that source. This is the problem that `cabal-src` tries to address. 
     117 
     118`cabal-src` address the problem by taking a snapshot of a source package and inserting it into `cabal`'s local source index. It modifies the `~/.cabal/config` file to tell `cabal` to look in this local index. 
     119 
     120This is in a way similar to what `cabal-dev add-source` does, but it does it for the user's default environment rather than for a local sandbox. 
    113121 
    114122== cabal-meta ==