Skip to content

Commit f55d74d

Browse files
bors[bot]kjeremyVeetaha
authored
Merge #3083 #3101
3083: Update some crates r=matklad a=kjeremy 3101: vscode: filter out arm linux from using prebuilt binaries r=matklad a=Veetaha Closes #3076 Co-authored-by: kjeremy <kjeremy@gmail.com> Co-authored-by: Veetaha <gerzoh1@gmail.com>
3 parents 98aa709 + f51e3a3 + 2344dac commit f55d74d

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

Cargo.lock

Lines changed: 6 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editors/code/src/config.ts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,24 @@ export class Config {
6464
* `platform` on GitHub releases. (It is also stored under the same name when
6565
* downloaded by the extension).
6666
*/
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+
6874
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+
7085
case "darwin": return "ra_lsp_server-mac";
7186
case "win32": return "ra_lsp_server-windows.exe";
7287

@@ -95,7 +110,9 @@ export class Config {
95110
};
96111
}
97112

98-
const prebuiltBinaryName = Config.prebuiltLangServerFileName(process.platform);
113+
const prebuiltBinaryName = Config.prebuiltLangServerFileName(
114+
process.platform, process.arch
115+
);
99116

100117
if (!prebuiltBinaryName) return null;
101118

0 commit comments

Comments
 (0)