cmd/go: [modules + integration] go mod index, reindex a goproxy directory #31303
Labels
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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.
The text was updated successfully, but these errors were encountered: