[codex] Enable debug assertions in release test builds#917
[codex] Enable debug assertions in release test builds#917saulshanabrook wants to merge 2 commits into
Conversation
|
@coderabbitai full review |
✅ Action performedFull review finished. |
📝 WalkthroughWalkthroughThe PR adds a single configuration line to enable debug assertions in the release build profile. This change allows debug assertion checks to remain active even when building optimized release binaries, rather than being stripped out by default. ChangesRelease Profile Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
Release-mode test targets now enable debug assertions through the Cargo profile environment override
CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS=true.This applies to:
make testmake coveragemake doctestNormal release builds and CodSpeed benchmark jobs continue to use the standard release profile, so debug assertions remain disabled for benchmark and production release artifacts.
Added because we missed a bug recently that would have been found if we had enabled these in testing in CI.
It doesn't seem to slow things down too much, like from 8 minutes to 9 minutes.
Validation
cargo test --release -p egglog-core-relations --lib bad_offset -- --list0 testsfor#[cfg(debug_assertions)]testsCARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS=true cargo test --release -p egglog-core-relations --lib bad_offsetCARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS=true cargo insta test --test-runner nextest --release --workspace --unreferenced ignore -- mathmake -n test coverage doctestgit diff --check