x/build/cmd/updatestd: investigate a package-first update strategy, instead of module-first #41589
Labels
Builders
x/build issues (builders, bots, dashboards)
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Patch set 1 of CL 256357 implemented a per-module update strategy for golang.org/x dependencies in the std and cmd standard library modules. At a high level:
Determine build list (aka list of modules that are in module graph).
Invoke a single go get command that selects desired new module versions (determined by target branch position on Gerrit) of golang.org/x modules:
This issue is about investigating modifying the strategy to perform the update on a per-package level.
See the second part of @bcmills's comment on CL 256357 for more details, as well as my reply there.
What I'm imagining (but is incomplete and untested) is roughly:
Determine list of packages that are not a part of the module (and in turn may have updates available).
go list -f '{{if .Module}}{{.ImportPath}}{{end}}' all
.For each package, determine which module provides it, figure out the desired version.
Invoke a single go get command that requests packages at selected versions:
This is the tracking issue for investigating and implementing this as needed, and discussing the approach. It should be easier to do that here than in a code review.
I don't want to do this work now because there isn't a need yet (and I have higher priority work). But this will come up in the future. Filing an issue in the meantime.
The text was updated successfully, but these errors were encountered: