-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish Platform Specific Extension #905
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work! I'm amazed that esbuild doesn't need a bulky config file. It looks so lean with your package.json
scripts.
I haven't looked a the GitHub workflows yet; as you mentioned, you want to test them first.
I wondered if we could avoid downloading the language server every time we run 'Launch client' in the local development workflow?
It won't download every time for local development because it uses the |
3f64ff8
to
021b7f9
Compare
54dfdfe
to
0916ea1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to update the development docs; this will be very helpful in the future!
Most of the code looks good to me! I've added mainly question to gain a better understanding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all the work, and esp. for the updated docs!
d59bfa4
to
ca31b1d
Compare
This adds a typescript file that downloads a version of terraform-ls that matches the current OS and architecture of the machine running the script. The version of terraform-ls that is chosen is pulled from the `langServer` attribute in the `package.json` file. This script can be invoked several ways: ``` npm run download:ls npm run download:ls --target=darwin-x64 ``` It can also be combined with `npm package` to download and package an alternate OS and architecture: ``` ls_target=linux-x64 npm run package -- --target=linux-x64 $env:ls_target="linux-x64"; npm run package -- --target=linux-x64 ```
Organize npm scripts and link download:ls to watch and package
This converts the extensiom to use the bundled terraform-ls binary instead of one downloaded at runtime. This effectively changes the extension to not download the terraform-ls binary and instead rely on one being present in the `bin` directory inside the extension path. It also moves @hashicorp/js-releases to a development dependency, which then allows openpgp, semver, and yauzl to be removed. These dependencies are no longer needed in the extension as we no longer download the terraform-ls bianry at runtime. We still will use @hashicorp/js-releases to download the terraform-ls binary at development and package time.
This updates the publish and preview github actions to package platform specific extensions. A matrix of all supported platforms and architectures run the commands necessary to bundle terraform-ls and the extension into a VSIX. After packaging, it publishes all stored VSIXs to the Marketplace.
This adds esbuild as a final step to the interactive developement and packaging processes. This produces a single file extension for deployment, compared to several thousand files. This results in a much faster installation experience and reduces the deployment size of the extension.
Co-authored-by: Radek Simko <radek.simko@gmail.com>
09a7ad6
to
42ad3cc
Compare
42ad3cc
to
968657f
Compare
Co-authored-by: Radek Simko <radek.simko@gmail.com>
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
This converts the extension to use a bundled terraform-ls binary and packages the VSIX as a Platform Specific Extension. A matrix of all supported platforms and architectures run the commands necessary to bundle terraform-ls and the extension into a VSIX. After packaging, it publishes all stored VSIXs to the Marketplace. This results in a VSIX that is ready to run at install time, instead of having to use the network at runtime to download a terraform-ls binary.
This also adds minification as a final step to the interactive development and packaging processes. This now produces a single file extension, compared to previously shipping several thousand files. This results in a much faster installation experience and reduces the deployment size of the extension.