Bundle server instead of making user download it #1
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.
Starting with version 1.61 from September 2021, VS Code supports publishing platform-specific extensions, allowing extensions like this one to bundle executables directly with the extension. For example, rust-analyzer has done this since December 2021: rust-lang/rust-analyzer#11053
This PR replaces all the user-facing download logic with just a
package.sh
script that gets run in GitHub Actions to build platform-specific extensions for the four platforms supported by this extension. (Note: to use the GitHub Actions workflow you'll need to create aVSCE_PAT
secret, but if you prefer not to do that, I can also delete the.github/workflows/release.yml
file from this PR.)This has a couple benefits:
wat_server
updates, VS Code will automatically prompt the user to update the extension in the same way as any other extension, rather than the user having to keep track ofwat_server
updates and run the Download Latest WebAssembly Language Tools action command themselves.cross-spawn
orgot
orjszip
, halving the size ofdist/extension.js
.I'm not aware of any downsides, since the download feature only supported these four platforms anyways, and this PR also builds a platform-agnostic VSIX to use in case someone is not on one of those four platforms but still wants to use this extension by installing
wat_server
manually.