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 uses Stack's custom snapshot feature (https://docs.haskellstack.org/en/stable/custom_snapshot/). A custom snapshot extends the set of packages in the resolver and can be used from any other project (including other Wire repos). No more copying parts of stack.yaml from one project to another.
Custom snapshots are stored in
~/.stack
. This has several benefits:They survive
stack clean
. (Well, Git deps have to be cloned anyway because of a bug in Stack, but they won't be recompiled, only recloned, and for the biggest deps I've switched to using tarballs so that should be faster.)They survive branch switches (i.e. if different package versions are used in different branches, no recompiling is necessary when switching between the two).
We no longer need to cache both
.stack
and.stack-work
on CI.A thing to keep in mind is that snapshots are immutable. A snapshot can be based on the previous version of the snapshot, but Stack takes a bit of time to symlink everything from the older snapshot to the newer one, so having a new snapshot every day would be inadvisable. For that reason packages that change frequently (like hscim) should remain in
stack.yaml
.