[deps] Convert path deps on hero_lib to git deps for reproducibility #34
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?
Background
The workspace currently uses path deps to a sibling-cloned
hero_lib:This works locally because devs clone all Hero repos in the same parent dir (
lhumina_code/hero_lib,lhumina_code/hero_slides, ...). It breaks in any environment that doesn't have the sibling layout — including the Forgejo CI runner which only checks out hero_slides.Current workaround
hero_slides PR #33 adds a workflow step that clones hero_lib alongside hero_slides before
cargoruns. CI then resolves the path dep correctly.This is fragile:
cargo install hero_slidesfrom a fresh clone).Proposed fix
Convert path deps to git deps in
Cargo.toml:Then each crate that needs it:
herolib_ai = { workspace = true }.Local devs who want to test against their own hero_lib changes can opt in by editing
Cargo.tomlto add a[patch]section pointing back at../hero_lib, OR by running with a--configoverride. The default config — what CI sees, whatcargo installsees — uses the git ref.Acceptance
path = "../hero_lib/..."and the corresponding[patch]in workspace root replaced by git-based workspace depsgit clone hero_libstep (can revert that part of #33)cargo install --git https://forge.ourworld.tf/lhumina_code/hero_slides.gitsucceeds from a clean machine without prior cloning[patch]pattern in README or CONTRIBUTINGRelated
Signed-off-by: mik-tf
Closing — path B was done directly in PR #33 instead of deferred. The path deps were converted to git deps; the
[patch]section was removed; the workflow no longer needs to clone sibling repos. The original issue was filed when I was about to take the workflow-gymnastics shortcut; user pushed back on the discipline lapse.