-
-
Notifications
You must be signed in to change notification settings - Fork 19
Add go 1.24 #182
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
Add go 1.24 #182
Conversation
Warning Rate limit exceeded@nao1215 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 56 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughThis pull request updates the GitHub Actions workflow configuration by expanding the Go testing matrix. Go version "1.24" is now included in the list of versions against which the unit tests are run, alongside the previous versions from "1" to "1.23". The overall job configuration, triggers, and workflow structure remain unchanged, and no modifications have been made to any exported or public entities. Changes
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/unit_test.yml (1)
21-26
: Reorder Go versions for better readability.The Go versions in the matrix are not in sequential order. Consider reordering them from newest to oldest for better maintainability.
go: - - "1" - - "1.24" - - "1.23" - - "1.22" - - "1.21" - - "1.20" + - "1.24" + - "1.23" + - "1.22" + - "1.21" + - "1.20" + - "1"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/unit_test.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Unit test (linux) (windows-latest, 1.20)
- GitHub Check: Unit test (linux) (windows-latest, 1.21)
- GitHub Check: Unit test (linux) (windows-latest, 1.22)
- GitHub Check: Unit test (linux) (windows-latest, 1.23)
- GitHub Check: Unit test (linux) (windows-latest, 1)
🔇 Additional comments (1)
.github/workflows/unit_test.yml (1)
22-22
:✅ Verification successful
Verify Go 1.24 release status.
Let's verify if Go 1.24 is officially released and stable.
🌐 Web query:
Is Go 1.24 released? What is the latest stable version of Go?
💡 Result:
Go 1.24 was officially released on February 12, 2025, as confirmed by multiple sources including the official Go blog[1][3][7]. This release introduces significant improvements while maintaining backward compatibility with previous versions.
Key Features in Go 1.24
- Generic Type Aliases: Full support for parameterized type aliases (
type MyAlias[T int | string] = T
), enhancing code reusability[1][3][7].- Performance Optimizations:
- A new
map
implementation using Swiss Tables reduces CPU overhead by ~3%[1][7].- Improved memory allocation for small objects[1].
- Toolchain Enhancements:
go get -tool
adds tool dependencies togo.mod
[1][3].- New
go vet
checks for test/benchmark declarations[1].- FIPS 140-3 Compliance: Built-in cryptographic module (v1.0.0) for approved algorithms without code changes[1][3][7].
- WebAssembly Support:
go:wasmexport
directive and WASI reactor/library builds[1][7].System Requirements
- Requires Linux kernel ≥3.2[3][7].
- Final release supporting macOS Big Sur (11); Go 1.25 will require macOS Monterey (12)[7].
The latest stable version as of February 13, 2025 is Go 1.24, available for download via the official portal[1]. For older versions like Go 1.23.x or Go 1.22.x, security updates are provided until two subsequent major releases arrive[5].
Citations:
- 1: https://go.dev/blog/go1.24
- 2: https://tip.golang.org/doc/go1.21
- 3: https://dev.to/leapcell/go-124-released-massive-optimizations-key-upgrades-1mbn
- 4: https://is.go.released.info
- 5: https://endoflife.date/go
- 6: https://forum.golangbridge.org/t/when-i-can-expect-to-have-go1-24/37781
- 7: https://tip.golang.org/doc/go1.24
- 8: https://tip.golang.org/doc/go1.23
- 9: https://antonz.org/go-1-24/
- 10: https://go.dev/doc/devel/release
Confirmed: Go 1.24 is officially released as of February 12, 2025.
The snippet in
.github/workflows/unit_test.yml
referencing"1.24"
correctly reflects the latest stable Go version. No further changes are needed.
@@ -19,6 +19,7 @@ jobs: | |||
- "macos-latest" | |||
go: | |||
- "1" |
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.
💡 Verification agent
🧩 Analysis chain
Verify if version "1" is valid.
Let's verify if using just "1" as a version number is valid in the actions/setup-go action.
🌐 Web query:
Is specifying just "1" a valid version for actions/setup-go@v5?
💡 Result:
Specifying go-version: '...
in GitHub Actions' actions/setup-go@v5
is technically valid but not recommended due to potential ambiguity in resolving Go versions[5][9]. Here’s why:
Key Details
Syntax Support
The setup-go
action accepts:
- Exact versions (
...
,...
) - Semantic ranges (
>=...
,^...
) .x
notation (...x
)[9]
For example:
with:
go-version: ... # Valid but ambiguous
go-version: ...x # Better practice
Behavior with ...
When you specify ...
:
- GitHub Actions interprets this as
>= ... < ...
via SemVer rules[5] - May resolve to unexpected minor/patch releases depending on cached versions
- No guarantee of getting latest
...x
automatically[8]
Best Practices
For Stability
with:
go-version: ... # Locked minor/patch
For Latest Features
with:
go-version: ...x # Latest patch in minor release
check-latest: true # Force fresh check[3][5]
Avoid Ambiguity
Instead of ...
, use:
with:
go-version-file: go.mod # Use project's declared Go version[4]
Performance Impact
Configuration | Speed | Version Freshness |
---|---|---|
goVerison: ... |
Fastest | Potentially stale |
check-latest: true |
Slower | Most up-to-date[3][5] |
While goVersion: ...
works syntactically[9], explicit version constraints (...x
) provide clearer intent and more predictable behavior across CI runs[3][8].
Citations:
- 1: https://blog.kowalczyk.info/article/8dd9c2c0413047c589a321b1ccba7129/using-github-actions-with-go.html
- 2: https://namespace.so/blog/5-tips-for-faster-github-actions
- 3: https://cicube.io/workflow-hub/actions-setup-go/
- 4: https://dolthub.com/blog/2024-04-19-golang-pgo-builds-using-github-actions/
- 5: https://github.com/marketplace/actions/setup-go-environment
- 6: https://spacelift.io/blog/github-actions-tutorial
- 7: https://olegk.dev/github-actions-and-go
- 8: How to run tests with latest golang version actions/setup-go#455
- 9: https://github.com/actions/setup-go
- 10: https://gitnet.fr/actions/setup-go/src/commit/07948221bef819e39255ccb730b9ead9f22c5c03
Action Required: Refine Go Version Specification
The current usage of - "1"
in the workflow is technically valid for actions/setup-go@v5
but is ambiguous in its intent. This ambiguity can lead to unexpected minor or patch updates when the action resolves the Go version. It is recommended to use a more explicit version format, such as 1.x
or a specific version number (e.g., 1.18
), to ensure consistent behavior during CI runs.
- Consider updating the version specification to avoid potential ambiguity.
- For example, use:
if you intend to track the latest patch within the major version, or specify an exact version if stability is required.
with: go-version: "1.x"
Code Metrics Report
Details | | main (a938d8f) | #182 (db01b7f) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 86.2% | 86.2% | +0.0% |
| Files | 14 | 14 | 0 |
| Lines | 602 | 603 | +1 |
+ | Covered | 519 | 520 | +1 |
- | Test Execution Time | 15s | 18s | +3s | Code coverage of files in pull request scope (83.3% → 85.7%)
Reported by octocov |
Summary by CodeRabbit