bug: make _check-dx passes for any dx on PATH, not specifically Dioxus CLI #81
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_os#81
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
make build-wasm(andmake web/dev/desktop/build) fail cryptically on any machine where an unrelated executable nameddxcomes earlier onPATHthan the Dioxus CLI.Reproduced on a fresh Debian dev host with
/usr/bin/dxfrom the OpenDX (data-visualization) package:Same class of problem on macOS with Homebrew's Deno installed (
/opt/homebrew/bin/dxfromdeno x).Root cause
Makefile:_check-dxcallscommand -v dx, which is satisfied by any executable nameddx, not specifically Dioxus CLI. When the firstdxonPATHis something else (OpenDX,deno xshim, etc.), the preflight passes, build/serve targets invoke the wrong binary, and the failure surfaces several steps downstream as an unreadable error from a tool that has no idea what Dioxus CLI arguments mean.Any developer provisioning a fresh box that happens to have OpenDX, Deno, or another
dxin a system-managed directory will hit this.Proposed fix
Two-part: resolve deterministically, then validate.
~/.cargo/bin/dx(wherecargo install dioxus-cliinstalls) before falling back to whatever is first onPATH. Assign to aDXvariable and use it everywhere.$(DX) --versionand grep for "dioxus" in the output. If the resolved binary is not Dioxus CLI, error out with the resolved path, the install command, and the PATH-order hint — not a downstream cryptic failure.PR in flight:
fix/dx-preflight-wrong-binary.Scope
Affects
web,dev,desktop,build,build-wasmtargets — all of them go through_check-dxand then invoke baredx. All migrated to$(DX)in the PR.