aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/user/readme.adoc6
-rw-r--r--editors/code/package-lock.json6
-rw-r--r--editors/code/package.json4
-rw-r--r--editors/code/src/config.ts4
-rw-r--r--editors/code/src/main.ts2
-rw-r--r--xtask/src/dist.rs2
-rw-r--r--xtask/src/install.rs11
7 files changed, 10 insertions, 25 deletions
diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc
index 18e2fac9e..0dfc12b52 100644
--- a/docs/user/readme.adoc
+++ b/docs/user/readme.adoc
@@ -95,12 +95,6 @@ $ cargo xtask install
95---- 95----
96 96
97You'll need Cargo, nodejs and npm for this. 97You'll need Cargo, nodejs and npm for this.
98To make VS Code use the freshly built server, add this to the settings:
99
100[source,json]
101----
102{ "rust-analyzer.serverPath": "rust-analyzer" }
103----
104 98
105Note that installing via `xtask install` does not work for VS Code Remote, instead you'll need to install the `.vsix` manually. 99Note that installing via `xtask install` does not work for VS Code Remote, instead you'll need to install the `.vsix` manually.
106 100
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json
index d5eb3d016..b7220d8e2 100644
--- a/editors/code/package-lock.json
+++ b/editors/code/package-lock.json
@@ -1762,9 +1762,9 @@
1762 "integrity": "sha512-JvONPptw3GAQGXlVV2utDcHx0BiY34FupW/kI6mZ5x06ER5DdPG/tXWMVHjTNULF5uKPOUUD0SaXg5QaubJL0A==" 1762 "integrity": "sha512-JvONPptw3GAQGXlVV2utDcHx0BiY34FupW/kI6mZ5x06ER5DdPG/tXWMVHjTNULF5uKPOUUD0SaXg5QaubJL0A=="
1763 }, 1763 },
1764 "vscode-languageclient": { 1764 "vscode-languageclient": {
1765 "version": "6.1.1", 1765 "version": "6.1.3",
1766 "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-6.1.1.tgz", 1766 "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-6.1.3.tgz",
1767 "integrity": "sha512-mB6d8Tg+82l8EFUfR+SBu0+lCshyKVgC5E5+MQ0/BJa+9AgeBjtG5npoGaCo4/VvWzK0ZRGm85zU5iRp1RYPIA==", 1767 "integrity": "sha512-YciJxk08iU5LmWu7j5dUt9/1OLjokKET6rME3cI4BRpiF6HZlusm2ZwPt0MYJ0lV5y43sZsQHhyon2xBg4ZJVA==",
1768 "requires": { 1768 "requires": {
1769 "semver": "^6.3.0", 1769 "semver": "^6.3.0",
1770 "vscode-languageserver-protocol": "^3.15.3" 1770 "vscode-languageserver-protocol": "^3.15.3"
diff --git a/editors/code/package.json b/editors/code/package.json
index 2cb48abb7..eb5748515 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -6,7 +6,7 @@
6 "private": true, 6 "private": true,
7 "icon": "icon.png", 7 "icon": "icon.png",
8 "version": "0.4.0-dev", 8 "version": "0.4.0-dev",
9 "releaseTag": "nightly", 9 "releaseTag": null,
10 "publisher": "matklad", 10 "publisher": "matklad",
11 "repository": { 11 "repository": {
12 "url": "https://github.com/rust-analyzer/rust-analyzer.git", 12 "url": "https://github.com/rust-analyzer/rust-analyzer.git",
@@ -34,7 +34,7 @@
34 "dependencies": { 34 "dependencies": {
35 "jsonc-parser": "^2.2.1", 35 "jsonc-parser": "^2.2.1",
36 "node-fetch": "^2.6.0", 36 "node-fetch": "^2.6.0",
37 "vscode-languageclient": "=6.1.1" 37 "vscode-languageclient": "6.1.3"
38 }, 38 },
39 "devDependencies": { 39 "devDependencies": {
40 "@rollup/plugin-commonjs": "^11.0.2", 40 "@rollup/plugin-commonjs": "^11.0.2",
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 54b905303..be5296fcf 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -44,11 +44,11 @@ export class Config {
44 .packageJSON 44 .packageJSON
45 .version; 45 .version;
46 46
47 readonly releaseTag: string = vscode 47 readonly releaseTag: string | undefined = vscode
48 .extensions 48 .extensions
49 .getExtension(this.extensionId)! 49 .getExtension(this.extensionId)!
50 .packageJSON 50 .packageJSON
51 .releaseTag; 51 .releaseTag ?? undefined;
52 52
53 private cfg!: vscode.WorkspaceConfiguration; 53 private cfg!: vscode.WorkspaceConfiguration;
54 54
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index 5297614a9..5d2da9a76 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -110,6 +110,7 @@ async function bootstrap(config: Config, state: PersistentState): Promise<string
110} 110}
111 111
112async function bootstrapExtension(config: Config, state: PersistentState): Promise<void> { 112async function bootstrapExtension(config: Config, state: PersistentState): Promise<void> {
113 if (config.releaseTag === undefined) return;
113 if (config.channel === "stable") { 114 if (config.channel === "stable") {
114 if (config.releaseTag === NIGHTLY_TAG) { 115 if (config.releaseTag === NIGHTLY_TAG) {
115 vscode.window.showWarningMessage(`You are running a nightly version of rust-analyzer extension. 116 vscode.window.showWarningMessage(`You are running a nightly version of rust-analyzer extension.
@@ -184,6 +185,7 @@ async function getServer(config: Config, state: PersistentState): Promise<string
184 } 185 }
185 return explicitPath; 186 return explicitPath;
186 }; 187 };
188 if (config.releaseTag === undefined) return "rust-analyzer";
187 189
188 let binaryName: string | undefined = undefined; 190 let binaryName: string | undefined = undefined;
189 if (process.arch === "x64" || process.arch === "x32") { 191 if (process.arch === "x64" || process.arch === "x32") {
diff --git a/xtask/src/dist.rs b/xtask/src/dist.rs
index 3a14f8a63..2002d3e2a 100644
--- a/xtask/src/dist.rs
+++ b/xtask/src/dist.rs
@@ -27,7 +27,7 @@ fn dist_client(version: &str, release_tag: &str) -> Result<()> {
27 27
28 patch 28 patch
29 .replace(r#""version": "0.4.0-dev""#, &format!(r#""version": "{}""#, version)) 29 .replace(r#""version": "0.4.0-dev""#, &format!(r#""version": "{}""#, version))
30 .replace(r#""releaseTag": "nightly""#, &format!(r#""releaseTag": "{}""#, release_tag)); 30 .replace(r#""releaseTag": null"#, &format!(r#""releaseTag": "{}""#, release_tag));
31 31
32 if nightly { 32 if nightly {
33 patch.replace( 33 patch.replace(
diff --git a/xtask/src/install.rs b/xtask/src/install.rs
index d0d745b05..bc32a04b3 100644
--- a/xtask/src/install.rs
+++ b/xtask/src/install.rs
@@ -24,7 +24,6 @@ pub struct ServerOpt {
24 24
25impl InstallCmd { 25impl InstallCmd {
26 pub fn run(self) -> Result<()> { 26 pub fn run(self) -> Result<()> {
27 let both = self.server.is_some() && self.client.is_some();
28 if cfg!(target_os = "macos") { 27 if cfg!(target_os = "macos") {
29 fix_path_for_mac().context("Fix path for mac")? 28 fix_path_for_mac().context("Fix path for mac")?
30 } 29 }
@@ -34,16 +33,6 @@ impl InstallCmd {
34 if let Some(client) = self.client { 33 if let Some(client) = self.client {
35 install_client(client).context("install client")?; 34 install_client(client).context("install client")?;
36 } 35 }
37 if both {
38 eprintln!(
39 "
40 Installation complete.
41
42 Add `\"rust-analyzer.serverPath\": \"rust-analyzer\",` to VS Code settings,
43 otherwise it will use the latest release from GitHub.
44"
45 )
46 }
47 Ok(()) 36 Ok(())
48 } 37 }
49} 38}