hero_lifecycle: stale pub use control_plane_router breaks build (renamed to private control_plane_openrpc) #148

Open
opened 2026-06-07 10:23:36 +00:00 by mahmoud · 0 comments
Owner

Summary

hero_lifecycle fails to compile on the current development HEAD due to a stale re-export. The rpc module function was renamed control_plane_routercontrol_plane_openrpc, but the crate-root pub use was not updated (and the new function is private), so any downstream consumer that builds hero_lib breaks.

Error

error[E0432]: unresolved import `rpc::control_plane_router`
   --> crates/hero_lifecycle/src/lib.rs:126:30
    |
126 | pub use rpc::{HeroRpcServer, control_plane_router, mandatory_router};
    |                              ^^^^^^^^^^^^^^^^^^^^ no `control_plane_router` in `rpc`
    |
help: a similar name exists in the module
    |
126 - pub use rpc::{HeroRpcServer, control_plane_router, mandatory_router};
126 + pub use rpc::{HeroRpcServer, control_plane_openrpc, mandatory_router};

error: could not compile `hero_lifecycle` (lib) due to 1 previous error

Root cause

  • crates/hero_lifecycle/src/lib.rs:126 re-exports control_plane_router.
  • crates/hero_lifecycle/src/rpc.rs:410 defines fn control_plane_openrpc(...) — note it is private (fn, not pub fn). The old control_plane_router name no longer exists.

So fixing the re-export name alone is not enough; the function must also be made pub if it is genuinely meant to be exported, or removed from the pub use list if it should stay internal.

Suggested fix

Either:

  1. Make it public and rename the re-export:
    // rpc.rs
    pub fn control_plane_openrpc(...) { ... }
    // lib.rs:126
    pub use rpc::{HeroRpcServer, control_plane_openrpc, mandatory_router};
    
  2. Or drop control_plane_router from the pub use in lib.rs:126 if it is no longer part of the public API.

Reproduction

Any consumer building hero_lib development HEAD, e.g. cargo build -p lab in hero_skills:

Updating git repository `https://forge.ourworld.tf/lhumina_code/hero_lib.git`
...
Compiling hero_lifecycle v0.6.0 (...hero_lib.git?branch=development#ee95c88d)
error[E0432]: unresolved import `rpc::control_plane_router`

Observed at hero_lib commit ee95c88 (branch development).

## Summary `hero_lifecycle` fails to compile on the current `development` HEAD due to a stale re-export. The `rpc` module function was renamed `control_plane_router` → `control_plane_openrpc`, but the crate-root `pub use` was not updated (and the new function is private), so any downstream consumer that builds `hero_lib` breaks. ## Error ``` error[E0432]: unresolved import `rpc::control_plane_router` --> crates/hero_lifecycle/src/lib.rs:126:30 | 126 | pub use rpc::{HeroRpcServer, control_plane_router, mandatory_router}; | ^^^^^^^^^^^^^^^^^^^^ no `control_plane_router` in `rpc` | help: a similar name exists in the module | 126 - pub use rpc::{HeroRpcServer, control_plane_router, mandatory_router}; 126 + pub use rpc::{HeroRpcServer, control_plane_openrpc, mandatory_router}; error: could not compile `hero_lifecycle` (lib) due to 1 previous error ``` ## Root cause - `crates/hero_lifecycle/src/lib.rs:126` re-exports `control_plane_router`. - `crates/hero_lifecycle/src/rpc.rs:410` defines `fn control_plane_openrpc(...)` — note it is **private** (`fn`, not `pub fn`). The old `control_plane_router` name no longer exists. So fixing the re-export name alone is not enough; the function must also be made `pub` if it is genuinely meant to be exported, or removed from the `pub use` list if it should stay internal. ## Suggested fix Either: 1. Make it public and rename the re-export: ```rust // rpc.rs pub fn control_plane_openrpc(...) { ... } // lib.rs:126 pub use rpc::{HeroRpcServer, control_plane_openrpc, mandatory_router}; ``` 2. Or drop `control_plane_router` from the `pub use` in lib.rs:126 if it is no longer part of the public API. ## Reproduction Any consumer building `hero_lib` `development` HEAD, e.g. `cargo build -p lab` in `hero_skills`: ``` Updating git repository `https://forge.ourworld.tf/lhumina_code/hero_lib.git` ... Compiling hero_lifecycle v0.6.0 (...hero_lib.git?branch=development#ee95c88d) error[E0432]: unresolved import `rpc::control_plane_router` ``` Observed at hero_lib commit `ee95c88` (branch `development`).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_lib#148
No description provided.