-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring back sandboxes #3
base: master
Are you sure you want to change the base?
Conversation
@@ -339,7 +340,8 @@ mainWorker args = do | |||
CommandHelp help -> printGlobalHelp help | |||
CommandList opts -> printOptionsList opts | |||
CommandErrors errs -> printErrors errs | |||
CommandReadyToGo (globalFlags, commandParse) -> | |||
CommandReadyToGo (globalFlags', commandParse) -> do | |||
globalFlags <- CmdSandbox.updateGlobalFlags Nothing globalFlags' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we inject the --store-dir=foo
thing for all commands.
isSandbox <- Sandbox.isSandbox Nothing | ||
let merged = savedClientInstallFlags savedConfig `mappend` existingClientInstallFlags | ||
if isSandbox | ||
then do | ||
cwd <- getCurrentDirectory | ||
pure $ merged { cinstEnvironmentPath = Flag cwd } | ||
else pure $ merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we check during cabal install
whether we're in a sanbdox and if so pass the --package-env=.
flag, creating a ghc environment file.
It seems the env file already acts as a "world file"... it will (except for base
) only contain the targets we specified via cabal install --lib
. So I'm not sure it's necessary to play tricks with recreation of the env file to allow new resolutions.
Instead, I think it is reasonable to have users specify multiple targets to avoid resolution issues, such as cabal install --lib text attoparsec
.
No description provided.