Skip to content

Commit 46ea89b

Browse files
authored
fix(publish): drop macos-13, cross-build darwin-x64 on macos-latest (v0.2.2) (#25)
## Why GitHub's `macos-13` (Intel) runner pool is being phased out — allocation queue routinely sits at 1–4+ hours during peak load. The `v0.2.1` publish run from #24 was held there indefinitely and had to be cancelled, so `0.2.1` never reached the Marketplace despite the rest of the matrix succeeding cleanly. ## What `vsce package --target X` only stamps the .vsix manifest with the target name — the .vsix's actual native `.node` bindings are whatever happens to be in `node_modules` at package time. So `darwin-x64` doesn't need an Intel runner: we can install darwin-x64 optional bindings on `macos-latest` (M-series, arm64) via pnpm's `supportedArchitectures` filter and then package as `--target darwin-x64`. The build step (`pnpm build` runs `tsdown` which uses rolldown) still needs a runnable native binding for the host arch, so the workflow now installs twice: 1. `pnpm install --frozen-lockfile` — default `supportedArchitectures` matches the host; `pnpm build` runs against host bindings. 2. `pnpm install --frozen-lockfile --config.supportedArchitectures.cpu=${{ matrix.pkg_cpu }}` — swaps `node_modules` to carry the target arch's bindings before `vsce package`. For host==target entries (`win32-x64` on windows, `linux-x64` on ubuntu, `darwin-arm64` on macos-latest) the second install is effectively a no-op. For `darwin-x64` on macos-latest it prunes the arm64 bindings and installs x64 ones, producing a .vsix Intel Mac users can actually run. ## Matrix change | Target | Old runner | New runner | |---|---|---| | win32-x64 | windows-latest | windows-latest *(unchanged)* | | linux-x64 | ubuntu-latest | ubuntu-latest *(unchanged)* | | darwin-x64 | **macos-13 (Intel)** | **macos-latest (cross-install x64 bindings)** | | darwin-arm64 | macos-latest | macos-latest *(unchanged)* | Same four targets ship. Allocation latency is gone. ## Version Bumped to `0.2.2`. CHANGELOG notes that `0.2.1` was tagged but never reached the Marketplace — `0.2.2` is the first version that actually completes the platform-specific publish flow introduced in `0.2.1`. ## Test plan - [x] YAML parses; matrix expands to 4 entries with `pkg_cpu` keys - [ ] Workflow dry-run via `gh workflow run publish.yml --ref fix/cross-build-darwin-x64 -f dry_run=true` — should complete in ~10–15 min total instead of stalling on Intel Mac allocation - [ ] After merge: real publish completes; verify all four platform builds appear on Marketplace and Open VSX under `0.2.2` ## Risks - **`pnpm install --config.supportedArchitectures.cpu=x64` on arm64 macOS** — assumes pnpm prunes the wrong-arch bindings on the second install. If it instead leaves both arch bindings present, the darwin-arm64 .vsix would be ~3–5 MB larger than necessary (extra unused x64 .node files inside) but would still function. Worth verifying on the dry run. - **Wrong-arch `.node` files in node_modules** during the second install shouldn't trigger postinstall scripts because the napi-rs binding packages are pure data (just `.node` + `package.json`), not executable installs. If a future native dep adds a postinstall that platform-checks, this swap would need to be more surgical. ## Stuck runs I cancelled the two queued runs from #24: - `25370742474` (push to main, real publish for 0.2.1) - `25369816967` (workflow_dispatch dry-run on the feature branch)
2 parents 0e74c3a + 70500a9 commit 46ea89b

3 files changed

Lines changed: 37 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,27 @@ jobs:
107107
strategy:
108108
fail-fast: false
109109
matrix:
110+
# `pkg_cpu` selects which optionalDependency native bindings get
111+
# installed in node_modules before `vsce package`. For host==target
112+
# (most entries) this matches the runner's arch and is a no-op. For
113+
# darwin-x64 we run on macos-latest (M-series, arm64) and cross-
114+
# install x64 bindings — `vsce package --target X` only stamps the
115+
# manifest, so the .vsix's native bindings come from whatever's in
116+
# node_modules. This avoids the macos-13 (Intel) runner, whose
117+
# allocation queue can sit at hours during peak load.
110118
include:
111119
- target: win32-x64
112120
runner: windows-latest
121+
pkg_cpu: x64
113122
- target: linux-x64
114123
runner: ubuntu-latest
124+
pkg_cpu: x64
115125
- target: darwin-x64
116-
runner: macos-13
126+
runner: macos-latest
127+
pkg_cpu: x64
117128
- target: darwin-arm64
118129
runner: macos-latest
130+
pkg_cpu: arm64
119131
runs-on: ${{ matrix.runner }}
120132
steps:
121133
- name: Checkout
@@ -131,12 +143,24 @@ jobs:
131143
with:
132144
node-version: 20.x
133145

134-
- name: Install dependencies
146+
- name: Install dependencies (host arch, for build)
147+
# pnpm defaults supportedArchitectures to the runner's host. The
148+
# build step needs a runnable native binding (rolldown, oxc-parser,
149+
# @tailwindcss/oxide), so always install host bindings first.
135150
run: pnpm install --frozen-lockfile
136151

137152
- name: Build
138153
run: pnpm build
139154

155+
- name: Re-install for target arch (${{ matrix.pkg_cpu }})
156+
# Swap node_modules' optional native bindings to match the publish
157+
# target. For host==target this is a no-op; for darwin-x64 on the
158+
# macos-latest (arm64) runner this prunes the arm64 bindings and
159+
# installs the x64 ones, so the resulting .vsix carries exactly
160+
# the bindings users on that target need.
161+
shell: bash
162+
run: pnpm install --frozen-lockfile --config.supportedArchitectures.cpu=${{ matrix.pkg_cpu }}
163+
140164
- name: Strip [Unreleased] from CHANGELOG for packaging
141165
shell: bash
142166
run: python3 -c "import re,pathlib;p=pathlib.Path('CHANGELOG.md');t=p.read_text();p.write_text(re.sub(r'## \[Unreleased\]\n.*?(?=\n## \d)','',t,flags=re.DOTALL) if '## [Unreleased]' in t else t)"

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
## [Unreleased]
44

5+
## 0.2.2 — 2026-05-05
6+
7+
### Fixed
8+
9+
- Publish pipeline: dropped the dedicated `macos-13` (Intel) runner; GitHub's Intel Mac queue is being wound down and routinely held publish runs for 1–4+ hours waiting for allocation. The `darwin-x64` matrix entry now runs on `macos-latest` (M-series) and cross-installs x64 native bindings via `pnpm --config.supportedArchitectures.cpu=x64` before packaging — `vsce package --target` only stamps the manifest, so the .vsix's bindings come from whatever's in `node_modules`. Same four targets ship; allocation latency is gone.
10+
11+
### Note
12+
13+
- `0.2.1` was tagged but never reached the Marketplace — its publish run was held in queue waiting for `macos-13` allocation when it was cancelled. `0.2.2` is the first version that actually completes the platform-specific publish flow added in `0.2.1`.
14+
515
## 0.2.1 — 2026-05-05
616

717
### Fixed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "copilotkit-vscode-extension",
33
"displayName": "CopilotKit",
4-
"version": "0.2.1",
4+
"version": "0.2.2",
55
"description": "Preview generative-UI components, explore CopilotKit hooks, and inspect AG-UI agent runs — all without leaving your editor.",
66
"categories": [
77
"Other",

0 commit comments

Comments
 (0)