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

Upgrade to go 1.23 #466

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Upgrade to go 1.23 #466

wants to merge 2 commits into from

Conversation

thecsw
Copy link

@thecsw thecsw commented Sep 3, 2024

Following upon #461, updating the go version to latest, the 1.23 release gives us many new improvements in both the compiler land and tooling land to utilize:

  • Profile Guided Optimizations (PGOs) straight with the compiler allows for 2-7% perf improvements. GA in 1.21.
  • Built-in min, max, so we don't have to constantly implement our own, see: utility.go:129, modules/mssql/connection.go:749, modules/oracle/types_test.go:455, lib/ssh/channel.go:134
  • Structured logging in the standard library!
  • Slices and maps helpers in the standard library.
  • ...and many other improvements all around that we would get for free with all the new tooling to improve zgrab2 further.

How to Test

CI/CD involved should handle it. As Go team noted in all release notes since 1.20 (current version in this project) to now,

As always, the release maintains the Go 1 promise of compatibility. We expect almost all Go programs to continue to compile and run as before.

Compiling and running the program yields no issues.

Notes & Caveats

Only one "breaking" compile-time issue found in modules/amqp091/scanner.go:250, where ChannelMax was expecting an int but got an uint16. Casting here is safe as this is a type promotion with no requirements for this variable to be exactly 16 bits.

Issue Tracking

Add a link to the relevant GitHub issue(s) if the pull request resolves it.

Signed-off-by: Sandy <[email protected]>
Signed-off-by: Sandy <[email protected]>
@phillip-stephens
Copy link
Contributor

Hey @thecsw, thanks for this!

Off-hand, though, I'm hesitant to want to bump this to Go 1.23 for backwards-compatibility. We have users using older OS's and don't want to preclude them from being able to compile from source. All the compiler-driven enhancements you mention can still be obtained today by using the latest Go compiler on the existing source code. I don't think the other built-ins standard library enhancements can justify decreasing backwards compatibility, IMO.

@thecsw
Copy link
Author

thecsw commented Sep 3, 2024

Sure thing and totally valid! With this bump, it would require, at least on major systems, to run at least Big Sur for Mac and windows 10 (some new ports for bsd/etc. introduced)—makes sense for compat

We could possibly leave this open/archived for whenever time comes to upgrade to go1.23, at least

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