@kolyshkin requested issue #62584 to be considered for backport to the next 1.22 minor release.
@gopherbot Please backport to Go 1.22.
When I run
go fix
using Go 1.22.5, it complains:invalid -go=go1.21.0 exit status 2
While
go1.23rc2 fix
works fine.
Comment From: kolyshkin
I tried to cherry-pick CL 527342 to release-branch.go1.22 via gerrit, and got this error:
An error occurred
Could not perform action: invalid author:
email address alexbozhenko@gmail.com is not registered in your account, and you lack 'forge author' permission.
The following addresses are currently registered:
kir@openvz.org
kir@parallels.com
kir@sacred.ru
kolyshkin@gmail.com
To register an email address, visit:
https://go-review.googlesource.com/settings#EmailAddresses
I then tried do the same from the command line and got a similar error upon using git codereview mail HEAD
.
Yet, I've tested it locally that the backport fixes the issue.
Comment From: gopherbot
Change https://go.dev/cl/603981 mentions this issue: [release-branch.go1.22] cmd/fix: support go versions with patch release
Comment From: dmitshur
That limitation is mentioned at https://go.dev/wiki/MinorReleases#making-cherry-pick-cls (first sentence).
Thanks for testing it out locally.
Comment From: cagedmantis
@kolyshkin Can you provide the rationale for why this is an issue without a known workaround?
Comment From: kolyshkin
@kolyshkin Can you provide the rationale for why this is an issue without a known workaround?
This breaks go fix
for some packages (those that have go 1.2x.y
in go.mod
, i.e. where go version has a patch number) that are otherwise entirely valid.
The only workarounds I can think of are:
1. Edit go.mod
to remove the patch number (something like sed -i -e 's/\(go 1\.2[0-9]\)\.[0-9][0-9]*/\1/' go.mod
) for the duration of go fix
run.
2. Not to use go fix
at all.
To me neither one looks like a decent way to solve this.
Comment From: gopherbot
Closed by merging CL 603981 (commit 676d6100d89fb8527c42f072bc7b7a9b98700f84) to release-branch.go1.22
.