Skip to content

Commit 4aaacb0

Browse files
committed
fix(bridges): guard deprecated-alias re-exports + ontology self-impls (#589 follow-up)
PR #589 added `#[deprecated]` to the consumer-facing bridge symbols but left two internal use-sites unguarded, so `cargo clippy -- -D warnings` errored. Two same-class fixes: 1. `lance-graph-ogar/src/bridges/mod.rs` — split the re-export: the six `*Port` types + `UnifiedBridge` stay in the clean group; the six deprecated aliases (`MedcareBridge` / `OpenProjectBridge` / `RedmineBridge` / `OdooBridge` / `SmbBridge` / `WoaBridge`) move under `#[allow(deprecated)]`. (The owner flagged this as the P0; the mod.rs guard never landed because it was dropped in the #589 rebase.) 2. `lance-graph-ontology/src/bridges/{ogit,spear,sharepoint,woa}_bridge.rs` — each module IS its deprecated struct's implementation, so its own impl blocks (+ woa's `_compile_check`) reference the deprecated struct intentionally. Added module-level `#![allow(deprecated)]` to each. Consumers in other crates still get the warning. Verified: `cargo check -p lance-graph-ontology` and `cargo check -p lance-graph-ogar` both Finished with 0 deprecation warnings at the re-export / self-impl sites. The `#[deprecated]` notes still fire at genuine external consumer use-sites (the intended beacon). Out of scope (pre-existing TD-ONTOLOGY-LINT, per #589 review): the `doc_nested_refdefs` / `oxrdf::Subject` / `odoo_blueprint doc_lazy_continuation` clippy lints — separate cleanup. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
1 parent fdbe09d commit 4aaacb0

5 files changed

Lines changed: 45 additions & 6 deletions

File tree

crates/lance-graph-ogar/src/bridges/mod.rs

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,32 @@ mod redmine_bridge;
6363
mod smb_bridge;
6464
mod woa_bridge;
6565

66-
pub use medcare_bridge::{HealthcarePort, MedcareBridge};
67-
pub use odoo_bridge::{OdooBridge, OdooPort};
68-
pub use openproject_bridge::{OpenProjectBridge, OpenProjectPort};
69-
pub use redmine_bridge::{RedmineBridge, RedminePort};
70-
pub use smb_bridge::{SmbBridge, SmbPort};
66+
// Canonical surface — the `*Port` types and the `UnifiedBridge` harness
67+
// are the replacement and are NOT deprecated.
68+
pub use medcare_bridge::HealthcarePort;
69+
pub use odoo_bridge::OdooPort;
70+
pub use openproject_bridge::OpenProjectPort;
71+
pub use redmine_bridge::RedminePort;
72+
pub use smb_bridge::SmbPort;
7173
pub use unified::UnifiedBridge;
72-
pub use woa_bridge::{WoaBridge, WoaPort};
74+
pub use woa_bridge::WoaPort;
75+
76+
// Deprecated per-port bridge aliases (2026-06-22) — pull the classid via
77+
// the corresponding PortSpec instead. The `#[allow(deprecated)]` here
78+
// silences the re-export site; the lint still fires at consumer
79+
// use-sites. See `docs/CONSUMER-BRIDGE-DEPRECATION.md` + AdaWorldAPI/OGAR#95.
80+
#[allow(deprecated)]
81+
pub use medcare_bridge::MedcareBridge;
82+
#[allow(deprecated)]
83+
pub use odoo_bridge::OdooBridge;
84+
#[allow(deprecated)]
85+
pub use openproject_bridge::OpenProjectBridge;
86+
#[allow(deprecated)]
87+
pub use redmine_bridge::RedmineBridge;
88+
#[allow(deprecated)]
89+
pub use smb_bridge::SmbBridge;
90+
#[allow(deprecated)]
91+
pub use woa_bridge::WoaBridge;
7392

7493
// Compatibility shims for the pre-migration constants. `bridges`
7594
// previously re-exported `OPENPROJECT_CODEBOOK` / `REDMINE_CODEBOOK`

crates/lance-graph-ontology/src/bridges/ogit_bridge.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
//! A common pattern is to spin one `OgitBridge` per OGIT namespace that
99
//! the consumer cares about, e.g. one for `Network`, another for `Auth`.
1010
11+
// This module IS the deprecated `OgitBridge`'s implementation; its own
12+
// impl blocks reference the deprecated struct intentionally. Consumers in
13+
// other crates still get the warning. See docs/CONSUMER-BRIDGE-DEPRECATION.md.
14+
#![allow(deprecated)]
15+
1116
use crate::bridge::{BridgeFromRegistry, NamespaceBridge};
1217
use crate::error::{Error, Result};
1318
use crate::namespace::NamespaceId;

crates/lance-graph-ontology/src/bridges/sharepoint_bridge.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
//! the scope-lock catches any cross-namespace leak before it reaches the
2323
//! orchestrator's storage schema.
2424
25+
// This module IS the deprecated `SharePointBridge`'s implementation; its own
26+
// impl blocks reference the deprecated struct intentionally. Consumers in
27+
// other crates still get the warning. See docs/CONSUMER-BRIDGE-DEPRECATION.md.
28+
#![allow(deprecated)]
29+
2530
use crate::bridge::{BridgeFromRegistry, NamespaceBridge};
2631
use crate::error::{Error, Result};
2732
use crate::namespace::NamespaceId;

crates/lance-graph-ontology/src/bridges/spear_bridge.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
//! catches any cross-namespace leak before it reaches Spear's columnar
1616
//! schema.
1717
18+
// This module IS the deprecated `SpearBridge`'s implementation; its own
19+
// impl blocks reference the deprecated struct intentionally. Consumers in
20+
// other crates still get the warning. See docs/CONSUMER-BRIDGE-DEPRECATION.md.
21+
#![allow(deprecated)]
22+
1823
use crate::bridge::{BridgeFromRegistry, NamespaceBridge};
1924
use crate::error::{Error, Result};
2025
use crate::namespace::NamespaceId;

crates/lance-graph-ontology/src/bridges/woa_bridge.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
//! namespace. Phase 6 of this session emits the corresponding TTL into
33
//! `AdaWorldAPI/OGIT/NTO/WorkOrder/`.
44
5+
// This module IS the deprecated `WoaBridge`'s implementation; its own impl
6+
// blocks + `_compile_check` reference the deprecated struct intentionally.
7+
// Consumers in other crates still get the warning. See docs/CONSUMER-BRIDGE-DEPRECATION.md.
8+
#![allow(deprecated)]
9+
510
use crate::bridge::{BridgeError, BridgeFromRegistry, NamespaceBridge};
611
use crate::error::{Error, Result};
712
use crate::namespace::NamespaceId;

0 commit comments

Comments
 (0)