Skip to main content

vyre_libs/
compat_aliases.rs

1//! Compatibility alias registry for public shim paths.
2//!
3//! Every compatibility path keeps one metadata row here so facade docs,
4//! release gates, and internal import audits agree on the canonical owner.
5
6/// Metadata for one public compatibility alias.
7#[derive(Clone, Copy, Debug, Eq, PartialEq)]
8pub struct CompatibilityAlias {
9    /// Deprecated public path retained for transition consumers.
10    pub deprecated_path: &'static str,
11    /// Canonical path that internal code and new consumers should import.
12    pub canonical_path: &'static str,
13    /// Module that owns the real implementation.
14    pub canonical_owner: &'static str,
15    /// Concrete condition that must be true before removing the alias.
16    pub removal_condition: &'static str,
17}
18
19/// Root compatibility alias for the former matching dialect name.
20pub const MATCHING_ALIAS: CompatibilityAlias = CompatibilityAlias {
21    deprecated_path: "vyre_libs::matching",
22    canonical_path: "vyre_libs::scan",
23    canonical_owner: "vyre-libs/src/scan",
24    removal_condition: "public-api snapshot and downstream compatibility tests no longer require vyre_libs::matching",
25};
26
27/// Leaf compatibility alias for the former substring path.
28pub const MATCHING_SUBSTRING_ALIAS: CompatibilityAlias = CompatibilityAlias {
29    deprecated_path: "vyre_libs::matching::substring",
30    canonical_path: "vyre_libs::scan::substring",
31    canonical_owner: "vyre-libs/src/scan/substring",
32    removal_condition: "public-api snapshot and substring compatibility test no longer require vyre_libs::matching::substring",
33};
34
35/// All compatibility aliases exposed by `vyre-libs`.
36pub const COMPATIBILITY_ALIASES: &[CompatibilityAlias] =
37    &[MATCHING_ALIAS, MATCHING_SUBSTRING_ALIAS];