Skip to content

fix(vscode): keep the language server binary version-matched to the extension - #52

Merged
johncarmack1984 merged 1 commit into
mainfrom
fix/vscode-binary-version-sync
Aug 10, 2026
Merged

fix(vscode): keep the language server binary version-matched to the extension#52
johncarmack1984 merged 1 commit into
mainfrom
fix/vscode-binary-version-sync

Conversation

@johncarmack1984

Copy link
Copy Markdown
Owner

The extension pins its binary download to its own version, but any locally installed glslint (glslint.path, ~/.cargo/bin, or PATH) won unconditionally with no version check — so a stale cargo install silently served an old language server, and updating the extension didn't update the binary.

Changes

  • Version-gated resolution (editors/vscode/extension.js): auto-detected local binaries are accepted only when --version matches the extension's version; otherwise the extension uses its pinned GitHub-release download, which upgrades automatically with every extension update. An explicit glslint.path is still used verbatim as a dev override, with a warning when the LSP handshake's serverInfo.version mismatches. If the download fails (offline), it falls back to the best available local binary with a warning. Old version-namespaced download caches are pruned on activation.
  • Release ordering: publish-extension now needs build, closing the window where the extension could reach the marketplace before the release binaries finished uploading (a fresh install in that window would 404 on the download).
  • Platform-table drift guard: the extension's platform→target table moves to editors/vscode/targets.json (shipped in the .vsix), with check-platforms.mjs run in CI's npm job asserting it matches npm/glslint/platforms.json — it was the only copy of the table with no guard.
  • Docs: glslint.path description and extension README updated to describe the managed, version-matched binary.

Verification

  • cargo build, cargo fmt --all --check, cargo clippy --all-targets --locked -- -D warnings, cargo test --locked (82 passed) — no Rust changes, all green
  • node editors/vscode/check-platforms.mjs → table matches
  • --version-parse smoke against target/debug/glslintmatch: true
  • node npm/prepare.mjs --version 0.0.0 --dry-run and node homebrew/prepare.mjs --version 0.0.0 --dry-run still pass

…xtension

Auto-detected local binaries (~/.cargo/bin, PATH) are now used only when
their --version matches the extension; otherwise the extension runs its
own pinned download from the GitHub release, so users never have to
update the binary by hand. An explicit glslint.path is respected
verbatim, with a warning when the LSP handshake reports a mismatched
serverInfo.version. Download failures fall back to the best local
binary, and old cached downloads are pruned on activation.

publish-extension now waits on the build job so the marketplace can't
lead the release binaries, and the extension's platform table moves to
targets.json with a CI drift guard against npm/glslint/platforms.json.
@johncarmack1984
johncarmack1984 merged commit d81e54f into main Aug 10, 2026
7 checks passed
@johncarmack1984
johncarmack1984 deleted the fix/vscode-binary-version-sync branch August 10, 2026 14:11
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