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
{{ message }}
Repository navigation
GOCACHEPROG or otherwise hookable caching support #1458
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?
Activity
dominikh commentedon Oct 25, 2023
Backporting GOCACHEPROG support to Staticcheck sounds fine to me.
bradfitz commentedon Jan 21, 2026
BTW, we didn't forget about this. (Yes, it's been ages, but there have some fires and reprioritizations at work in the meantime)
But this is back on our radar. We're assuming you'd still accept a PR for this.
dominikh commentedon Jan 21, 2026
Yes.
lintcmd/cache: implement GOCACHEPROG
bradfitz commentedon Mar 6, 2026
Sent #1704
lintcmd/cache: implement GOCACHEPROG