Skip to content

fix(desktop): find the shell beside the launcher's real path - #6495

Merged
M4n5ter merged 2 commits into
rust-previewfrom
fix/desktop-symlinked-launcher
Oct 31, 2026
Merged

M4n5ter merged 2 commits into
rust-previewfrom
fix/desktop-symlinked-launcher

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

maka desktop fails when the launcher is started through a symlink, which is the usual way to put a source build on PATH:

$ ln -s "$PWD/target/release/maka" ~/.local/bin/maka
$ maka desktop
/Users/me/.local/bin/Maka.app/Contents/MacOS/maka-desktop-shell: No such file or directory (os error 2)

The launcher looks for the shell beside std::env::current_exe(), and on macOS that is the path it was started through, not the installed executable. This PR resolves the launcher path first, as deployment already does when it compares the running executable with the saved deployment. The shell is then found beside the real maka, and MAKA_LAUNCHER passes the same resolved path to the shell, which uses it to start the Root's next Host.

Verification

  • cargo nextest run -p maka-cli -p maka-desktop-shell --test integration -E 'test(/^desktop::/)': 7 passed. maka-desktop-shell is selected so the build unifies its runtime-shaders feature; -p maka-cli alone needs Xcode's metal compiler.
  • The new desktop_launched_through_a_symlink_runs_the_shell_beside_its_target fails without the fix with the error above.
  • cargo fmt --all -- --check passes. cargo clippy -p maka-cli -p maka-desktop-shell --all-targets --no-deps -- -D warnings passes. I did not run just check.
  • Manual check on macOS arm64: with a release build, maka desktop started through ~/.local/bin/maka opens the Maka window, and stopping the launcher reaps the shell.
  • scripts/asf-license-headers.mjs, scripts/rust/dependencies.mjs and scripts/rust/notices.mjs checks pass.

Unrelated CI fix

a9aae72, pushed directly to rust-preview, moved the Cua dependency to a new revision and added sysinfo, ntapi and the windows 0.57 crates without regenerating the license inventories, so the dependency inventory check fails for every pull request against rust-preview. The second commit regenerates DEPENDENCIES.rust.tsv, THIRD_PARTY_NOTICES.txt and notices.json; no new license texts are added.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code diagnosed the failure, wrote the fix and the regression test, and ran the checks above.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

`maka desktop` located `Maka.app` beside `current_exe()`, which on macOS is the path the launcher was started through. Started through a symlink on PATH (for example `~/.local/bin/maka`), it looked for the shell in the symlink's directory and failed with "No such file or directory". Resolve the launcher path first, as `deployment` already does, so the shell and `MAKA_LAUNCHER` both use the installed executable.

Generated-by: Claude Code
a9aae72 moved the Cua dependency to a new revision and added sysinfo, ntapi and the windows 0.57 crates without regenerating DEPENDENCIES.rust.tsv and the third-party notices, so the dependency inventory check fails for every pull request against rust-preview. Regenerated with scripts/rust/dependencies.mjs and scripts/rust/notices.mjs; no new license texts.

Generated-by: Claude Code

@M4n5ter M4n5ter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path resolution fixes symlinked desktop launches with a minimal change. The regression test exercises the actual launcher and reuses the existing fixture. No blocking issues found.

@M4n5ter
M4n5ter marked this pull request as ready for review October 31, 2026 07:23
@M4n5ter
M4n5ter merged commit 4782574 into rust-preview Oct 31, 2026
3 of 4 checks passed
@M4n5ter
M4n5ter deleted the fix/desktop-symlinked-launcher branch October 31, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants