diff options
-rw-r--r-- | Cargo.lock | 15 | ||||
-rw-r--r-- | editors/code/src/config.ts | 23 |
2 files changed, 26 insertions, 12 deletions
diff --git a/Cargo.lock b/Cargo.lock index e29ff898d..847653696 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -110,9 +110,9 @@ dependencies = [ | |||
110 | 110 | ||
111 | [[package]] | 111 | [[package]] |
112 | name = "byteorder" | 112 | name = "byteorder" |
113 | version = "1.3.2" | 113 | version = "1.3.4" |
114 | source = "registry+https://github.com/rust-lang/crates.io-index" | 114 | source = "registry+https://github.com/rust-lang/crates.io-index" |
115 | checksum = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" | 115 | checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" |
116 | 116 | ||
117 | [[package]] | 117 | [[package]] |
118 | name = "c2-chacha" | 118 | name = "c2-chacha" |
@@ -1563,12 +1563,9 @@ checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" | |||
1563 | 1563 | ||
1564 | [[package]] | 1564 | [[package]] |
1565 | name = "rustc-hash" | 1565 | name = "rustc-hash" |
1566 | version = "1.0.1" | 1566 | version = "1.1.0" |
1567 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1567 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1568 | checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" | 1568 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" |
1569 | dependencies = [ | ||
1570 | "byteorder", | ||
1571 | ] | ||
1572 | 1569 | ||
1573 | [[package]] | 1570 | [[package]] |
1574 | name = "rustc_lexer" | 1571 | name = "rustc_lexer" |
@@ -1675,9 +1672,9 @@ dependencies = [ | |||
1675 | 1672 | ||
1676 | [[package]] | 1673 | [[package]] |
1677 | name = "serde_json" | 1674 | name = "serde_json" |
1678 | version = "1.0.46" | 1675 | version = "1.0.47" |
1679 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1676 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1680 | checksum = "21b01d7f0288608a01dca632cf1df859df6fd6ffa885300fc275ce2ba6221953" | 1677 | checksum = "15913895b61e0be854afd32fd4163fcd2a3df34142cf2cb961b310ce694cbf90" |
1681 | dependencies = [ | 1678 | dependencies = [ |
1682 | "itoa", | 1679 | "itoa", |
1683 | "ryu", | 1680 | "ryu", |
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index d5f3da2ed..418845436 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -64,9 +64,24 @@ export class Config { | |||
64 | * `platform` on GitHub releases. (It is also stored under the same name when | 64 | * `platform` on GitHub releases. (It is also stored under the same name when |
65 | * downloaded by the extension). | 65 | * downloaded by the extension). |
66 | */ | 66 | */ |
67 | private static prebuiltLangServerFileName(platform: NodeJS.Platform): null | string { | 67 | private static prebuiltLangServerFileName( |
68 | platform: NodeJS.Platform, | ||
69 | arch: string | ||
70 | ): null | string { | ||
71 | // See possible `arch` values here: | ||
72 | // https://nodejs.org/api/process.html#process_process_arch | ||
73 | |||
68 | switch (platform) { | 74 | switch (platform) { |
69 | case "linux": return "ra_lsp_server-linux"; | 75 | |
76 | case "linux": { | ||
77 | switch (arch) { | ||
78 | case "arm": | ||
79 | case "arm64": return null; | ||
80 | |||
81 | default: return "ra_lsp_server-linux"; | ||
82 | } | ||
83 | } | ||
84 | |||
70 | case "darwin": return "ra_lsp_server-mac"; | 85 | case "darwin": return "ra_lsp_server-mac"; |
71 | case "win32": return "ra_lsp_server-windows.exe"; | 86 | case "win32": return "ra_lsp_server-windows.exe"; |
72 | 87 | ||
@@ -95,7 +110,9 @@ export class Config { | |||
95 | }; | 110 | }; |
96 | } | 111 | } |
97 | 112 | ||
98 | const prebuiltBinaryName = Config.prebuiltLangServerFileName(process.platform); | 113 | const prebuiltBinaryName = Config.prebuiltLangServerFileName( |
114 | process.platform, process.arch | ||
115 | ); | ||
99 | 116 | ||
100 | if (!prebuiltBinaryName) return null; | 117 | if (!prebuiltBinaryName) return null; |
101 | 118 | ||