aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/installation/interfaces.ts
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-16 11:54:38 +0000
committerGitHub <[email protected]>2020-02-16 11:54:38 +0000
commita15c8739b9a6da223e1f3a6ff6aa868913c0dbf4 (patch)
tree5694d395b08c416bf60d7206e0380a3859cfe1e2 /editors/code/src/installation/interfaces.ts
parent617b5b3b31cf0b461829810640e28a9090a5b957 (diff)
parent325eba58a286c147f19dada5f205aa9e2ec6f391 (diff)
Merge #3162
3162: Feature: vscode always downloads only the matching ra_lsp_server version r=matklad a=Veetaha I tried to separate logically connected changes into separate commits, so enjoy! Now TypeScript extension saves installed binary version in global state and always checks that the installed binary version equals the version of the TypeScript extension itself (to prevent version drifts). Also, changed `fetchLatestArtifactReleaseInfo()` to `fetchArtifactReleaseInfo()` that takes an optional release tag (when not specified fetches the latest release). The version without a release tag will be useful in the future when adding auto-checking for updates. I decided not to do `Download latest language server` command (I have stated the rationale for this in #3073) and let the extension itself decide which version of the binary it wants. This way the users will be able to get the latest `ra_lsp_server` binary after the approaching 2020-02-17 release, without having to manually delete the outdated one from `~/.config/Code/User/globalStorage/matklad.rust-analyzer`! Closes #3073 Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'editors/code/src/installation/interfaces.ts')
-rw-r--r--editors/code/src/installation/interfaces.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/editors/code/src/installation/interfaces.ts b/editors/code/src/installation/interfaces.ts
index 93ea577d4..e40839e4b 100644
--- a/editors/code/src/installation/interfaces.ts
+++ b/editors/code/src/installation/interfaces.ts
@@ -1,3 +1,5 @@
1import * as vscode from "vscode";
2
1export interface GithubRepo { 3export interface GithubRepo {
2 name: string; 4 name: string;
3 owner: string; 5 owner: string;
@@ -50,6 +52,17 @@ export namespace BinarySource {
50 * and in local `.dir`. 52 * and in local `.dir`.
51 */ 53 */
52 file: string; 54 file: string;
55
56 /**
57 * Tag of github release that denotes a version required by this extension.
58 */
59 version: string;
60
61 /**
62 * Object that provides `get()/update()` operations to store metadata
63 * about the actual binary, e.g. its actual version.
64 */
65 storage: vscode.Memento;
53 } 66 }
54 67
55} 68}