| 4 | | The project can be summarised as "merge [http://hackage.haskell.org/package/cabal-dev cabal-dev] into cabal, add selected features from [http://hackage.haskell.org/package/virthualenv virthualenv], and polish the result". Specifically, we want to be able to choose a compiler version to be used in the sandbox, and run a shell with a sandbox-restricted compiler and tools. Another important concern is portability: all features must be available on both Windows and *nix. One feature that is not going to be supported is `cabal-dev ghci` (depends on `cabal repl` patches which are not yet merged). Additionally, compilers other than GHC aren't going to be supported, at least initially. |
| | 4 | The project can be summarised as "integrate [http://hackage.haskell.org/package/cabal-dev cabal-dev] into cabal and polish the result". Specifically, we want to be able to choose a compiler version to be used in the sandbox, and run a shell with a sandbox-restricted compiler and tools. Another important concern is portability: all features must be available on both Windows and *nix. One feature that is not going to be supported is `cabal-dev ghci` (depends on `cabal repl` patches which are not yet merged). Additionally, compilers other than GHC are not going to be supported, at least initially. |
| 49 | | This feature (inspired by [http://hackage.haskell.org/package/virthualenv virthualenv]) will allow to run a shell with a sandbox-restricted compiler and tools. Important: Windows support. |
| 50 | | |
| 51 | | == Revise the UI and polish == |
| 52 | | |
| 53 | | Implementing `build`, `test`, `bench` and others as `cabal sandbox` subcommands is redundant. The top-level versions of these commands should be made aware of whether there is an sandbox active; they should be also changed to run `configure` and install dependencies automatically. |
| | 50 | The `cabal sandbox init` subcommand will be replaced by a `--sandbox` flag to `--configure`; `--link-source` will be also made a `--configure` option. The `configure`, `build`, `test`, `bench` and `install` commands will be made aware of whether there is an sandbox active; they will be also changed to install dependencies automatically. |
| 66 | | We can also remove the `cabal sandbox` command completely and make `cabal build` initialise a sandbox implicitly when there is none; this will give us [http://blog.johantibell.com/2012/03/cabal-of-my-dreams.html hermetic builds]. [http://www.google-melange.com/gsoc/project/google/gsoc2012/phischu/19001 Philipp Schuster's project], if successful, will make this option more practical. |
| | 63 | Once `ghc-pkg` gets Nix-style package management, the `--sandbox` switch will be made the default. |
| | 64 | |
| | 65 | == Implement a `--package-root` configure option == |
| | 66 | |
| | 67 | For large sets of dependencies, linking sources manually with `--link-source` is tedious. It would be nice if `configure` could be just given a path to the package directory, and then would walk the directory tree and discover the .cabal files automatically. Another nice feature is linking to Git/Darcs/... repositories. |
| | 68 | |
| | 69 | Q: Given `--package-root`, `--link-source` is redundant. Should it be removed? |
| | 70 | |
| | 71 | == Implement shared sandboxes == |
| | 72 | |
| | 73 | Allow providing an optional path argument to `configure --sandbox` so that sandboxes could be shared. |
| | 74 | |
| | 75 | == Implement `cabal sandbox shell` == |
| | 76 | |
| | 77 | This feature (inspired by [http://hackage.haskell.org/package/virthualenv virthualenv]) will allow to run a shell with a sandbox-restricted compiler and tools. Important: Windows support. |