-
Notifications
You must be signed in to change notification settings - Fork 0
Update dependency to Go 1.24 #32
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
- Update Panics() predicate to no longer consider special case for `panic(nil)` (see Go 1.21 panic behavior change)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #32 +/- ##
==========================================
- Coverage 93.44% 93.31% -0.14%
==========================================
Files 30 31 +1
Lines 2150 1839 -311
==========================================
- Hits 2009 1716 -293
+ Misses 141 123 -18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR updates the project to use Go 1.24, removes special handling for panic(nil) cases in the Panics() predicate, and adds a utility function to suppress unused variable warnings during test development.
- Go version upgraded from 1.19/1.23 to 1.24 across module and CI workflows
- Simplified
Panics()predicate to accept nil panic values as valid panics - Added
bdd.Used()utility function to suppress compiler warnings for unused variables in tests
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Updated Go version to 1.24 and upgraded golang.org/x/tools dependency |
| go.sum | Updated checksums for upgraded dependencies |
| .github/workflows/build.yaml | Simplified CI matrix to only test Go 1.24.x and stable |
| .github/workflows/release.yaml | Updated release workflow to use Go 1.24.x |
| pkg/utils/predicate/impl/panic.go | Removed nil panic value special handling, treating panic(nil) as a valid panic |
| pkg/utils/predicate/impl/panic_test.go | Removed test case for panic(nil) error behavior |
| pkg/bdd/utils.go | Added Used() utility function to mark variables as used |
| pkg/bdd/utils_test.go | Added test for Used() utility function |
Comments suppressed due to low confidence (1)
pkg/utils/predicate/impl/panic.go:12
- The function documentation still mentions that 'panic(nil) is considered an error', but the implementation has been changed to accept panic(nil) as a valid panic. This documentation is now outdated and should be updated or removed to reflect the new behavior.
// Panics verifies that the value under test is a callable function that panics.
// Special case using panic(nil) is considered an error because common recover()
// code will not catch it.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Update codegen to use `text/template`, not `html/template` -- avoid unwanted html escape - Rerun codegen
Panics()predicate -- no morepanic(nil)special casebdd.Used()convenience function