Skip to content

Publish a kernel-less win32-arm64 VSIX - #524

Draft
samclark2015 wants to merge 1 commit into
sclark/bundle-kernel-in-vsixfrom
sclark/win32-arm64-vsix
Draft

Publish a kernel-less win32-arm64 VSIX#524
samclark2015 wants to merge 1 commit into
sclark/bundle-kernel-in-vsixfrom
sclark/win32-arm64-vsix

Conversation

@samclark2015

Copy link
Copy Markdown

Stacked on #523.

Problem

Positron's bootstrap cannot reach the universal VSIX. getPlatformDownloads() in build/lib/extensions.ts unconditionally appends ?targetPlatform=<platform>-<arch> to the gallery asset URL, and the gallery matches that value exactly — in both directions.

Measured against the live registry (https://p3m.dev/openvsx/latest/vscode/asset/...):

request result
posit.air-vscode 0.28.0 ?targetPlatform=win32-arm64 200
posit.air-vscode 0.28.0 ?targetPlatform=alpine-x64 (never published) 403
posit.air-vscode 0.28.0, no targetPlatform 403
ggsql.ggsql 0.4.1 (universal only) ?targetPlatform=win32-arm64 403
ggsql.ggsql 0.4.1 (universal only) ?targetPlatform=win32-x64 403
ggsql.ggsql 0.4.1, no targetPlatform 200

So omitting win32-arm64 does not degrade to the universal build — it 403s. fetchUrl (build/lib/fetch.ts) accepts only 2xx, retries 10×, then throws, which fails Positron's own Windows arm64 build. A WoA user never sees an error, because that build never ships the bootstrapExtensions entry.

There is also no way to scope around it: extension.platforms filters on process.platform (win32/darwin/linux) only and cannot exclude an architecture, so backlogging win32-arm64 means dropping Windows bootstrap entirely.

Change

Publish win32-arm64 as a target that carries no kernel. It answers 200, the bootstrapExtensions entry can land, and on that platform the extension falls back to a host-installed kernel — the behaviour every platform had before bundling. When a Windows arm64 runner exists, the kernel drops into the same target with no change on the Positron side.

The build-vsix matrix now carries an explicit kernel flag per entry instead of testing for universal by name, since two targets now ship without one.

Verification

Packaged locally from this branch:

$ vsce package --target win32-arm64
DONE  Packaged: ggsql-win32-arm64.vsix (15 files, 105.97 KB)

$ unzip -p ggsql-win32-arm64.vsix extension.vsixmanifest | grep -o 'TargetPlatform="[^"]*"'
TargetPlatform="win32-arm64"

$ unzip -l ggsql-win32-arm64.vsix | grep 'extension/bundled/'
(no output — carries no kernel)

The workflow's contents check was exercised in all four combinations — kernel-less/kernel: false passes, kernel-less/kernel: true errors, kernel-bearing/kernel: true passes, kernel-bearing/kernel: false errors.

Not run: the workflow itself, which only executes on a v* tag.

Out of scope

The old-glibc Linux gap is handled in the PR stacked on top of this one. The Install ggsql notification added there also covers a Windows arm64 machine with no kernel installed.

🤖 Generated with Claude Code

Positron's bootstrap appends ?targetPlatform=<target> to the gallery asset
URL, and the gallery matches that value exactly. A target that was never
published answers HTTP 403 rather than falling back to the untargeted build,
so omitting win32-arm64 fails Positron's own Windows arm64 build instead of
degrading to the universal VSIX. Measured against the live registry: the
untargeted ggsql VSIX answers 200 with no targetPlatform and 403 for every
target, while posit.air-vscode answers 200 per published target and 403 with
none.

No runner builds a Windows arm64 kernel yet, so publish the target carrying
no kernel. It answers 200, the bootstrapExtensions entry can land, and the
extension falls back to a host-installed kernel there — the behaviour every
platform had before bundling. A real kernel drops into the same target later
with no change on the Positron side.

The build-vsix matrix now carries an explicit `kernel` flag per entry rather
than testing for the universal target by name, since two targets now ship
without one.

Co-Authored-By: Claude Opus 5 (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