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

x/playground: formatting a modern go.mod file fails incorrectly with "invalid go version" #65891

Closed
dmitshur opened this issue Feb 23, 2024 · 2 comments
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Feb 23, 2024

Consider a playground snippet that includes a go.mod file as if generated by go mod init play.ground using the latest stable version of Go: https://go.dev/play/p/ZtkN19wIOev.

Pressing the "Format" (not "Run") button fails with an incorrect error message:

go.mod:3: invalid go version '1.22.0': must match format 1.23

I suspect this might be fixed if x/playground is updated to a more recent version of x/mod. It's currently using v0.9.0.

(Most x/ repos get automatic monthly updates of x/ dependencies, but x/playground is currently skipped because of #24823. So fixing that might also indirectly fix this issue.)

Issues #32980 and #32614 are also related.

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. FixPending Issues that have a fix which has not yet been reviewed or submitted. labels Feb 23, 2024
@dmitshur dmitshur added this to the Unreleased milestone Feb 23, 2024
@gopherbot
Copy link

Change https://go.dev/cl/566275 mentions this issue: go.mod: update golang.org/x/mod dependency

gopherbot pushed a commit to golang/playground that referenced this issue Feb 23, 2024
Done with:

go get golang.org/x/mod
go mod tidy

Using go1.22.0.

For golang/go#65891.

Change-Id: I79ec0620be780e3cf5ecbbc0bde6b4e19febce99
Reviewed-on: https://go-review.googlesource.com/c/playground/+/566275
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
@dmitshur
Copy link
Contributor Author

This was indeed fixed by CL 566275.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants