Skip to content

feat(matrix): allow pkg.yml to opt in to windows/x86-64#12946

Open
tannevaled wants to merge 1 commit into
pkgxdev:mainfrom
tannevaled:feat/windows-platform-support
Open

feat(matrix): allow pkg.yml to opt in to windows/x86-64#12946
tannevaled wants to merge 1 commit into
pkgxdev:mainfrom
tannevaled:feat/windows-platform-support

Conversation

@tannevaled
Copy link
Copy Markdown
Contributor

@tannevaled tannevaled commented May 18, 2026

Today get-matrix.ts throws "invalid platform" the moment a pkg.yml lists windows/ anywhere. That's a hard ceiling on Windows enablement even at the discussion level — there's no way to materialise the gap in actual CI.

Open the door without changing default behaviour:

  • Extend the per-platform regex to accept (linux|darwin|windows). The default-platforms list (used when a pkg.yml omits platforms:) stays linux+darwin only. Existing packages get an identical matrix.
  • Add a case 'windows/x86-64' to get_matrix() that targets the hosted windows-latest runner.
  • Accept the shorthand windows (resolves to windows/x86-64; no arm64 Windows runners on GitHub Actions today).

This is intentionally a no-op for every package currently in the pantry — only a package that explicitly lists platforms: [windows/x86-64] is affected. Such a package will fail at brewkit/build@v1 (which has no Windows codepath today), which is the point: it surfaces brewkit's gap as a real CI failure rather than a planning-time throw, and gives a place to discuss Windows enablement with concrete build logs.

Why now

In pkgxdev/pkgm#87 I'm porting pkgm to Windows. The pkgm-side work is essentially done (per-user install_prefix to %LOCALAPPDATA%\pkgm, hardlink fallback for symlink_with_overwrite, .cmd stub wrappers, PATH_SEP awareness throughout).

Per jhheider's reply on pkgxdev/pkgx#607, the v2 dist layout already has 15 toolchain-layer packages built for Windows (bun.sh, cmake.org, curl.se, deno.land, git-scm.org, go.dev, libarchive.org, nasm.us, ninja-build.org, openssl.org, perl.org, python.org, rust-lang.org, sqlite.org, zlib.net) — but the manifest pipeline that produced them was rolled back about a year ago. So pkgm install <app> on Windows can't end-to-end work today without that pipeline coming back online. This PR takes the next-smallest enabling step on the path: it lifts the planning-time veto on windows/x86-64 so the brewkit-side conversation can happen with a concrete CI failure to point at, rather than getting cut short at "invalid platform".

This PR doesn't fix anything end-to-end. It removes the planning-level veto so brewkit/manifests work has a stable target.

Refs

Today get-matrix.ts throws "invalid platform" the moment a pkg.yml
lists `windows/` anywhere. That's a hard ceiling on Windows enablement
even at the discussion level — there's no way to materialise the gap
in actual CI.

Open the door without changing default behaviour:

- Extend the per-platform regex to accept `(linux|darwin|windows)`.
  The default-platforms list (used when a pkg.yml omits `platforms:`)
  stays linux+darwin only. Existing packages get an identical matrix.
- Add a `case 'windows/x86-64'` to get_matrix() that targets the
  hosted `windows-latest` runner.
- Accept the shorthand `windows` (resolves to `windows/x86-64`; no
  arm64 Windows runners on GitHub Actions today).

This is intentionally a no-op for every package currently in the
pantry — only a package that *explicitly* lists
`platforms: [windows/x86-64]` is affected. Such a package will fail
at `brewkit/build@v1` (which has no Windows codepath today), which
is the point: it surfaces brewkit's gap as a real CI failure rather
than a planning-time throw, and gives a place to discuss Windows
enablement with concrete build logs.

## Why now

In pkgxdev/pkgm#87 I'm porting pkgm to Windows. The pkgm-side work
is essentially done (per-user install_prefix to %LOCALAPPDATA%\pkgm,
hardlink fallback for symlink_with_overwrite, .cmd stub wrappers,
PATH_SEP awareness throughout). But `pkgm install <anything>` on
Windows fails with `CmdNotFound` because the dist S3 bucket has zero
Windows artifacts (probed all 842 top-level prefixes — none have a
`windows/` subdir). The trail leads here: get-matrix.ts refuses
Windows at planning time.

This PR doesn't fix anything end-to-end. It removes the planning-
level veto so we can have the brewkit-side conversation with concrete
artefacts to point at.

## Refs

- pkgxdev/pkgx#607 — platform-support megaticket; lists Windows as
  planned with libpkgx#48 marked v1-wip.
- pkgxdev/pkgm#87 — pkgm port to Windows (scaffolding pass, draft).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant