fix(hero_embedderd): make Path import unconditional — Linux build was broken #32
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_embedder!32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mik_path_import_linux"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
hero_embedderddoesn't compile on Linux ondevelopment:Cause
Commit
50aa675(chore: upgrade ONNX Runtime to 1.25.x and improve health checks) refactored the ORT dylib path-detection block to handle both macOS.dyliband Linux.sopaths, by removing the#[cfg(target_os = "macos")]from the surroundingif env::var("ORT_DYLIB_PATH").is_err() { ... }block. The change at line 226-244 is correct.But the matching
#[cfg(target_os = "macos")]on theuse std::path::Path;import at line 25 was left in place. On macOS the file builds because both the import and the use site are in scope; on Linux the use site is now active but the import is excluded → E0433.Fix
Remove the
#[cfg(target_os = "macos")]attribute from theuse std::path::Path;line. The import is now unconditional, matching the use site.Verification
cargo check -p hero_embedderd --release --bin hero_embedderdon Linux:macOS unaffected — the import was already valid on macOS, and an unconditional import is a strict superset.
Pathimport unconditional after ONNX path-detection refactorSuperseded by #34 (merged via
185cbc1) — same one-line fix landed independently. Closing.Pull request closed