hero_code_lib: unresolved imports from herolib_ai (AiClient, Model, PromptBuilderExt, AiError) block template builds #16

Open
opened 2026-05-25 06:05:33 +00:00 by zaelgohary · 0 comments
Member

Symptom

lab build on hero_code (development) fails with E0432/E0433/E0425 from hero_code_lib importing names that herolib_ai no longer exports:

=== [18/42] lab build hero_code ===
FAILED: hero_code_server:release:x86_64-unknown-linux-gnu
error[E0432]: unresolved imports `herolib_ai::AiClient`, `herolib_ai::Model`, `herolib_ai::PromptBuilderExt`, `herolib_ai::provider`
error[E0432]: unresolved import `herolib_ai::AiClient`
error[E0433]: cannot find `AiError` in `herolib_ai`
  --> crates/hero_code_lib/src/editor/error.rs:45:29
45 |         source: herolib_ai::AiError,
error[E0425]: cannot find type `AiError` in crate `herolib_ai`
Some errors have detailed explanations: E0425, E0432, E0433.
error: could not compile `hero_code_lib` (lib) due to 4 previous errors
  ✗ hero_code failed: exit 1

This is SDK drift: herolib_ai was reorganized and no longer exposes AiClient, Model, PromptBuilderExt, provider, AiError at the crate root.

Why it matters

hero_code is in lab::pod::pod_template::TEMPLATE_HERO_REPOS. Every template build fails this repo, so hero_code_server is missing from /home/template/hero/bin/ and from every managed users ~/hero/bin/ after rollout.

Suggested fix

Check herolib_ai's current public surface and update hero_code_lib/src/editor/*.rs imports to use the new path(s). If AiClient was renamed or moved into a submodule (e.g. herolib_ai::client::Client), the rename needs to be reflected across hero_code_lib.

Likely sibling change in herolib_ai (probably part of the hero_lib repo) — find that commit and follow its migration notes if any.

## Symptom `lab build` on `hero_code` (development) fails with E0432/E0433/E0425 from `hero_code_lib` importing names that `herolib_ai` no longer exports: ``` === [18/42] lab build hero_code === FAILED: hero_code_server:release:x86_64-unknown-linux-gnu error[E0432]: unresolved imports `herolib_ai::AiClient`, `herolib_ai::Model`, `herolib_ai::PromptBuilderExt`, `herolib_ai::provider` error[E0432]: unresolved import `herolib_ai::AiClient` error[E0433]: cannot find `AiError` in `herolib_ai` --> crates/hero_code_lib/src/editor/error.rs:45:29 45 | source: herolib_ai::AiError, error[E0425]: cannot find type `AiError` in crate `herolib_ai` Some errors have detailed explanations: E0425, E0432, E0433. error: could not compile `hero_code_lib` (lib) due to 4 previous errors ✗ hero_code failed: exit 1 ``` This is **SDK drift**: `herolib_ai` was reorganized and no longer exposes `AiClient`, `Model`, `PromptBuilderExt`, `provider`, `AiError` at the crate root. ## Why it matters `hero_code` is in `lab::pod::pod_template::TEMPLATE_HERO_REPOS`. Every template build fails this repo, so `hero_code_server` is missing from `/home/template/hero/bin/` and from every managed users `~/hero/bin/` after rollout. ## Suggested fix Check `herolib_ai`'s current public surface and update `hero_code_lib/src/editor/*.rs` imports to use the new path(s). If `AiClient` was renamed or moved into a submodule (e.g. `herolib_ai::client::Client`), the rename needs to be reflected across `hero_code_lib`. Likely sibling change in `herolib_ai` (probably part of the hero_lib repo) — find that commit and follow its migration notes if any.
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_code#16
No description provided.