Skip to content

fix(bridges): guard deprecated-alias re-exports + ontology self-impls (#589 follow-up)#590

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/fix-589-mod-deprecated-allow
Jun 22, 2026
Merged

fix(bridges): guard deprecated-alias re-exports + ontology self-impls (#589 follow-up)#590
AdaWorldAPI merged 1 commit into
mainfrom
claude/fix-589-mod-deprecated-allow

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jun 22, 2026

Copy link
Copy Markdown
Owner

What

Fast follow-up to #589 (merged). #589 added #[deprecated] to the consumer-facing bridge symbols but left two internal use-sites unguarded, so cargo clippy -- -D warnings errors on main. The owner's 5+3 review flagged the first; verification surfaced its sibling.

Two same-class fixes

1. lance-graph-ogar/src/bridges/mod.rs — the re-export of the six aliases was unguarded (the #[allow(deprecated)] split I intended got dropped in #589's rebase, so it never landed). Split it the way lib.rs already is: *Port types + UnifiedBridge stay in the clean group; the six deprecated aliases move under #[allow(deprecated)]. (This is the owner's flagged P0, verbatim.)

2. lance-graph-ontology/src/bridges/{ogit,spear,sharepoint,woa}_bridge.rs#589 deprecated these four structs without guarding their own impl blocks, so the ontology crate self-warns (OgitBridge::registry, WoaBridge's _compile_check, etc.). Each module is its deprecated struct's implementation, so a module-level #[allow(deprecated)] is correct — internal self-reference is intentional; external consumers still get the warning.

Verified

cargo check -p lance-graph-ontology  → Finished, 0 deprecation self-warnings
cargo check -p lance-graph-ogar      → Finished, 0 deprecation warnings at bridges/mod.rs

The #[deprecated] notes still fire at genuine external consumer use-sites — the beacon is intact.

Out of scope

The doc_nested_refdefs / oxrdf::Subject / odoo_blueprint doc_lazy_continuation clippy lints are pre-existing TD-ONTOLOGY-LINT, explicitly carved out by the #589 review as unrelated. Not touched here — separate cleanup.

Status

[G] — mechanical lint-correctness fix, both crates verified clean. No behaviour change, no symbol added or removed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP


Generated by Claude Code

Summary by CodeRabbit

Release Notes

  • Refactor
    • Reorganized internal bridge module exports with improved deprecation handling. Deprecated bridge aliases are now explicitly separated from canonical implementations, with enhanced documentation clarifying recommended migration paths.

…#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
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: db66fcde-59e5-4264-8159-6b4a14dff488

📥 Commits

Reviewing files that changed from the base of the PR and between fdbe09d and 4aaacb0.

📒 Files selected for processing (5)
  • crates/lance-graph-ogar/src/bridges/mod.rs
  • crates/lance-graph-ontology/src/bridges/ogit_bridge.rs
  • crates/lance-graph-ontology/src/bridges/sharepoint_bridge.rs
  • crates/lance-graph-ontology/src/bridges/spear_bridge.rs
  • crates/lance-graph-ontology/src/bridges/woa_bridge.rs

📝 Walkthrough

Walkthrough

Reorganizes public re-exports in crates/lance-graph-ogar/src/bridges/mod.rs to separate canonical *Port types and UnifiedBridge from deprecated *Bridge aliases, adding per-alias #[allow(deprecated)] attributes. Adds #![allow(deprecated)] module attributes to four deprecated bridge implementation files in crates/lance-graph-ontology.

Changes

Bridge Deprecation Cleanup

Layer / File(s) Summary
OGAR bridges/mod.rs: split canonical and deprecated re-exports
crates/lance-graph-ogar/src/bridges/mod.rs
Canonical *Port types and unified::UnifiedBridge are now re-exported in a dedicated block; deprecated *Bridge aliases are re-exported individually with #[allow(deprecated)] in a separate block.
Deprecated bridge impl modules: add #![allow(deprecated)]
crates/lance-graph-ontology/src/bridges/ogit_bridge.rs, crates/lance-graph-ontology/src/bridges/sharepoint_bridge.rs, crates/lance-graph-ontology/src/bridges/spear_bridge.rs, crates/lance-graph-ontology/src/bridges/woa_bridge.rs
Each deprecated bridge implementation module gains a #![allow(deprecated)] attribute and an explanatory comment, suppressing compiler warnings from intentional deprecation references within those impl blocks.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • AdaWorldAPI/lance-graph#570: Introduces UnifiedBridge and marks per-port *Bridge aliases as deprecated compatibility shims — directly sets up the re-export surface this PR reorganizes.
  • AdaWorldAPI/lance-graph#585: Modifies crates/lance-graph-ogar/src/bridges/mod.rs public re-exports for OGAR per-port bridge aliases, the same file reorganized here.
  • AdaWorldAPI/lance-graph#589: Also changes crates/lance-graph-ogar/src/bridges/mod.rs to split canonical *Port + UnifiedBridge from deprecated *Bridge aliases with #[allow(deprecated)] handling — directly overlapping scope with this PR.

Poem

🐇 A tidy warren, sorted neat,
The old bridge paths kept tucked, discreet.
#[allow(deprecated)] — no warning cries,
Each dusty alias gently hides.
The canonical ports shine bright and true,
A rabbit's cleanup, tidy and new! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the PR's primary change: guarding deprecated-alias re-exports and handling ontology self-implementations, matching the objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AdaWorldAPI AdaWorldAPI merged commit d1a311e into main Jun 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants