fix(deep-link): add #[non_exhaustive] to DeepLinkError and gate DeepLinkConfig behind feature flag#5050
Merged
Merged
Conversation
…inkConfig behind feature flag Add #[non_exhaustive] to DeepLinkError (closes #5045): prevents downstream match exhaustiveness failures when Phase 2/3 add new variants; matches the project-wide convention for public error enums. Gate DeepLinkConfig and deep_link modules behind cfg(feature = "deep-link") (closes #5046): aligns runtime behavior with the module-level doc that already claimed the feature gate; propagates the feature flag from the root crate into zeph-common and zeph-config so disabling deep-link at compile time works end-to-end.
bug-ops
enabled auto-merge (squash)
June 7, 2026 19:59
bug-ops
force-pushed
the
5045-deep-link-cfg-non-exhaustive
branch
from
June 7, 2026 19:59
95e9059 to
3a4bb84
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#[non_exhaustive]toDeepLinkErrorto prevent downstream match exhaustiveness failures when Phase 2/3 introduce new variants (closes deep-link: DeepLinkError missing #[non_exhaustive] #5045)DeepLinkConfiganddeep_linkmodules behind#[cfg(feature = "deep-link")]to align runtime behavior with the existing module-level documentation (closes deep-link: DeepLinkConfig compiled unconditionally despite doc comment claiming feature gate #5046)Changes
crates/zeph-common/Cargo.toml— declaredeep-link = []featurecrates/zeph-common/src/deep_link.rs— add#[non_exhaustive]before#[derive]onDeepLinkErrorcrates/zeph-common/src/lib.rs— gatepub mod deep_linkbehindcfg(feature = "deep-link")crates/zeph-config/Cargo.toml— declaredeep-link = []featurecrates/zeph-config/src/lib.rs— gatepub mod deep_linkandAcpPreference/DeepLinkConfigre-exportscrates/zeph-config/src/root.rs— gatedeep_linkfield and itsDefaultinitializerCargo.toml— propagatedeep-link = ["zeph-common/deep-link", "zeph-config/deep-link"]Test plan
cargo +nightly fmt --check— cleancargo clippy --workspace -- -D warnings— zero warningsRUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked— cleancargo nextest run --workspace --lib --bins— 10782 passed, 21 skipped (no regressions)cargo check -p zeph-commonandcargo check -p zeph-configwithout--features deep-link— both pass (gates complete)cargo check -p zeph-common --features deep-linkandcargo check -p zeph-config --features deep-link— both pass