It seems that I am missing something. As far as I understand cabal sandbox init
says that starting from the current folder and all sub-folders all cabal install
commands are scoped to a sandbox. So everything outside this folder is not in a sandbox.
What's the purpose of cabal-dev then? Should I use cabal install
or cabal-dev install
in a sandbox?
TLDR, cabal-dev
was an initial solution for sandboxing and cabal sandbox
is the fully integrated realization.
Until a few months ago, there was no pleasant way to sandbox builds with cabal
. This was a huge problem for any library maintainer or really anyone who might worry about dependency conflicts. To solve this, a few people but together a tool called cabal-dev
. It supplemented cabal
and added some ability to sandbox.
Now after this existing for a few years, in version 1.18, cabal
has gained sandboxes! This means that we can switch from using cabal
+ cabal-dev
to just cabal
since cabal
has now subsumed cabal-dev
.
In addition, because sandboxes are fully integrated into cabal, they play nicely with other cabal features, like cabal repl
which is just impossible for cabal-dev
.
Finally, recent chatter on the Haskell-Cafe mailing list suggests that cabal-dev
is not likely to be maintained much longer so aside from 1-2 current bugs in cabal sandbox
there's no reason not to switch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With