-
Notifications
You must be signed in to change notification settings - Fork 841
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
Move configure information for local packages back to .stack-work to improve caching #4893
Comments
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨ Here's another similar CI workflow that we do:
As a developer, I would expect |
See #4898 |
Split up user and project storage (fixes #4893)
Should this be closed now that #4898 has been merged? Using a stack version from |
This will close automatically when we merge |
Now that caching is fixed, this is no longer necessary. context: commercialhaskell/stack#4893
Hello!
In
stack
2.X, it looks like local configuration information for packages was moved to~/.stack/stack.sqlite3
. This breaks a common pattern for caching Haskell dependencies separate from local builds in CI. Our CI caches used to work like this:~/.stack
.stack-work
directoriesSeparate caches are really nice because we don't have to pay to re-cache
~/.stack
if deps didn't change, and it is easy to share the dependency caches across branches.Now that local configuration information for packages is in
~/.stack
, we had to combine our dependency and local caches, which means we have to cache/uncache~/.stack
(or some yet-undetermined subset of~/.stack
, maybe just the SQLite file?) after building local packages. This means an extra couple minutes wasted in CI, even if dependencies didn't change.It would be great to keep everything related to local packages outside of
~/.stack
so we can regain this nice caching setup, and also maintain the conceptual simplicity of "global/dependency stuff lives in~/.stack
, while everything local to a project lives in.stack-work
".After talking to @borsboom and @snoyberg, it appears this was done out of simplicity so
stack
only needed to handle one SQLite database, which certainly makes sense. However, they indicated that having local configuration stay in.stack-work
and out of~/.stack
would be a good reason to add a bit of complexity and have multiple databases, hence me opening this issue.For some additional context, here is what happens when building a local package if
~/.stack/stack.sqlite3
is nuked, which replicates what happens if you don't cache~/.stack
in CI:Stack rebuilds local packages from scratch when this happens.
The text was updated successfully, but these errors were encountered: