Add the ability to cache stack projects#334
Merged
angerman merged 1 commit intoinput-output-hk:masterfrom Dec 4, 2019
Merged
Conversation
This was referenced Nov 28, 2019
angerman
requested changes
Dec 4, 2019
Collaborator
angerman
left a comment
There was a problem hiding this comment.
I'm ok with the overlay/haskell.nix changes. The changes to lib/call-stack-to-nix.nix seem to try to paper over a defect in stack-to-nix. I'd rather we solve that in stack-to-nix.
I believe that was fixed in input-output-hk/nix-tools#69
lib/call-stack-to-nix.nix
Outdated
| cp ${mkCacheFile cache} $out/.stack-to-nix.cache | ||
| '' + '' | ||
| (cd $out && stack-to-nix ${stackToNixArgs}) | ||
| (cd ${src} && stack-to-nix ${stackToNixArgs}) |
Collaborator
There was a problem hiding this comment.
But the .stack-to-nix.cache file is in $out not $src.
Contributor
Author
|
@angerman Yes, you are right. The second fix is mostly wrong. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR allows one to pass
typeas one of the attributes in any attrset ofcachelist instackProject/cabalProject. If omitted, it's set tocabaland the behavious is as was before. Otherwise, it can be set tostackand then the dependency will becallStackToNixed instead ofcallCabalToNix.Also fixes the problem where
stack.yamlcan't set resolver to a local file.