Bonded sandbox with a stack
I want to tell my cabal global config to only use stack LTS.
Is there a cabal sandbox in this case?
As I understand it, there shouldn't be any hell of an admiral, as all projects will use a predefined set of packages that are guaranteed to come together.
Is there a way to pre-build all LTS packages for a stack to speed up all future builds of the project?
source to share
Why sandboxes?
I think there are still advantages to using sandboxes:
-
Not every package is in the stackage, if you end up using a library or whichever is not part of the stack, you have no guarantee that it will work with the rest of your packages.
/ li> -
Sandboxes have other options besides preventing a hell of a hell. Their other main advantage is the ability to add local directories as package sources. For example, let's say you checked two packages on your local drive
~/code/a
and~/code/b
and suppose thatb
depends ona
. If you want to test whatb
works with some of the changes you made toa
, you can add your local checka
as a source tob
a cabal isolated cell.cd ~/code/b cabal sandbox add-source ~/code/a cabal build
Ready LTS packages
If you have configured all of your packages to pre-build, you can use the following to install all packages listed in the cabal.config file.
cat cabal.config | sed -rn 's/^.* ([^ ]+) ==.*/\1/gp' | xargs cabal install
source to share