Skip to content

fix(deep-link): add #[non_exhaustive] to DeepLinkError and gate DeepLinkConfig behind feature flag#5050

Merged
bug-ops merged 1 commit into
mainfrom
5045-deep-link-cfg-non-exhaustive
Jun 7, 2026
Merged

fix(deep-link): add #[non_exhaustive] to DeepLinkError and gate DeepLinkConfig behind feature flag#5050
bug-ops merged 1 commit into
mainfrom
5045-deep-link-cfg-non-exhaustive

Conversation

@bug-ops

@bug-ops bug-ops commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

Changes

  • crates/zeph-common/Cargo.toml — declare deep-link = [] feature
  • crates/zeph-common/src/deep_link.rs — add #[non_exhaustive] before #[derive] on DeepLinkError
  • crates/zeph-common/src/lib.rs — gate pub mod deep_link behind cfg(feature = "deep-link")
  • crates/zeph-config/Cargo.toml — declare deep-link = [] feature
  • crates/zeph-config/src/lib.rs — gate pub mod deep_link and AcpPreference/DeepLinkConfig re-exports
  • crates/zeph-config/src/root.rs — gate deep_link field and its Default initializer
  • Cargo.toml — propagate deep-link = ["zeph-common/deep-link", "zeph-config/deep-link"]

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace -- -D warnings — zero warnings
  • RUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked — clean
  • cargo nextest run --workspace --lib --bins — 10782 passed, 21 skipped (no regressions)
  • cargo check -p zeph-common and cargo check -p zeph-config without --features deep-link — both pass (gates complete)
  • cargo check -p zeph-common --features deep-link and cargo check -p zeph-config --features deep-link — both pass

@github-actions github-actions Bot added bug Something isn't working size/M Medium PR (51-200 lines) documentation Improvements or additions to documentation rust Rust code changes dependencies Dependency updates and removed size/M Medium PR (51-200 lines) labels Jun 7, 2026
…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
bug-ops enabled auto-merge (squash) June 7, 2026 19:59
@bug-ops
bug-ops force-pushed the 5045-deep-link-cfg-non-exhaustive branch from 95e9059 to 3a4bb84 Compare June 7, 2026 19:59
@github-actions github-actions Bot added the size/S Small PR (11-50 lines) label Jun 7, 2026
@bug-ops
bug-ops merged commit 0b5cb02 into main Jun 7, 2026
35 checks passed
@bug-ops
bug-ops deleted the 5045-deep-link-cfg-non-exhaustive branch June 7, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependencies Dependency updates documentation Improvements or additions to documentation rust Rust code changes size/S Small PR (11-50 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deep-link: DeepLinkConfig compiled unconditionally despite doc comment claiming feature gate deep-link: DeepLinkError missing #[non_exhaustive]

1 participant