-
Notifications
You must be signed in to change notification settings - Fork 2
Alternative technique for mixing #3
Comments
My understanding was that you couldn't use
Supplying Additionally, and this is a minor usability nit: If you're using the environment variable to inject the extra package DB, then you will need to do something similar to That is not to say I'm opposed to using the environment variable approach. I'll definitely look into switching if a major advantage arises. Lastly, I did not intend to replace *When I want to write small scripts of a throwaway nature, setting up a sandboxed Cabal project and/or re-building the same dependencies over and over is too much. With
|
One other specific question: have you dealt with the requirement that @edsko described about making sandboxes immutable once a fork/clone is made? |
I do that via
which seems to do the trick. Is that wrong? AfC |
Immutable sandboxes sounds interesting. Does that mean I wouldn't be able to install another package into my existing Oh, wow, I did not realize |
@abhinav I think it's ok? From http://www.edsko.net/2015/03/09/sandboxes-revisited/,
which seems to be the way you're leaning already. When I was talking about wanting to redo the tooling, it's things like this: a sandbox (sic) should be forked automatically when an upgrade is required. Which of course is where Nix shines. Like you, I'd like to see if we can solve this within the existing machinery ghc-pkg and 'Cabal' provide. Anyway, it seems like @edsko has rewritten the sandbox rulebook somewhat. I just wanted to make sure you'd noticed that part about sharing vs forking. Cheers! AfC |
I was about to write a tool almost exactly like sandman. I see you've already done it! Nice work.
One suggestion to consider: in my research leading up to starting to write my own code, I learned a bit more about how ghc-pkg(1) manages things. We sort of know this implicitly because we see it happening when we we do
ghc-pkg list
but indeed there can be multiple package databases, and they are taken in order off of theGHC_PACKAGE_PATH
environment variable (in the absence of equivalent-package-db
declarations on the ghc(1) command line). That means rather than copying into a local build's sandbox's package.conf.d tree, you could perhaps instead leave them in place in your ~/.sandman/sandboxes/{name}/ tree.I assume that doesn't add up to anything because you're supporting people then going back to using the existing cabal(1) front end. But if you go the the next level, and start thinking about a replacement for 'cabal-install' then you could indeed control the environment or arguments to
ghc
and do mixing a different way.... if that gets you anything.
AfC
The text was updated successfully, but these errors were encountered: