Skip to content

build: fix mksnapshot path in mksnapshot_args for flattened macOS zips - #53363

Merged
jkleinsc merged 1 commit into
mainfrom
fix-mksnapshot-args-flattened-zip
Sep 1, 2026
Merged

jkleinsc merged 1 commit into
mainfrom
fix-mksnapshot-args-flattened-zip

Conversation

@claude

@claude claude Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Requested via Slack thread

Requested by David Sanders · Slack thread

Description of Change

Follow-up to #52884.

Before: Since #52884 moved the macOS release snapshot tools into secondary GN toolchains (//electron/build/toolchain/mac:clang_{arm64,x64}_snapshot), the mksnapshot_args file inside every published darwin mksnapshot.zip starts with ./clang_arm64_snapshot/mksnapshot (or ./clang_x64_snapshot/mksnapshot) — that is the first element of gn desc out/Default v8:run_mksnapshot_default args, and the "Fixup Mksnapshot" step never rewrote it. But electron_mksnapshot_zip flattens the zip on macOS, so the binary actually lives at the zip root and that path does not exist. @electron/mksnapshot spawns the path from mksnapshot_args, so it dies immediately with ENOENT — every darwin mksnapshot.zip published since Aug 24 (v41.10.7, v42.10.1, v43.5.0, v44.0.0, v44.1.0) is broken this way, and electron/mksnapshot's release + scheduled CI has been red since then.

After: The "Fixup Mksnapshot" step strips the leading ./clang_*_snapshot/ toolchain prefix from the mksnapshot path (a sed alongside the step's existing sed edits), so mksnapshot_args names ./mksnapshot, matching the flattened zip layout. Linux is unaffected: its cross-arch toolchain dir (clang_x64_v8_arm64) does not match the pattern, and its zips are not flattened. Default-toolchain builds already emit ./mksnapshot and are untouched.

Needs backports to 41-x-y through 44-x-y, which all received the #52884 backports.

Checklist

  • I have filled out the PR description
  • I have reviewed and verified the changes

Release Notes

Notes: none


Generated by Claude Code

Since the macOS release snapshot tools moved into a secondary toolchain
(#52884), gn desc emits the mksnapshot executable path as
./clang_<arch>_snapshot/mksnapshot, but electron_mksnapshot_zip flattens
mksnapshot.zip so the binary lives at the zip root. The Fixup Mksnapshot
step never rewrote that first argument, so every darwin mksnapshot.zip
published since then ships an mksnapshot_args pointing at a path that
does not exist in the zip and @electron/mksnapshot fails with ENOENT.

Rewrite the leading ./clang_*_snapshot/ prefix to ./ so the args file
matches the flattened layout. Linux is unaffected: its cross-arch
toolchain dir (clang_x64_v8_arm64) does not match the pattern and its
zips are not flattened.
@claude claude Bot added target/42-x-y PR should also be added to the "42-x-y" branch. target/43-x-y PR should also be added to the "43-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. labels Sep 1, 2026
@MarshallOfSound
MarshallOfSound marked this pull request as ready for review September 1, 2026 07:14
@jkleinsc
jkleinsc merged commit 5beb642 into main Sep 1, 2026
106 checks passed
@release-clerk

release-clerk Bot commented Sep 1, 2026

Copy link
Copy Markdown

No Release Notes

@trop

trop Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "43-x-y", please check out #53370

@trop

trop Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "44-x-y", please check out #53371

@trop trop Bot added the in-flight/43-x-y label Sep 1, 2026
@trop

trop Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "42-x-y", please check out #53372

@trop trop Bot added in-flight/44-x-y in-flight/42-x-y merged/42-x-y PR was merged to the "42-x-y" branch. merged/44-x-y PR was merged to the "44-x-y" branch. and removed target/43-x-y PR should also be added to the "43-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. target/42-x-y PR should also be added to the "42-x-y" branch. in-flight/42-x-y in-flight/44-x-y in-flight/43-x-y labels Sep 1, 2026
@trop trop Bot added the merged/43-x-y PR was merged to the "43-x-y" branch. label Sep 1, 2026
@dsanders11 dsanders11 added the target/45-x-y PR should also be added to the "45-x-y" branch. label Sep 2, 2026
@dsanders11

Copy link
Copy Markdown
Member

/trop run backport-to 45-x-y

@trop

trop Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

The backport process for this PR has been manually initiated - sending your PR to 45-x-y!

@trop

trop Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "45-x-y", please check out #53388

@trop trop Bot added the in-flight/45-x-y label Sep 2, 2026
@dsanders11 dsanders11 removed the target/45-x-y PR should also be added to the "45-x-y" branch. label Sep 2, 2026
@trop trop Bot added merged/45-x-y PR was merged to the "45-x-y" branch. and removed in-flight/45-x-y labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

46-x-y merged/42-x-y PR was merged to the "42-x-y" branch. merged/43-x-y PR was merged to the "43-x-y" branch. merged/44-x-y PR was merged to the "44-x-y" branch. merged/45-x-y PR was merged to the "45-x-y" branch. semver/none

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants