| | 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 | |
| | 116 | Ordinarily, 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 | |
| | 120 | This 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. |