-
Notifications
You must be signed in to change notification settings - Fork 402
Bump Go version to indicate correct minimum requirement #452
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
Conversation
The minimum requirement that we have was silently bumped to 1.21 in #441 because of the `slices` package. It seems that we did not update the `go.mod` when we updated our CI range, because CI did not fail because it was not testing older versions. We probably should just update the `go.mod` when we update the CI target in the future? Although we could theoretically stay at 1.21 in terms of the code base.
What's up with the go1.22 failures, do we have some old build tags we can get rid of now? |
https://github.com/golang-jwt/jwt/blame/3839817bf313f2cfe58853dcbe542ffd06300831/rsa_pss.go#L1-L2 I think we can just remove those two build tags. They were probably from a time when Go 1.4 was new. But I think we still have some other build tags for the errors, don't we? |
Yep, that's what I was thinking. Remove those very old build tags entirely. |
The error handling ones are Go 1.20 build tags, which technically we would also not need anymore when we bump the minimum version to Go 1.21. I am not a BIG fan of doing this now within a major version but we (I) accidentically already released the latest v5 version which needs 1.21 without bumping it (nor realizing that it needs Go 1.21) so I guess the damage is done already :( |
It's probably defensible to bump the minimum Go version at some point. We probably don't need to keep up with the latest 2 versions like the Go team does. We do call out that we keep up with the supported versions. And we rarely (if ever) pull in new features. Basically, I think it's fine as it is for now. Any concerns? The alternative is to remove |
Agree
100 % agree, no concerns from my side then.
No, let's go forward, not backwards. I'll clean it up and remove the remaining code for Go < 1.21. |
@mfridman please have another look, I cleaned up the errors.go file. I also added Go 1.21 to our build matrix, just to be safe so that we will catch something like this in the future. Should we retract v5.2.3 and publish a v5.2.4 with the proper go.mod indicating it needs Go 1.21? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to retract the existing version. Rolling forward is good enough; if there were issues, I think more folks would have filed.
The minimum requirement that we have was silently bumped to 1.21 in #441 because of the
slices
package. It seems that we did not update thego.mod
when we updated our CI range, because CI did not fail because it was not testing older versions.We probably should just update the
go.mod
when we update the CI target in the future? Although we could theoretically stay at 1.21 in terms of the code base.