Skip to content

proxy.golang.org: support git-lfs #47241

Open
@jpap

Description

@jpap

The Google-hosted proxy.golang.org does not smudge git-lfs pointer files in public repos. This results in broken builds when modules include binary syso files that are hosted under git-lfs. (The linker sees a text file instead of the object file, ignores it, then explodes with a lot of missing symbol errors which isn't very intuitive.)

While it might be unreasonable to expect every git extension be supported on proxy.golang.org, git-lfs is quite common: it's supported by many of the major git hosts (e.g. GitHub, GitLab, Bitbucket, Azure Repos) with many others having a pending feature-request for it.

Workarounds

  1. Use GOPRIVATE for all packages that need git-lfs. This can result in a complex configuration environment for the developer who now needs to track this across possibly many dependencies, some of which may be transitory.

  2. The nuclear option: turn off the proxy with GOPROXY=direct.

  3. Change all modules to avoid git-lfs and commit all binary syso files directly into each repo.

None of these options are great...

Similar issues

Issue #41708 talks about a mod checksum mismatch between proxy and direct. One solution is to ignore the smudge and get matching checksums, which can work in that case because the git-lfs file(s) are inconsequential to the build. That approach doesn't work in the scenario described above.

The following issues are related to git-lfs, but aren't as relevant:

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.proxy.golang.org

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions