Fix remote SSH binary resolution - #1
Merged
Merged
Conversation
Force the extension onto the remote extension host with extensionKind: ["workspace"] so process.platform/arch and binary paths resolve against the remote, not the local UI host. This fixes spawning a local-platform binary path on an SSH remote. Rewrite findServerBinary (now async) with precedence: configured override (validated) -> bundled -> cached download (version-checked) -> download-on-activation (SHA-256 verified) -> PATH fallback. Surface an actionable error instead of exec'ing a missing command. Ship tusk-lsp.json in the .vsix so the pinned version and sha256 sums are readable at runtime for version checks and verified downloads.
Apply the same --version check used for the cached binary to the bundled binary, so a stale bundled server isn't run silently; on mismatch, fall through to the cache/download path. Surface a PATH version mismatch via showWarningMessage instead of only logging "using it anyway", so the user can act on an incompatible server. Harden downloadFile: pipe the response into the sha256 hash stream (end:false) so every byte written to disk is hashed regardless of event ordering, and resolve on the write stream's "close" event rather than "finish" so the fd is closed before the subsequent chmod/exec (fixes a Windows race). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
No description provided.