[nu-demo] hero_os Makefile ignores CARGO_TARGET_DIR and hardcodes ~/.cargo/bin/dx #131
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?
Symptom
make install-assets-release(and the debug equivalent) rsync fails silently — WASM assets never reach the install dir, the shell renders with missing JS/WASM.maketriggerscargo install dioxus-clieven though a workingdxbinary exists at~/hero/bin/dx.Root cause
hero_os/Makefilehardcodes:assuming cargo's default
./target/. WhenCARGO_TARGET_DIR=~/hero/build/cargois set (standard hero env),dx buildwrites to$CARGO_TARGET_DIR/dx/..., so the Makefile rsync looks in the wrong path and silently fails to find anything.Also,
_check-dxonly probes~/.cargo/bin/dxand re-installs viacargo install dioxus-cliif absent. It doesn't consider~/hero/bin/dx, which is where the hero env places it.Demo workaround (applied 2026-04-23)
$CARGO_TARGET_DIR/dx/hero_os_app/{debug,release}/web/public/path into the install dir.ln -sfn ~/hero/bin/dx ~/.cargo/bin/dxso_check-dxis satisfied without a reinstall.Proper fix
(a) Makefile should use
$(or $(CARGO_TARGET_DIR),target)/dx/hero_os_app/<profile>/web/publicfor both debug and release WASM output paths. Apply to bothinstall-assets-debugandinstall-assets-releaserules (same bug in both — folds in the duplicate that would have been #19).(b)
_check-dxshould probe both~/.cargo/bin/dxand~/hero/bin/dx(and$PATH'sdx) before attemptingcargo install.Filed 2026-04-23 nu-shell demo bring-up. Signed-off-by: mik-tf
make demotarget — provision + install + seed + verify a fresh Hero OS demo VM in one command #163mik-tf referenced this issue2026-04-25 23:00:36 +00:00
Fixed in hero_os commit
03477c4ondevelopment.Two coupled fixes in
Makefile:1.
CARGO_TARGET_DIR— fixes silent rsync failure:?=only sets the variable if not already defined, so an env-exported value (e.g.CARGO_TARGET_DIR=~/hero/build/cargo) takes precedence and an unset value falls back to./target— vanilla cargo behavior preserved. The cosmetic"Done: target/..."echo lines (L138, L143) were also updated to use the variable.2.
DXbinary lookup — fixes redundant 3-10 min reinstall on TF Grid / nu-server deploys:hero_skillsinstalls Dioxus CLI to~/hero/bin/dx. The previous unconditionalDX := ~/.cargo/bin/dxignored that and re-rancargo install dioxus-cliif the cargo path was empty. Now the Makefile prefers~/hero/bin/dxwhen present, falls through to~/.cargo/bin/dxotherwise. Pinned-path discipline (no PATH lookup) is preserved — OS-bundleddxshims (OpenDX on Debian, Deno on macOS) still cannot shadow it.Verification (
make -n -p):WASM_RELEASE_OUTPUTtarget/dx/hero_os_app/release/web/publicCARGO_TARGET_DIR=/tmp/foo/tmp/foo/dx/hero_os_app/release/web/publicDX falls to
~/.cargo/bin/dxwhen~/hero/bin/dxis absent (verified locally on a dev box without hero_skills installed).Meta-tracker: home#193.
Signed-off-by: mik-tf
make demotarget — provision + install + seed + verify a fresh Hero OS demo VM in one command #31