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

go.mod: change version from 1.23 to 1.23.0 #218

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

chibby0ne
Copy link
Contributor

1.23 is not a downloable release. Go mod should list the specific toolchain that can be downloaded as mentioned here: golang/go#62278 (comment) Otherwise opening the project having a different version installed will result in errors, e.g:

$ go version
go: downloading go1.23 (linux/amd64)
go: download go1.23 for linux/amd64: toolchain not available

1.23 is not a downloable release. Go mod should list the specific
toolchain that can be downloaded as mentioned here:
golang/go#62278 (comment)
Otherwise opening the project having a different version installed will
result in errors, e.g:

```
$ go version
go: downloading go1.23 (linux/amd64)
go: download go1.23 for linux/amd64: toolchain not available
```

Signed-off-by: Antonio Gutierrez <antonio.gutierrez1@ibm.com>
@chibby0ne chibby0ne requested a review from a team as a code owner September 9, 2024 15:01
Copy link
Contributor

@konrad-ohms konrad-ohms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chibby0ne, good catch

@konrad-ohms konrad-ohms merged commit 97022f8 into main Sep 10, 2024
8 checks passed
@konrad-ohms konrad-ohms deleted the fix_go_mod_version branch September 10, 2024 06:54
@konrad-ohms
Copy link
Contributor

I am still wondering why they document it differently: https://go.dev/doc/modules/gomod-ref
image
image

@chibby0ne
Copy link
Contributor Author

Mmm that's a very good catch!
Maybe that snippet was done whilst using a development release and so, they had to specify the toolchain using GO_TOOLCHAIN?
Or maybe that snippet was done before this "go toolchain" thing was defined and so the go cli wouldn't try to download the exact version written in the go.mod and so it wouldn't result in an error?
In any case, a case can be made of proposing a doc change with another more up to date code snippet with less surprising behavior if one were to recreate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants