You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bash -eo pipefail
~/.local/bin/cache-s3 --bucket frontrow-ops --prefix ci-cache/build-backend save stack work
Stack has not been tested with GHC versions above 8.6, and using 8.8.2, this may fail
Stack has not been tested with Cabal versions above 2.4, but version 3.0.1.0 was found, this may fail
Stack has not been tested with GHC versions above 8.6, and using 8.8.2, this may fail
Stack has not been tested with Cabal versions above 2.4, but version 3.0.1.0 was found, this may fail
[cache-s3][Info ][Thu, 27 Feb 2020 15:36:31 UTC]: Caching: /root/megarepo/backend/.stack-work
[cache-s3][Info ][Thu, 27 Feb 2020 15:36:31 UTC]: Caching: /root/megarepo/backend/core/.stack-work
[cache-s3][Info ][Thu, 27 Feb 2020 15:36:31 UTC]: Caching: /root/megarepo/backend/data-gen/.stack-work
[cache-s3][Info ][Thu, 27 Feb 2020 15:36:31 UTC]: Caching: /root/megarepo/backend/entities/.stack-work
[cache-s3][Info ][Thu, 27 Feb 2020 15:36:31 UTC]: Caching: /root/megarepo/backend/fancy-api/.stack-work
[cache-s3][Info ][Thu, 27 Feb 2020 15:36:31 UTC]: Caching: /root/megarepo/backend/frontrow-app/.stack-work
[cache-s3][Info ][Thu, 27 Feb 2020 15:36:31 UTC]: Caching: /root/megarepo/backend/jobs/.stack-work
[cache-s3][Info ][Thu, 27 Feb 2020 15:36:31 UTC]: Caching: /root/megarepo/backend/provisioning/.stack-work
[cache-s3][Info ][Thu, 27 Feb 2020 15:36:31 UTC]: Caching: /root/megarepo/backend/roster-management/.stack-work
[cache-s3][Info ][Thu, 27 Feb 2020 15:36:31 UTC]: Caching: /root/megarepo/backend/text-assets/.stack-work
Notice ~/.stack is not included. This makes the caching incomplete and a subsequent rebuild (with no changes) goes on to compile everything again. I think ~/.stack should always be included in a stack-aware caching.
The text was updated successfully, but these errors were encountered:
There is a separate command for saving global stack environment, run:
$ ~/.local/bin/cache-s3 --bucket frontrow-ops --prefix ci-cache/build-backend save stack
And it will do the right thing.
Reason for separating into two distinct commands is because for feature branches you might not need to save global ~/.stack path and just reuse the one from master branch, since the set of dependencies doesn't change that often on projects.
Thanks for quick response, sorry I missed that! I was confused because we can't get that benefit right now. With some version of Stack multi-package, custom-snapshot projects store things in ~/.stack that are needed even if dependencies have not changed. I don't know all the details, but I think commercialhaskell/stack#4893 (comment) is related.
Anyway, I guess saving and restoring both stack and stack work would be equivalent to the caching we're doing now.
Notice
~/.stack
is not included. This makes the caching incomplete and a subsequent rebuild (with no changes) goes on to compile everything again. I think~/.stack
should always be included in a stack-aware caching.The text was updated successfully, but these errors were encountered: