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

Conversation

piotrpio
Copy link
Collaborator

@piotrpio piotrpio commented Jan 7, 2025

Signed-off-by: Piotr Piotrowski [email protected]

@piotrpio piotrpio requested a review from Jarema January 7, 2025 14:32
@coveralls
Copy link

Coverage Status

coverage: 84.93%. remained the same
when pulling 87c13df on remove-toolchain-from-go-mod
into 1474bf3 on main.

Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

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

LGTM

@piotrpio piotrpio merged commit 1e1519f into main Jan 7, 2025
4 checks passed
@piotrpio piotrpio deleted the remove-toolchain-from-go-mod branch January 7, 2025 21:58
@@ -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.

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.

6 participants