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

[CHANGED] Remove toolchain version from go.mod #1763

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module github.com/nats-io/nats.go

go 1.20
Copy link
Member

Choose a reason for hiding this comment

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

need to change this one to 1.20.0 then

Copy link
Collaborator Author

@piotrpio piotrpio Jan 11, 2025

Choose a reason for hiding this comment

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

Could you explain why that is the case?

Copy link
Contributor

Choose a reason for hiding this comment

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

The change to the first release of a go release branch being 1.x.0 and not 1.x only happened in 1.21.0 so I think if we are compatible with 1.20 series then 1.20 is the correct version as 1.20.0 didnt exist?

Copy link
Member

Choose a reason for hiding this comment

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

good point... maybe for someone using Go 1.20 that is the case, but if it changes to go 1.21 or later then it has to be go 1.21.0, @piotrpio full background is here: golang/go#62278 (comment)
golang/go#62278 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes aware for newer releases if needs the .0, but not for 1.20

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@wallyqs thanks - so it looks good for now, after updating to newer version in go.mod we'll have to add patch version as well.

Copy link
Member

Choose a reason for hiding this comment

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

quite a bit of repos doing 1.20.0 so not 100% sure now, but we can wait and see: https://github.com/search?q=%22go+1.20.0%22+language%3A%22Go+Module%22&type=code&l=Go+Module

Copy link
Contributor

Choose a reason for hiding this comment

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

readme.md says:

Additionally, this library always supports at least 2 latest minor Go versions. For example, if the latest Go version is 1.22, the library will support Go 1.21 and 1.22.

So should it be bumped to 1.22.0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well, it says at least 2 minor versions, and we definitely could do that, we just did not need to. When go 1.24 comes out, we definitely want to bump the version in go.mod to 1.23 to stop hiding useful features (iterators) behind build tags.

That said, I think we could still bump to 1.22 for the next client release.


toolchain go1.23.2

require (
github.com/klauspost/compress v1.17.9
github.com/nats-io/nkeys v0.4.9
Expand Down
Loading