-
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
Silent Staged LS Installer #868
Conversation
2cf621b
to
16c4eb5
Compare
df8c671
to
17c7524
Compare
The terraform-ls installer no longer prompts the user for whether to install an update (or downgrade) and now respects the `extensions.autoUpdate` and `extensions.autoCheckUpdates` settings. If `extensions.autoUpdate` is set to `true`, the installer checks for updates on activation and installs a new version if available. If set to `false`, then it does not check for updates. When installing an updated terraform-ls version, it installs to a staging directory and continues activation. On restart it will move the terraform-ls binary from the staging location to the extension path and the new version will be used. If `extensions.autoCheckUpdates` is set to `true`, the installer automatically checks for updates every 24 hours. If set to `false`, it does not check on a schedule. An update can either be an upgrade or downgrade, depending on the version set in terraform.languageServer.requiredVersion. If latest or no version is specified, the most current terraform-ls version is used. In either an upgrade or a downgrade, the installer will perform the required action without asking the user.
17c7524
to
b862d68
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.
Awesome work! It's nice to have the tests covering all essential aspects of this feature.
My comments are only TypeScript / Jest related right now, and I might add more as I understand how everything ties together. I'm open to discussing anything, and we can go through typing the test files together if you want.
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.
I dug into the implementation, and it looks really sound! Just a few minor suggestions. Most of my feedback is related to the style and typing of the unit tests, and we can iterate on that together if you like.
The updater.test.ts
is the last file I need to look at, but I thought we might do this in a paring session since it's the biggest of the three tests.
Co-authored-by: Daniel Banck <dbanck@users.noreply.github.com>
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 job! Thank you for taking the time to update all the tests! 🎉
I think the code base is now much more sound without any ts-nocheck
files.
I've added minor style nitpicks. Feel free to merge after addressing those.
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. |
The terraform-ls installer no longer prompts the user for whether to install an update (or downgrade) and now respects the
extensions.autoUpdate
andextensions.autoCheckUpdates
settings.If
extensions.autoUpdate
is set totrue
, the installer checks for updates on activation and installs a new version if available. If set tofalse
, then it does not check for updates.When installing an updated terraform-ls version, it installs to a staging directory and continues activation. On restart it will move the terraform-ls binary from the staging location to the extension path and the new version will be used.
If
extensions.autoCheckUpdates
is set totrue
, the installer automatically checks for updates every 24 hours. If set tofalse
, it does not check on a schedule.An update can either be an upgrade or downgrade, depending on the version set in
terraform.languageServer.requiredVersion
. Iflatest
or no version is specified, the most current terraform-ls version is used. In either an upgrade or a downgrade, the installer will perform the required action without asking the user.