Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: [modules + integration] go mod index, reindex a goproxy directory #31303

Open
nim-nim opened this issue Apr 6, 2019 · 1 comment

Comments

@nim-nim
Copy link

@nim-nim nim-nim commented Apr 6, 2019

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

  • the destination should be any directory path the user specifies
  • the feature should also be exposed as a function in the official Go API
  • it is probably not useful or desirable to be able to operate on a specific goproxy branch …/<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.

@thepudds thepudds changed the title [modules + integration] go mod index, reindexing a goproxy directory cmd/go: [modules + integration] go mod index, reindexing a goproxy directory Apr 6, 2019
@thepudds thepudds added the modules label Apr 6, 2019
@nim-nim nim-nim changed the title cmd/go: [modules + integration] go mod index, reindexing a goproxy directory cmd/go: [modules + integration] go mod index, reindex a goproxy directory Apr 7, 2019
@agnivade

This comment has been minimized.

Copy link
Contributor

@agnivade agnivade commented Oct 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.