Skip to content

fix(core): guard against archs dropped by Electron 44 (win32/ia32, linux/armv7l) - #4328

Merged
erickzhao merged 2 commits into
mainfrom
ia32-armv7l-guard
Jul 24, 2026
Merged

erickzhao merged 2 commits into
mainfrom
ia32-armv7l-guard

Conversation

@claude

@claude claude Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Requested by Samuel Attard, David Sanders · Slack thread

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:

Electron stopped publishing prebuilt win32/ia32 and linux/armv7l binaries: v44.0.0-alpha.4 and v45.0.0-nightly.20260714 were the first releases without them (44.0.0-alpha.1 through alpha.3 still shipped them, and Electron ≤ 43 keeps publishing them until end-of-support in January 2027). This PR adds a Forge-local, version-aware guard for those two platform/arch pairs.

Before:

  • electron-forge make --arch=all (and package --arch=all) on Electron 44+ still tried to build for win32/ia32 / linux/armv7l, because allOfficialArchsForPlatformAndVersion() from @electron/packager (as of 18.x) still reports them for Electron ≥ 44. The build then died with an opaque download 404 from @electron/get.
  • --arch=ia32 on win32 / --arch=armv7l on linux with Electron 44+ failed the same way — a 404 with no hint about the real cause.

After:

  • --arch=all on Electron ≥ 44.0.0-alpha.4 silently-but-loudly skips the dropped arch: it is filtered out of the expansion and a warning names the cut (e.g. Skipping win32/ia32: Electron >= 44 no longer publishes prebuilt binaries for this architecture. Use Electron <= 43 (supported until Jan 2027) to target it.).
  • Explicit --arch=ia32 / --arch=armv7l requests on Electron ≥ 44.0.0-alpha.4 fail up front with a descriptive error: Electron >= 44 no longer publishes Windows ia32 / Linux armv7l builds … Use Electron <= 43 (supported until Jan 2027).
  • Electron ≤ 43 and the 44.0.0-alpha.1–alpha.3 prereleases behave exactly as before — the version bound is >= 44.0.0-alpha.4, not a plain >= 44.0.0 comparison (which would wrongly exempt the 44 prereleases).

How:

  • New shared util packages/api/core/src/util/supported-archs.ts holds the single source of truth: isDroppedArch() (semver gte against 44.0.0-alpha.4), filterSupportedArchs() (used for all expansions, warns per skipped arch), and assertSupportedArch() (throws for explicit requests).
  • packages/api/core/src/util/parse-archs.ts applies the filter to all expansions and the assertion to explicit/comma-separated arch lists — this covers make.
  • packages/api/core/src/api/package.ts previously passed --arch=all straight through to @electron/packager (bypassing parseArchs); it now resolves the Electron version first and expands the arch via parseArchs, so both entry points share the guard. @electron/packager accepts an arch array, and the expansion uses packager's own allOfficialArchsForPlatformAndVersion(), so behaviour is otherwise unchanged.
  • Why a Forge-local guard rather than fixing it upstream: Forge pins @electron/packager at ^18.3.5, so an upstream fix to allOfficialArchsForPlatformAndVersion() would land in a new packager major and would not flow into Forge through the caret range. Bumping the packager major is the eventual root fix and is deliberately left out of this PR.
  • Maker/publisher ia32 mappings are untouched — they must keep working for Electron ≤ 43.
  • Tests: spec/fast/util/supported-archs.spec.ts (new), spec/fast/util/parse-archs.spec.ts (44-era cases: all excludes ia32/armv7l on 44.0.0-alpha.4/44.0.0/45.x but includes them on 43.x and 44.0.0-alpha.3; explicit requests error), and spec/slow/package.slow.spec.ts (explicit ia32/armv7l via the package API rejects with the descriptive error; hermetic — pins an exact electron devDependency so no download is needed).

Follow-up (not in this PR): bump @electron/packager to a major whose allOfficialArchsForPlatformAndVersion() is Electron-44-aware, then this guard's all-filtering becomes a no-op safety net.


Generated by Claude Code

…nux/armv7l)

Electron stopped publishing prebuilt win32/ia32 and linux/armv7l binaries
starting with 44.0.0-alpha.4, but allOfficialArchsForPlatformAndVersion()
from @electron/packager (as of 18.x) still reports them, so --arch=all
expansions tried to download artifacts that no longer exist and failed
with an opaque 404.

Add a version-aware guard shared by parseArchs() and the package API:
- --arch=all now filters the dropped arch out of the expansion (with a
  warning) for Electron >= 44.0.0-alpha.4
- explicit --arch=ia32 / --arch=armv7l requests fail with a descriptive
  error pointing users at Electron <= 43 (supported until Jan 2027)
- Electron <= 43 and the 44.0.0-alpha.1 through alpha.3 prereleases are
  unaffected

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KEEZg64JKFrSDAc7u4V4Na
* `@electron/packager` (as of 18.x) still reports them, which would otherwise
* surface as an opaque download 404.
*/
export function isDroppedArch(

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.

isDroppedArch is a very generalized helper function, but the platform matrix evolves over time and this isn't the only time we've had to drop/add platforms in the past. Let's frame this function more specifically?

I guess we won't really have to future-proof Forge 7 very much anymore, but I think the shape of the code feels a bit weird.

…n 44 ia32/armv7l removal

Addresses review feedback: replace the generalized isDroppedArch helper and
DROPPED_ARCHS registry with an explicit isArchDroppedByElectron44 check for
the two combinations Electron 44 stopped publishing (win32/ia32 and
linux/armv7l).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KEEZg64JKFrSDAc7u4V4Na

@erickzhao erickzhao 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.

ok

@MarshallOfSound
MarshallOfSound marked this pull request as ready for review July 24, 2026 18:16
@MarshallOfSound
MarshallOfSound requested a review from a team as a code owner July 24, 2026 18:16
@erickzhao
erickzhao added this pull request to the merge queue Jul 24, 2026
Merged via the queue into main with commit eeac71e Jul 24, 2026
14 checks passed
@erickzhao
erickzhao deleted the ia32-armv7l-guard branch July 24, 2026 18:50
erickzhao pushed a commit that referenced this pull request Sep 11, 2026
…nux/armv7l) (#4328)

* fix(core): guard against archs dropped by Electron 44 (win32/ia32, linux/armv7l)

Electron stopped publishing prebuilt win32/ia32 and linux/armv7l binaries
starting with 44.0.0-alpha.4, but allOfficialArchsForPlatformAndVersion()
from @electron/packager (as of 18.x) still reports them, so --arch=all
expansions tried to download artifacts that no longer exist and failed
with an opaque 404.

Add a version-aware guard shared by parseArchs() and the package API:
- --arch=all now filters the dropped arch out of the expansion (with a
  warning) for Electron >= 44.0.0-alpha.4
- explicit --arch=ia32 / --arch=armv7l requests fail with a descriptive
  error pointing users at Electron <= 43 (supported until Jan 2027)
- Electron <= 43 and the 44.0.0-alpha.1 through alpha.3 prereleases are
  unaffected

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KEEZg64JKFrSDAc7u4V4Na

* refactor(core): frame dropped-arch helper specifically as the Electron 44 ia32/armv7l removal

Addresses review feedback: replace the generalized isDroppedArch helper and
DROPPED_ARCHS registry with an explicit isArchDroppedByElectron44 check for
the two combinations Electron 44 stopped publishing (win32/ia32 and
linux/armv7l).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KEEZg64JKFrSDAc7u4V4Na

---------

Co-authored-by: Claude <[email protected]>
(cherry picked from commit eeac71e)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Bb2CkBAwF2iaKw1fjfQd9h
erickzhao added a commit that referenced this pull request Sep 11, 2026
…nux/armv7l) (#4377)

fix(core): guard against archs dropped by Electron 44 (win32/ia32, linux/armv7l) (#4328)

* fix(core): guard against archs dropped by Electron 44 (win32/ia32, linux/armv7l)

Electron stopped publishing prebuilt win32/ia32 and linux/armv7l binaries
starting with 44.0.0-alpha.4, but allOfficialArchsForPlatformAndVersion()
from @electron/packager (as of 18.x) still reports them, so --arch=all
expansions tried to download artifacts that no longer exist and failed
with an opaque 404.

Add a version-aware guard shared by parseArchs() and the package API:
- --arch=all now filters the dropped arch out of the expansion (with a
  warning) for Electron >= 44.0.0-alpha.4
- explicit --arch=ia32 / --arch=armv7l requests fail with a descriptive
  error pointing users at Electron <= 43 (supported until Jan 2027)
- Electron <= 43 and the 44.0.0-alpha.1 through alpha.3 prereleases are
  unaffected


Claude-Session: https://claude.ai/code/session_01KEEZg64JKFrSDAc7u4V4Na

* refactor(core): frame dropped-arch helper specifically as the Electron 44 ia32/armv7l removal

Addresses review feedback: replace the generalized isDroppedArch helper and
DROPPED_ARCHS registry with an explicit isArchDroppedByElectron44 check for
the two combinations Electron 44 stopped publishing (win32/ia32 and
linux/armv7l).


Claude-Session: https://claude.ai/code/session_01KEEZg64JKFrSDAc7u4V4Na

---------


(cherry picked from commit eeac71e)


Claude-Session: https://claude.ai/code/session_01Bb2CkBAwF2iaKw1fjfQd9h

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <[email protected]>
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.

3 participants