fix(release): add the cross-compile target to the pinned toolchain, not stable - #245
Merged
filipeforattini merged 1 commit intoJul 31, 2026
Conversation
…ot stable The macOS Intel leg failed its first run with "Target x86_64-apple-darwin is not installed (installed targets: aarch64-apple-darwin)" even though dtolnay/rust-toolchain ran with `targets: x86_64-apple-darwin` and exited 0. apps/desktop/src-tauri/rust-toolchain.toml pins channel 1.95.0, and rustup's directory override wins inside that directory — so the target was added to `stable` (1.97.1) while the build used 1.95.0, whose target list is exactly what the error printed. Native legs never noticed: a toolchain always has its own host target. Add the target by running rustup where the override applies. Also, from ../dit: - Detect the OS architecture via RuntimeInformation::OSArchitecture instead of $env:PROCESSOR_ARCHITECTURE, which describes the *process*. On Windows on ARM an emulated x64 PowerShell reports AMD64, so an arm64 host looked like plain x64 and never got the emulation note. Note OSArchitecture spells it "X64", not "AMD64" — the match accepts both spellings. - Document the scriptblock form for passing options in one line, since `iex` takes no parameters. Beats telling people to download the script first.
filipeforattini
deleted the
worktree-fix+macos-intel-pinned-toolchain-target
branch
July 31, 2026 10:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #244. The v0.65.0 release shipped Linux x86_64/aarch64, macOS aarch64 and Windows x86_64 — the
optional+verify-assetsdesign did its job — but the new macOS Intel leg failed, as flagged.The failure
…even though
dtolnay/rust-toolchainran withtargets: x86_64-apple-darwinand exited 0. The log confirms it executed:apps/desktop/src-tauri/rust-toolchain.tomlpinschannel = "1.95.0", and rustup's directory override wins inside that directory. So the target landed onstable(1.97.1) while the build ran under 1.95.0 — and the error's "installed targets" list is 1.95.0's, not stable's.Native legs never surfaced this, because a toolchain always has its own host target. Only a cross-compile can notice.
Reproduced locally:
Fix: add the target by running
rustup target addwithworking-directory: apps/desktop/src-tauri, so it lands on the toolchain that actually builds.Also, from
../ditArch detection was wrong —
$env:PROCESSOR_ARCHITECTUREdescribes the process, not the machine. On Windows on ARM an emulated x64 PowerShell reportsAMD64, so an arm64 host looked like a plain x64 one and never got the emulation note. Now usesRuntimeInformation::OSArchitecture, like dit's installer.Worth noting:
OSArchitecturespells itX64, notAMD64— verified live in a pwsh container. A naive swap would have sent every x64 machine down thedefaultbranch and hard-failed the installer. The match accepts both spellings, and all branches are exercised.Docs: dit's
& ([scriptblock]::Create((irm ...))) -Version ...form passes parameters in one line. Replaces my "download the script first" instruction, sinceiextakes no parameters — verified the scriptblock actually binds-Version/-Force.Verification
install.ps1parses under pwsh 7.4; full flow re-run against the live v0.65.0 release: tag resolves, real.exedownloads, sha256 verifies, tampered file rejectedOSArchitecturereally emits (X64/Arm64/X86/ARM)The macOS Intel leg stays
optionaluntil it goes green once in a real release.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.