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/vet: update for new number formats [1.14 backport] #39288

Closed
gopherbot opened this issue May 27, 2020 · 8 comments
Closed

cmd/vet: update for new number formats [1.14 backport] #39288

gopherbot opened this issue May 27, 2020 · 8 comments
Assignees
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented May 27, 2020

@ianlancetaylor requested issue #29986 to be considered for backport to the next 1.14 minor release.

@gopherbot Please open backport issues for 1.13 and 1.14

"go vet" should permit %O in fmt.Printf formats, as the formatting code was added in the 1.13 release.

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jun 2, 2020

Approving for 1.14 (this issue) and 1.13 (#39287). This is a serious problem affecting valid Go code with no workaround.

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jun 2, 2020

I've described the mechanics to perform this backport in full detail in #29986 (comment).

For the 1.14 backport, we only need to backport CL 235100 onto release-branch.go1.14 in x/tools and re-vendor the latest x/tools release-branch.go1.14 branch.

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Jun 2, 2020

Change https://golang.org/cl/236161 mentions this issue: [release-branch.go1.14] go/analysis/passes/printf: allow %O in format strings

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Jun 2, 2020

Closed by merging c00d67ef29d03e4dd86a6fb6a75dba1b71a5e294 to release-branch.go1.14.

@gopherbot gopherbot closed this Jun 2, 2020
gopherbot pushed a commit to golang/tools that referenced this issue Jun 2, 2020
… strings

%O is supported since Go 1.13. See golang.org/design/19308-number-literals for
the background.

Support for %O has been added by copying and adapting the %o implementation.

For golang/go#39288.
For golang/go#29986.

Change-Id: Ic49d3cc8d9aefcc0ecbfcfe5ebf206e6f951d413
Reviewed-on: https://go-review.googlesource.com/c/tools/+/235100
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 8b020ae)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/236161
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jun 2, 2020

Reopening for re-vendor.

@dmitshur dmitshur reopened this Jun 2, 2020
@gopherbot gopherbot closed this Jun 2, 2020
@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jun 2, 2020

@gopherbot, please don't fight.

@dmitshur dmitshur reopened this Jun 2, 2020
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Jun 3, 2020

Change https://golang.org/cl/236199 mentions this issue: [release-branch.go1.14] cmd: update golang.org/x/tools to v0.0.0-20200602230032-c00d67ef29d0

@dmitshur dmitshur self-assigned this Jun 11, 2020
gopherbot pushed a commit that referenced this issue Jun 15, 2020
…0602230032-c00d67ef29d0

This teaches vet to recognize %O in a fmt.Printf format string.
O has been supported since the 1.13 release, but vet would warn about it.

Fixes #39288.
For #29986.

Change-Id: Ia7817ee60ae6beac32cc402c0c68afa917e4ef0f
Reviewed-on: https://go-review.googlesource.com/c/go/+/236199
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jun 15, 2020

Fixed by merging e98cafa to release-branch.go1.14.

@dmitshur dmitshur closed this Jun 15, 2020
@andybons andybons modified the milestones: Go1.14.5, Go1.14.6 Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.