cmd/dist, x/build/cmd/golangbuild: switch to a devel version format that satisfies go/version.Lang and go/version.IsValid in more cases #73372
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.
ToolProposal
Issues describing a requested change to a Go tool or command-line program.
Milestone
golangbuild currently generates VERSION files with strings like this, a behavior that the Go build system had for a while:
Which is broadly based on make.bash's auto-detection logic used to construct a version when a VERSION file specifying it isn't present, which generates version strings in a similar format (the "go1.X-" prefix being new as of CL 264938):
That format satisfies the property that a "devel" substring is present, but not the property that go/version.IsValid is true and go/version.Lang works on it.
As motivated in #73369 (comment), I suggest we change to the following format that have all of the aforementioned properties:
Where
go1.X
corresponds to the language version specified in internal/goversion.Version, something golangbuild has easy access to. Something to consider including .0 likego1.X.0-devel_...
, but given the first pre-release version (e.g., go1.25rc1) leaves it out, maybe its fine to leave it out too. Since this is just a development version which isn't tagged or published anywhere, changing it if we find a need to shouldn't be too expensive.There might be test cases or other code that relies on the current format, such as checking for "devel" prefix (or its absence), that'd need to be updated as part of this.
CC @golang/release, @prattmic.
The text was updated successfully, but these errors were encountered: