bug: forge resolver picks hero_osis for hero_os on name-substring collision (forge.nu) #110
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_skills#110
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?
Summary
forge pull lhumina_code/hero_osandservice_os installboth resolve to the wrong repo (hero_osis) whenhero_osisis cloned locally andhero_osis not. Result:service_os installtries tocargo buildhero_os binaries inside the hero_osis source tree, which has no such targets:Steps to reproduce
Root cause
tools/modules/forge.nu:forge_resolve_localpartial-match branch usesstr contains -i $repo_part. Forrepo_part = "hero_os", this matcheshero_osisbecause"hero_os"is a substring of"hero_osis".The exact-name match above it only triggers when
<coderoot>/hero_osalready exists on disk — which it doesn't, sincehero_osisgot cloned first and the resolver then "finds" that as the local copy ofhero_os.Proposed fix
forge_resolve_local.repo_part; if none is exact, refuse and ask the user to be more specific.Workaround
Clone the exact repo manually, bypassing the resolver:
Impact
Blocks every fresh install of
hero_oson any host that clonedhero_osisfirst (whichservice_osis installdoes). Likely bites anyone bootstrapping the full stack.