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

Consider implementing a "remote cache" in the style of Bazel #9137

Closed
andreabedini opened this issue Jul 18, 2023 · 4 comments
Closed

Consider implementing a "remote cache" in the style of Bazel #9137

andreabedini opened this issue Jul 18, 2023 · 4 comments

Comments

@andreabedini
Copy link
Collaborator

Describe the feature request

Bazel implements a remote caching through
a HTTP protocol that is simple enough to be used with many different
backends.

The protocol is basically a
content-addressed blob store, accessed with GET/PUT requests.

cabal-install could use the same protocol to support a remotely-cached cabal
store. This could be very useful in CI setups.

I am perfectly aware that there are impurities in the hash key used in the
store, especially with respect to external dependencies. I don't think this
invalidates the utility of this feature.

After a first look, the most invasive change would be to generalise
StoreDirLayout
to be able to perform network IO, perhaps separating it from
CabalDirLayout.
The store logic itself seems to require minor changes, the most notable one
being replacing
getStoreEntries
because we will not be able to traverse the remote cache.

@michaelpj
Copy link
Collaborator

It sounds like this would obsolete https://github.com/haskell-works/cabal-cache ?

@andreabedini
Copy link
Collaborator Author

It sounds like this would obsolete https://github.com/haskell-works/cabal-cache ?

I would say that the existence of cabal-cache proves that this is desierable feature.

The README of cabal-cache mentions #4097, which is worthy of note here too.

@TeofilC
Copy link
Collaborator

TeofilC commented Jul 19, 2023

This looks like a duplicate of #5582, which also suggests the bazel protocol

@andreabedini
Copy link
Collaborator Author

Thanks @TeofilC 🤦
Closing as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants