vscode-extensions.hashicorp.terraform: 2.13.2 -> 2.14.0

This commit is contained in:
Ryan Horiguchi 2021-08-02 22:40:24 +02:00 committed by Jonathan Ringer
parent ebfc5eef67
commit 3c502503aa
2 changed files with 21 additions and 45 deletions

View file

@ -3,19 +3,19 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
mktplcRef = { mktplcRef = {
name = "terraform"; name = "terraform";
publisher = "hashicorp"; publisher = "hashicorp";
version = "2.13.2"; version = "2.14.0";
}; };
vsix = fetchurl { vsix = fetchurl {
name = "${mktplcRef.publisher}-${mktplcRef.name}.zip"; name = "${mktplcRef.publisher}-${mktplcRef.name}.zip";
url = "https://github.com/hashicorp/vscode-terraform/releases/download/v${mktplcRef.version}/${mktplcRef.name}-${mktplcRef.version}.vsix"; url = "https://github.com/hashicorp/vscode-terraform/releases/download/v${mktplcRef.version}/${mktplcRef.name}-${mktplcRef.version}.vsix";
sha256 = "0h7c6p2dcwsg7wlp49p2fsq0f164pzkx65929imd1m2df77aykqa"; sha256 = "1q43a28l6xfp3yw6wlr1kcidik0dbp8b7lg9vc83rhw4rjgvjsfm";
}; };
patches = [ ./fix-terraform-ls.patch ]; patches = [ ./fix-terraform-ls.patch ];
postPatch = '' postPatch = ''
substituteInPlace out/clientHandler.js --replace TERRAFORM-LS-PATH ${terraform-ls}/bin/terraform-ls substituteInPlace out/serverPath.js --replace TERRAFORM-LS-PATH ${terraform-ls}/bin/terraform-ls
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,43 +1,19 @@
diff --git a/out/clientHandler.js b/out/clientHandler.js diff --git a/out/serverPath.js b/out/serverPath.js
index 7f9716d..a543d60 100644 index ffb1b80..990ca2b 100644
--- a/out/clientHandler.js --- a/out/serverPath.js
+++ b/out/clientHandler.js +++ b/out/serverPath.js
@@ -33,8 +33,7 @@ class ClientHandler { @@ -8,7 +8,13 @@ exports.CUSTOM_BIN_PATH_OPTION_NAME = 'languageServer.pathToBinary';
this.reporter.sendTelemetryEvent('usePathToBinary'); class ServerPath {
} constructor(context) {
else { this.context = context;
- const installPath = path.join(context.extensionPath, 'lsp'); - this.customBinPath = vscode.workspace.getConfiguration('terraform').get(exports.CUSTOM_BIN_PATH_OPTION_NAME);
- this.pathToBinary = path.join(installPath, 'terraform-ls'); +
+ this.pathToBinary = 'TERRAFORM-LS-PATH'; + const customBinPath = vscode.workspace.getConfiguration('terraform').get(exports.CUSTOM_BIN_PATH_OPTION_NAME);
} + if (!customBinPath) {
+ this.customBinPath = 'TERRAFORM-LS-PATH';
+ } else {
+ this.customBinPath = customBinPath;
+ }
} }
startClients(folders) { installPath() {
diff --git a/out/extension.js b/out/extension.js return this.context.asAbsolutePath(INSTALL_FOLDER_NAME);
index 7a271fc..726bbf8 100644
--- a/out/extension.js
+++ b/out/extension.js
@@ -149,24 +149,6 @@ function updateLanguageServer(clientHandler, installPath) {
updateLanguageServer(clientHandler, installPath);
}, 24 * hour);
// skip install if a language server binary path is set
- if (!vscodeUtils_1.config('terraform').get('languageServer.pathToBinary')) {
- const installer = new languageServerInstaller_1.LanguageServerInstaller(installPath, reporter);
- const install = yield installer.needsInstall();
- if (install) {
- yield clientHandler.stopClients();
- try {
- yield installer.install();
- }
- catch (err) {
- console.log(err); // for test failure reporting
- reporter.sendTelemetryException(err);
- throw err;
- }
- finally {
- yield installer.cleanupZips();
- }
- }
- }
return clientHandler.startClients(vscodeUtils_1.prunedFolderNames()); // on repeat runs with no install, this will be a no-op
});
}