refactor(lua): re-export install_* wiring fns to preserve the public API
Review follow-up on the F-016 split. install_diag / install_project_index / install_mcp were `pub fn` reachable at crate::lua_bindings::install_* be- fore the split, but moving them into private child modules dropped those paths without a re-export — shrinking the public API, which the split is supposed to preserve. (They take crate-internal handle types so no external caller can invoke them, and none does, so nothing actually broke — but the paths should still resolve.) Re-export all three alongside the factories/handles already re-exported, restoring the paths for the two already-merged tranches (diag, index) too. Deliberately narrowing these to pub(crate) is left as a separate change. Validated: fmt clean; clippy --lib clean under both Lua flavors; full lib suite 1437 passed / 0 failed under luajit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014TXbAwk27agwhrNNrhLi2U
This commit is contained in:
parent
e8e56bdbf1
commit
296cf34ae9
|
|
@ -230,5 +230,14 @@ McpServerIdLua` (moving it into a private module had dropped it from the
|
|||
crate surface, surfacing as dead-code on `id()`; the split must not shrink
|
||||
the public API). `mod.rs`: 14,603 → 14,020 lines.
|
||||
|
||||
Review follow-up: the `pub` `install_*` wiring fns (`install_diag`,
|
||||
`install_project_index`, `install_mcp`) were `pub` before the split but
|
||||
weren't re-exported, silently dropping their `crate::lua_bindings::*`
|
||||
paths. They take crate-internal handle types (so no external caller can
|
||||
invoke them, and none does), but to keep the split strictly API-preserving
|
||||
they're now re-exported alongside the factories/handles — restoring the
|
||||
paths for the two already-merged tranches too. Deliberately narrowing them
|
||||
to `pub(crate)` is left as a separate, intentional change.
|
||||
|
||||
Validated: `cargo fmt` clean; `clippy --lib` clean under **both** flavors;
|
||||
full lib suite **1437 passed / 0 failed** under **both** luajit and lua54.
|
||||
|
|
|
|||
|
|
@ -81,11 +81,15 @@ use crate::workers_buffer;
|
|||
mod diag;
|
||||
mod index;
|
||||
mod mcp;
|
||||
pub use index::{SharedProjectIndexer, make_project_indexer};
|
||||
// `McpServerIdLua` is re-exported to preserve its prior public path
|
||||
// (`crate::lua_bindings::McpServerIdLua`) — the split must not shrink the
|
||||
// public API surface.
|
||||
pub use mcp::{McpServerIdLua, make_mcp_manager};
|
||||
// Every `pub` item a moved domain owned is re-exported so its prior
|
||||
// `crate::lua_bindings::<item>` path still resolves — the split must not
|
||||
// shrink the public API surface. That includes the `install_*` wiring fns:
|
||||
// they take crate-internal handle types (so external callers can't invoke
|
||||
// them), but they were `pub`, so their paths are preserved for
|
||||
// compile-compatibility; any deliberate narrowing is a separate change.
|
||||
pub use diag::install_diag;
|
||||
pub use index::{SharedProjectIndexer, install_project_index, make_project_indexer};
|
||||
pub use mcp::{McpServerIdLua, install_mcp, make_mcp_manager};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Shared registry alias
|
||||
|
|
|
|||
Loading…
Reference in New Issue