Skip to content
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

How to keep temporary files on build failures? #3857

Closed
nh2 opened this issue Feb 10, 2018 · 1 comment
Closed

How to keep temporary files on build failures? #3857

nh2 opened this issue Feb 10, 2018 · 1 comment

Comments

@nh2
Copy link
Collaborator

@nh2 nh2 commented Feb 10, 2018

In a project where my build is failing, I'm trying to inspect the intermediate files that GHC generates.

I tried

stack build --ghc-options=-keep-tmp-files

but it doesn't work, because while GHC doesn't delete its temp files, stack does.

I think it's because of this:

withExecuteEnv bopts boptsCli baseConfigOpts locals globalPackages snapshotPackages localPackages inner =
withSystemTempDir stackProgName $ \tmpdir -> do

Is there a way I can convince stack to keep the temporary directory for inspection? If not, I'd like to feature request that.

@nh2
Copy link
Collaborator Author

@nh2 nh2 commented Feb 10, 2018

PR at #3858

@mgsloan mgsloan added this to the P2: Should milestone Feb 10, 2018
@mgsloan mgsloan closed this in 38f6561 Feb 10, 2018
mgsloan added a commit that referenced this issue Feb 10, 2018
stack build: Add --keep-tmp-files flag. Fixes #3857
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.