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

chore(golang): Update to Go 1.22 #149

Merged
merged 1 commit into from
Aug 5, 2024
Merged

chore(golang): Update to Go 1.22 #149

merged 1 commit into from
Aug 5, 2024

Conversation

ryanschneider
Copy link
Contributor

📝 Summary

Update go.mod to go 1.21+ format w/ toolchain directive and update Docker container to use go 1.22.

⛱ Motivation and Context

Running go mod tidy w/ go 1.22 or higher wants to rewrite the go.mod with the new toolchain directive, which causes go 1.20 to die with an unrecognized directive error.

📚 References

https://go.dev/doc/toolchain


✅ I have run these commands

  • make lint
  • make test
  • go mod tidy

@ryanschneider ryanschneider marked this pull request as ready for review August 1, 2024 17:51
@ryanschneider
Copy link
Contributor Author

Forgot to mention this also updates geth to 1.14.7 which is the minimum supported version for go 1.21 and higher.

@@ -1,17 +1,20 @@
module github.com/flashbots/rpc-endpoint

go 1.20
go 1.21
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it necessary to make the minimum version v1.21?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ya, versions older than 1.21 choke on the new toolchain directive below that go 1.22 adds. I'm actually surprised that the Go team didn't consider this, I feel like the toolchain directive should've only been added for newer go versions but I can't find a way to do that.

Basically running into the same issue as: golang/go#65847 (comment)

@ryanschneider ryanschneider merged commit f59b440 into main Aug 5, 2024
2 checks passed
@ryanschneider ryanschneider deleted the go-1.22 branch August 5, 2024 21:37
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