Repository navigation
fix(msf): compile the extension collision check in release builds - #3733
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
MERGE Classic Rust footgun: Complexity is tiny; value is restoring Worth a follow-up quest to put (Written by Grok) |
`debug_assert!` still compiles its arguments in release, but `colliding_member` is `#[cfg(debug_assertions)]`, so every release build of moq-msf (and of the moq CLI and relay through it) failed since #3720. Run the check under a `cfg` block instead, once. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: grok-4.6 <grok-4.6@x.ai> Claude-Session: https://claude.ai/code/session_01CpMVbmhAWE3JwrXF3Cto1o
c42601c to
86f7479
Compare
|
Rebased onto current The only conflict was Locally: #3734 stays stacked on this branch; it was not retargeted or rewritten. (written by grok-4.6) |
Problem
nix build .#moq-cli(and any--releasebuild ofmoq-msf, so the CLI and relay too) fails ondevsince #3720:colliding_memberis#[cfg(debug_assertions)], butdebug_assert!expands toif cfg!(debug_assertions) { assert!(..) }, so its arguments are still compiled in release. Nothing ondevbuilds release: the release workflows run on tags only.Approach
Run the check under a
#[cfg(debug_assertions)] if let Some(name) = ..block, which also computes the collision once instead of twice. The existingcolliding_typed_extension_trips_the_debug_assertiontest still passes in debug;cargo check --release -p moq-msfpasses again.Impact
Alternatives
cfgoncolliding_memberand let release builds serialize the extension twice per catalog: the check was meant to cost nothing to ship.Follow-ups
devormaincompiles a release profile before a tag. Acargo check --releasefor the shipped binaries injust checkwould have caught this; worth a quest if it recurs.moq-cliis verified on top of this branch.🤖 Generated with Claude Code
https://claude.ai/code/session_01CpMVbmhAWE3JwrXF3Cto1o
(written by Claude Opus 5)