Skip to content

Conversation

@maargenton
Copy link
Owner

@maargenton maargenton commented Oct 30, 2025

  • Update Go version to 1.24
  • Cleanup Panics() predicate -- no more panic(nil) special case
  • Add bdd.Used() convenience function

- Update Panics() predicate to no longer consider special case for `panic(nil)` (see Go 1.21 panic behavior change)
@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.31%. Comparing base (be114a7) to head (6a04e63).

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     
Flag Coverage Δ
unittests 93.31% <100.00%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maargenton maargenton requested a review from Copilot October 30, 2025 09:38
Copy link

Copilot AI left a 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
@maargenton maargenton merged commit afe9445 into master Oct 30, 2025
16 checks passed
@maargenton maargenton deleted the maa/go1.24 branch October 30, 2025 09:55
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.

3 participants