fix(moq-native): keep has_peer_certificate as deprecated, release 0.17.3#1790
Conversation
#1789 renamed Request::has_peer_certificate to peer_identity, which cargo-semver-checks flagged as a breaking change and bumped moq-native to 0.18.0. Nothing outside the repo consumes it, and the only in-tree caller (moq-relay) already migrated, but moq-relay pins moq-native via a caret "0.17" range. An older moq-relay would resolve forward to a fresh 0.17.x and fail to compile if the method were gone, so a patch release must keep it. Re-add has_peer_certificate as a #[deprecated] shim delegating to peer_identity().is_some(), which restores API compatibility and lets this ship as a 0.17.3 patch instead of 0.18.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
WalkthroughA deprecated convenience method 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
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 |
Summary
#1789 renamed
Request::has_peer_certificatetopeer_identity(returningOption<PeerIdentity>instead ofbool). cargo-semver-checks flagged the rename as a breaking change, so release-plz proposed bumpingmoq-nativeto0.18.0in the release PR #1774.That bump is heavier than it needs to be, and a plain rename is also a compatibility hazard:
moq-relay(and other in-tree crates) depend onmoq-nativevia a caret"0.17"range. An oldermoq-relaythat still callshas_peer_certificatewould resolve forward to a freshly published0.17.xand fail to compile if the method were gone. So restoring the method is what makes a patch release legitimate.This PR:
Request::has_peer_certificate(&self) -> boolas a#[deprecated(note = "use peer_identity instead")]shim that delegates toself.peer_identity().is_some(), preserving the original behavior and API surface.moq-native0.17.2 -> 0.17.3(+ matchingCargo.lock).With the method restored, cargo-semver-checks no longer sees a breaking change, so this ships as a clean
0.17.3patch. Once merged, release-plz will regenerate #1774 with0.17.3instead of0.18.0.Nothing outside the repo consumes this API (no external consumers yet), and the only in-tree caller,
moq-relay, already migrated topeer_identity(), so it won't trigger the deprecation warning.Test plan
cargo check -p moq-nativepasseshas_peer_certificatecallers in-tree (shim is purely for external/older pins)(Written by Claude)