8000 GOCACHEPROG or otherwise hookable caching support · Issue #1458 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

GOCACHEPROG or otherwise hookable caching support #1458

Closed

Description

@bradfitz

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

Activity

  1. dominikh commented on Oct 25, 2023

    @dominikh
    Owner

    Backporting GOCACHEPROG support to Staticcheck sounds fine to me.

  2. added and removed
    needs-triageNewly filed issue that needs triage
    on Oct 25, 2023
  3. bradfitz commented on Jan 21, 2026

    @bradfitz
    ContributorAuthor

    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.

  4. dominikh commented on Jan 21, 2026

    @dominikh
    Owner

    We're assuming you'd still accept a PR for this.

    Yes.

  5. added a commit that references this issue on Mar 6, 2026
    7423394
  6. bradfitz commented on Mar 6, 2026

    @bradfitz
    ContributorAuthor

    Sent #1704

  7. added a commit that references this issue on Apr 10, 2026
    ba2c208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0