From 4aaacb0a2cbc92350cfe35e513220cdbbe3b0556 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 22 Jun 2026 18:25:28 +0000 Subject: [PATCH] fix(bridges): guard deprecated-alias re-exports + ontology self-impls (#589 follow-up) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP --- crates/lance-graph-ogar/src/bridges/mod.rs | 31 +++++++++++++++---- .../src/bridges/ogit_bridge.rs | 5 +++ .../src/bridges/sharepoint_bridge.rs | 5 +++ .../src/bridges/spear_bridge.rs | 5 +++ .../src/bridges/woa_bridge.rs | 5 +++ 5 files changed, 45 insertions(+), 6 deletions(-) diff --git a/crates/lance-graph-ogar/src/bridges/mod.rs b/crates/lance-graph-ogar/src/bridges/mod.rs index 47f77150..17837ff2 100644 --- a/crates/lance-graph-ogar/src/bridges/mod.rs +++ b/crates/lance-graph-ogar/src/bridges/mod.rs @@ -63,13 +63,32 @@ mod redmine_bridge; mod smb_bridge; mod woa_bridge; -pub use medcare_bridge::{HealthcarePort, MedcareBridge}; -pub use odoo_bridge::{OdooBridge, OdooPort}; -pub use openproject_bridge::{OpenProjectBridge, OpenProjectPort}; -pub use redmine_bridge::{RedmineBridge, RedminePort}; -pub use smb_bridge::{SmbBridge, SmbPort}; +// Canonical surface — the `*Port` types and the `UnifiedBridge` harness +// are the replacement and are NOT deprecated. +pub use medcare_bridge::HealthcarePort; +pub use odoo_bridge::OdooPort; +pub use openproject_bridge::OpenProjectPort; +pub use redmine_bridge::RedminePort; +pub use smb_bridge::SmbPort; pub use unified::UnifiedBridge; -pub use woa_bridge::{WoaBridge, WoaPort}; +pub use woa_bridge::WoaPort; + +// Deprecated per-port bridge aliases (2026-06-22) — pull the classid via +// the corresponding PortSpec instead. The `#[allow(deprecated)]` here +// silences the re-export site; the lint still fires at consumer +// use-sites. See `docs/CONSUMER-BRIDGE-DEPRECATION.md` + AdaWorldAPI/OGAR#95. +#[allow(deprecated)] +pub use medcare_bridge::MedcareBridge; +#[allow(deprecated)] +pub use odoo_bridge::OdooBridge; +#[allow(deprecated)] +pub use openproject_bridge::OpenProjectBridge; +#[allow(deprecated)] +pub use redmine_bridge::RedmineBridge; +#[allow(deprecated)] +pub use smb_bridge::SmbBridge; +#[allow(deprecated)] +pub use woa_bridge::WoaBridge; // Compatibility shims for the pre-migration constants. `bridges` // previously re-exported `OPENPROJECT_CODEBOOK` / `REDMINE_CODEBOOK` diff --git a/crates/lance-graph-ontology/src/bridges/ogit_bridge.rs b/crates/lance-graph-ontology/src/bridges/ogit_bridge.rs index 91d75bd0..ed7cb265 100644 --- a/crates/lance-graph-ontology/src/bridges/ogit_bridge.rs +++ b/crates/lance-graph-ontology/src/bridges/ogit_bridge.rs @@ -8,6 +8,11 @@ //! A common pattern is to spin one `OgitBridge` per OGIT namespace that //! the consumer cares about, e.g. one for `Network`, another for `Auth`. +// This module IS the deprecated `OgitBridge`'s implementation; its own +// impl blocks reference the deprecated struct intentionally. Consumers in +// other crates still get the warning. See docs/CONSUMER-BRIDGE-DEPRECATION.md. +#![allow(deprecated)] + use crate::bridge::{BridgeFromRegistry, NamespaceBridge}; use crate::error::{Error, Result}; use crate::namespace::NamespaceId; diff --git a/crates/lance-graph-ontology/src/bridges/sharepoint_bridge.rs b/crates/lance-graph-ontology/src/bridges/sharepoint_bridge.rs index bdd9f552..b7aea55c 100644 --- a/crates/lance-graph-ontology/src/bridges/sharepoint_bridge.rs +++ b/crates/lance-graph-ontology/src/bridges/sharepoint_bridge.rs @@ -22,6 +22,11 @@ //! the scope-lock catches any cross-namespace leak before it reaches the //! orchestrator's storage schema. +// This module IS the deprecated `SharePointBridge`'s implementation; its own +// impl blocks reference the deprecated struct intentionally. Consumers in +// other crates still get the warning. See docs/CONSUMER-BRIDGE-DEPRECATION.md. +#![allow(deprecated)] + use crate::bridge::{BridgeFromRegistry, NamespaceBridge}; use crate::error::{Error, Result}; use crate::namespace::NamespaceId; diff --git a/crates/lance-graph-ontology/src/bridges/spear_bridge.rs b/crates/lance-graph-ontology/src/bridges/spear_bridge.rs index d9d078eb..10b1414b 100644 --- a/crates/lance-graph-ontology/src/bridges/spear_bridge.rs +++ b/crates/lance-graph-ontology/src/bridges/spear_bridge.rs @@ -15,6 +15,11 @@ //! catches any cross-namespace leak before it reaches Spear's columnar //! schema. +// This module IS the deprecated `SpearBridge`'s implementation; its own +// impl blocks reference the deprecated struct intentionally. Consumers in +// other crates still get the warning. See docs/CONSUMER-BRIDGE-DEPRECATION.md. +#![allow(deprecated)] + use crate::bridge::{BridgeFromRegistry, NamespaceBridge}; use crate::error::{Error, Result}; use crate::namespace::NamespaceId; diff --git a/crates/lance-graph-ontology/src/bridges/woa_bridge.rs b/crates/lance-graph-ontology/src/bridges/woa_bridge.rs index 6471ebe8..a3dff05e 100644 --- a/crates/lance-graph-ontology/src/bridges/woa_bridge.rs +++ b/crates/lance-graph-ontology/src/bridges/woa_bridge.rs @@ -2,6 +2,11 @@ //! namespace. Phase 6 of this session emits the corresponding TTL into //! `AdaWorldAPI/OGIT/NTO/WorkOrder/`. +// This module IS the deprecated `WoaBridge`'s implementation; its own impl +// blocks + `_compile_check` reference the deprecated struct intentionally. +// Consumers in other crates still get the warning. See docs/CONSUMER-BRIDGE-DEPRECATION.md. +#![allow(deprecated)] + use crate::bridge::{BridgeError, BridgeFromRegistry, NamespaceBridge}; use crate::error::{Error, Result}; use crate::namespace::NamespaceId;