Uh oh!
There was an error while loading. Please reload this page.
Cover unsupported platform targets on the Marketplace - #234
Merged
Conversation
A missing target platform is not neutral on the VS Code Marketplace: a client whose target has no entry resolves down to the newest *universal* version on the listing and installs it silently. Ours is 0.0.2, published before the platform split, so from 0.0.3 through 0.1.1 every Windows and Intel-Mac install landed on a stale build reporting itself as the latest version. Publish binary-less cover packages for win32-x64, win32-arm64 and darwin-x64 (2.5MB each, vs ~100MB for the universal fat vsix) so those clients resolve to the current version, and give them somewhere to go: unsupportedHostAdvice() points Windows at WSL, with a "Reopen in WSL" action when the WSL extension is present to provide the command. Fail the build if a cover package ships a binary. Windows is served by amicode-linux-x64.vsix inside the WSL host, never by win32-*; declare extensionKind: ["workspace"] so that placement is explicit rather than inferred. Document the install story in the README, which had none.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
Installing Amicode from the Marketplace on Windows reports v0.0.2 as the latest version. It isn't a mac/windows vsix split — there has never been a Windows vsix. The listing today:
A missing target platform is not neutral. VS Code resolves a client whose target has no entry down to the newest universal version on the listing and installs it silently — no "unavailable for your platform". So every
win32-*anddarwin-x64install since 0.0.3 has landed on 0.0.2, which predates #233 and points at the old solve/telemetry endpoints.Intel Macs hit this too, not just Windows.
The fix
Publish binary-less cover packages for
win32-x64,win32-arm64,darwin-x64. 2.47 MB each (verified locally) against ~100 MB for the universal fat vsix. They carry no vendoredopencode, so they cannot run — that is the point. They occupy the platform matrix so those clients resolve to the current version, land inunsupportedHostAdvice(), and get told where Amicode does run. On Windows that's WSL, with a Reopen in WSL action offered only whenremote-wsl.reopenInWSLactually exists (gated ongetCommands), so there's no dead button.A version's target set is fixed at publish time — you can't add a target to a published version — so the cover has to ride along with every release. All five platform vsixes publish in one
vsce publishcall. A packaging step fails the build if a cover package smuggled a binary in.WSL is served by
amicode-linux-x64.vsixinstalled into the WSL host, never bywin32-*. That artifact already existed and was already correct; what was broken is the Marketplace lookup the Windows client performs.extensionKind: ["workspace"]is declared so placement is explicit rather than inferred (it matches VS Code's inferred default for amainextension — belt and braces, not the fix).README gains an Install section, which it did not have at all.
Verification
tsc --noEmitclean.TargetPlatformis stamped correctly in eachextension.vsixmanifest, and the fail-closedvendor/opencodecheck passes.extensionKindsurvivesvsce packageinto the shipped manifest.Notes for the reviewer
feat/linux-arm64(uncommitted, local only) which rewrites the samerelease.ymlpackaging block into a platform loop. That branch is blocked on the fork shippingopencode-linux-arm64.tar.gz—v1.17.3-amicode.12has no such asset and its lock entry is a zero-sha placeholder — so this ships first and that branch rebases onto the loop-friendly shape. When linux-arm64 lands it becomes a real target and drops out of the cover set.vsce unpublishis whole-extension and would break every existing install's update path. Shadowing it is the fix.v0.1.2tag is what unlocks the publish job.