Skip to content

getPlatform() always resolves macOS to osx-x64, breaking Apple Silicon without Rosetta — and Rosetta 2 is being phased out starting macOS 27 #1010

Description

@guruchill

getPlatform() in dist/core/utils/platform.js maps darwin unconditionally to "osx-x64", regardless of os.arch():

export function getPlatform() {
    switch (os.platform()) {
        case "win32": return "win-x64";
        case "darwin": return "osx-x64";
        ...
    }
}

This means swa deploy always downloads the x64 StaticSitesClient binary on every Mac, including Apple Silicon (arm64), with no native arm64 target in the release manifest at all. On an Apple Silicon machine without Rosetta 2 installed, this fails with:

✖ Deployment Failure Reason: spawn Unknown system error -86

(-86 is EBADARCH — the kernel refusing to run an x86_64 binary with no translation layer available.)

This is more than a papercut going forward. Apple's own WWDC 2026 statement on Rosetta 2: "we plan to make it available for the next two major macOS releases — through macOS 27 — as a general-purpose tool for Intel apps." macOS 27 is the current release. Starting with macOS 28 (fall 2027), Rosetta 2 narrows to a limited mode for older games only — general-purpose CLI tools like this one won't be able to fall back to it at all. Once that ships, swa deploy will be completely broken on every Apple Silicon Mac, with no workaround, not just failing for users who haven't separately installed Rosetta.

Ask: add a real osx-arm64 platform target (mirroring the existing win-x64/linux-x64 distinction) so Apple Silicon Macs get a native binary. Related: #306 (StaticSitesClient source was never published, so the community can't build this themselves) and #631 (request to ship binaries with the CLI rather than downloading on demand) — a native arm64 build needs solving regardless of how either of those land.

Sources:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions