Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upcmd/go: [modules + integration] go mod index, reindex a goproxy directory #31303
Labels
Comments
This comment has been minimized.
This comment has been minimized.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This report is part of a series, filled at the request of @mdempsky, focused at making Go modules integrator-friendly.
Please do not close or mark it as duplicate before making sure you’ve read and understood the general context. A lot of work went into identifying problems points precisely.
Needed feature
Go needs an official
go mod index
command that processes a goproxy directory and updates its indexes (list
files).Constrains
…/<module>/@v/
, if reindexing is fast enough. Operating on specific branches would be less robust in presence of operator or tooling branch selection mistakes.Motivation
A goproxy baseline directory may be assembled from the output of several CI/CD jobs. That does not require teaching the CI/CD system deep Go knowledge, just having it pick up the file lists produced by
go mod pack
(issue #31302).However, if several of those jobs produce modules for different minor versions of the same module, their lists will collide and conflict. Therefore, the CI/CD system needs a command to regenerate them.
As rewriteVersionList shows, updating indexes is not completely trivial, and requires more Go module knowledge than the typical CI/CD system has.