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

GOCACHEPROG or otherwise hookable caching support #1458

Open
bradfitz opened this issue Oct 25, 2023 · 1 comment
Open

GOCACHEPROG or otherwise hookable caching support #1458

bradfitz opened this issue Oct 25, 2023 · 1 comment

Comments

@bradfitz
Copy link

Go 1.21 added GOEXPERIMENT=cacheprog to let you set GOCACHEPROG to the name of a tool to run as a child process and implement the cmd/go action/build cache via a JSON API over stdin/stdout. (golang/go#59719)

We (@tailscale) are moving to using this in our CI to share a build cache over multiple machines without the slow tar/untar thing that people typically do on GitHub Actions. So far it's working great.

Except staticcheck has its own on-disk cache (a fork of cmd/go's cache prior to GOCACHEPROG support), so we can't share a cache for staticcheck between runs without backing up & restoring the cache directory, or using NFS/SMB/9P/FUSE to a shared cache server.

@dominikh, would you be amenable to us either adding GOCACHEPROG support to staticcheck (admittedly perhaps premature, considering it's still in GOEXPERMENT status), or at least a hook in the staticcheck code to let us build our own staticcheck binary that implements the hook via HTTP client calls to our cache server?

/cc @maisem

@bradfitz bradfitz added the needs-triage Newly filed issue that needs triage label Oct 25, 2023
@dominikh
Copy link
Owner

Backporting GOCACHEPROG support to Staticcheck sounds fine to me.

@dominikh dominikh added enhancement and removed needs-triage Newly filed issue that needs triage labels Oct 25, 2023
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

2 participants