Repository navigation
Description
Single tracking issue for the one remaining step of the VS Code extension work. Everything that could be done from the WSL dev box is done and merged; this captures what's left, why it couldn't be done here, and exactly how to finish it.
✅ Done (merged to main)
| PR | What |
|---|---|
| #58 | package.json compile corrected to affinescript compile --vscode-extension …; build requirements documented |
| #60 | Real fix — src/extension.affine passed registerCommand("…", 0) (stale Phase-1 Int index); now registerCommand("…", fn(u: Unit) => handler_*()) per the binding registerCommand(name: String, handler: fn(Unit) -> Int). Extension now compiles; regenerated out/extension.cjs passes node --check |
| #61 | Deprecated vsce 2.15.0 → @vscode/vsce ^3.2.0 (2.x can't handle a .cjs entrypoint); README "Status" corrected |
Verified: affinescript compile --vscode-extension src/extension.affine -o out/extension.cjs succeeds against affinescript origin/main stdlib. The affinescript stdlib/Vscode.affine / VscodeLanguageClient.affine bindings type-check on affinescript main (affinescript#35 Phase 2 effectively complete) — no affinescript-repo change is needed.
Toolchain: affinescript v0.1.0 is installed at ~/.local/bin/affinescript on the dev box (clone-independent). Module resolution needs export AFFINESCRIPT_STDLIB=<affinescript-checkout>/stdlib.
🔲 Remaining (this issue)
- Build the
.vsix— needsnpm installof@vscode/vsce, which fails on the WSL dev box (npm registry unreachable there). Must run on CI or any non-WSL, registry-reachable host. - Publish to the Marketplace (optional / later) —
vsce publishneeds an Azure DevOps PAT. Currently blocked by maintainer 2FA loss; not on the critical path — a.vsix(step 1) is installable directly and can be attached to a GitHub Release with no Azure account.
How to finish it (where everything lives)
Canonical how-to: vscode-extension/README.md → "Building from Source". Summary:
cd vscode-extension
npm install # registry-reachable host (not WSL)
export AFFINESCRIPT_STDLIB=/path/to/affinescript/stdlib # affinescript checkout on `main`
npm run compile # affinescript compile --vscode-extension … (needs `affinescript` on PATH)
npm run package # @vscode/vsce package -> my-lang-0.3.0.vsix (NO Azure PAT needed)
# distribute: attach my-lang-0.3.0.vsix to a GitHub Release, OR:
npx @vscode/vsce publish # Marketplace upload — needs Azure DevOps PAT (publisher: hyperpolymath)Key files: vscode-extension/package.json (main = src/index.cjs, publisher = hyperpolymath, version 0.3.0), src/extension.affine (source of truth), out/extension.cjs (committed compiled artifact), src/index.cjs (host entry, wraps the shim).
Acceptance criteria
-
my-lang-0.3.0.vsixproduced by@vscode/vsce packageon a registry-reachable host -
.vsixattached to a GitHub Release (no-PAT distribution path), and/or - Published to the VS Code Marketplace under publisher
hyperpolymath(when PAT available)
Refs affinescript#35, affinescript#64
Activity
fix(vscode): make the packaged .vsix actually load (Refs #62) (#63)
hyperpolymath commentedon May 18, 2026
Done — closing
Executing this revealed the "just run
vsce package" premise was wrong: the build produced a non-functional.vsix(the--vscode-extensionauto-glue required the unpublished@hyperpolymath/affine-vscodeat module load → crash on activation). Fixed in PR #63 (merged,0dc33aa) using affinescript's documented--vscode-extension-adapter=flag pointed at the vendored adapter,main→./out/extension.cjs, deadsrc/index.cjsremoved.Also: the WSL dev box's npm registry was reachable after all (the prior blocker no longer applies), so the artifact was built here. Deno's
.deno/-nestednode_modulesis structurally incompatible with the flat tree a.vsixneeds, so the build dropped to bun per the package-manager fallback policy.Acceptance
my-lang-0.3.0.vsixproduced by@vscode/vsce package(324 files, 466 KB; fullvscode-languageclientclosure bundled & verified Node-resolvable;extraImports()returns{Vscode, VscodeLanguageClient}with only host-providedvscodestubbed)..vsixattached to a GitHub Release (no-PAT path): https://github.com/hyperpolymath/my-lang/releases/tag/v0.3.0 · sha2561e1b96a7071399c6d261b08b6126bf69a77178e4e6c4c69c4a1b84239daf0d8dhyperpolymath) — optional, explicitly off the critical path; gated solely on an Azure DevOps PAT (maintainer 2FA). The Release above is the supported install path until then.Critical path complete → closing. The Marketplace upload is a no-code, externally-gated follow-up to run when the PAT is available (
npx @vscode/vsce publishagainst the same artifact).