[hero_lifecycle] expose webserver-admin templates to dependents via links/DEP_* (avoid sibling-path & vendoring) #152
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_lib#152
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Consumers of the hero_lifecycle webserver-admin (askama) shell must reference its shared partials (
parts/hero_head.html,hero_scripts.html,hero_connection_status.html, component panes). Today the only options are all flawed:../../../hero_lib/...in askama.toml) — breakscargo checkin CI / any build where hero_lib is a git dependency, not a sibling checkout (see hero_planner#23).cargo metadatato copy from the resolved dep — no drift, but invoking cargo from a build script risks a nested-cargo lock deadlock.Proposed proper fix: have
hero_lifecycleexpose its webserver templates dir to dependents via cargo'slinks/DEP_*protocol — declarelinks = "hero_lifecycle"and emitcargo:templates_dir=<abs path>from its build.rs; dependent admins readDEP_HERO_LIFECYCLE_TEMPLATES_DIRin their own build.rs and copy from the resolved dependency (no sibling, no drift, works in CI). Benefits every webserver-admin consumer.(Longer term, the Dioxus
hero_admin_lib_dxadmin is a compiled component library with no templates to copy at all, which sidesteps this entirely — hero_planner is migrating to it.)Context: hero_planner#23 (the CI break), hero_planner currently uses the vendored interim. Related shared-admin: #151.
Triage (verified on-box) — difficulty: M, and ⚠️ the proposed
linksfix is itself BREAKINGThe underlying problem is real: consumers reference the shared askama partials via a relative sibling path (
../../../hero_lib/...in askama.toml) that breaks when hero_lib is a git dep in CI (see hero_planner#23), or vendor copies that drift.But adding
links = "hero_lifecycle"(the proposed fix) breaks cargo dependency resolution for any graph that already contains two distinct package-nodes ofhero_lifecycle. Cargo's rule is onelinkspackage per dependency graph — two distinct sources/revisions = two packages = hard conflict, with no consumer opt-out (the conflict lives in the producer they pull twice). Reproduced with cargo 1.96.0. Three current graphs in the org checkout already hit it:hero_lib.git?branch=mainAND?branch=developmenthero_lib.git?branch=development(direct) AND viahero_blueprint.git(transitive)?branch=maincopy~43 repos depend on
hero_lifecycle; all inherit the constraint. So the first-pass "safe, zero existinglinks=" reasoning is wrong — the collision is self-induced by the new key, not a pre-existing name clash.Non-breaking alternatives:
cargo:templates_dir=from abuild.rswithout thelinkskey (consumer reads it through a non-linkschannel) — keeps the metadata idea, drops the collision.hero_admin_lib_dxcomponent lib (no templates to copy) — note that crate does not exist yet (confirmed absent in checkout + scan).Urgency: low. Exactly one active consumer would benefit (
hero_planner_admin), and it builds today via byte-identical vendored copies. The real value is preventing future drift — possibly throwaway if planner moves to Dioxus (#18). Recommendation: do not addlinks; if doing anything now, the producer-sidebuild.rs-without-linksis the safe minimal step. Coordinate anyhero_lifecycleCargo.toml change since it's a base-platform crate.