fix(vscode): keep the language server binary version-matched to the extension - #52
Merged
Merged
Conversation
…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.
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 free
to 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 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 stalecargo installsilently served an old language server, and updating the extension didn't update the binary.Changes
editors/vscode/extension.js): auto-detected local binaries are accepted only when--versionmatches the extension's version; otherwise the extension uses its pinned GitHub-release download, which upgrades automatically with every extension update. An explicitglslint.pathis still used verbatim as a dev override, with a warning when the LSP handshake'sserverInfo.versionmismatches. 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.publish-extensionnow needsbuild, 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).editors/vscode/targets.json(shipped in the .vsix), withcheck-platforms.mjsrun in CI'snpmjob asserting it matchesnpm/glslint/platforms.json— it was the only copy of the table with no guard.glslint.pathdescription 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 greennode editors/vscode/check-platforms.mjs→ table matches--version-parse smoke againsttarget/debug/glslint→match: truenode npm/prepare.mjs --version 0.0.0 --dry-runandnode homebrew/prepare.mjs --version 0.0.0 --dry-runstill pass