Skip to content

Commit

Permalink
Merge #3083 #3101
Browse files Browse the repository at this point in the history
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 <[email protected]>
Co-authored-by: Veetaha <[email protected]>
  • Loading branch information
3 people authored Feb 11, 2020
3 parents 98aa709 + f51e3a3 + 2344dac commit f55d74d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
15 changes: 6 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 20 additions & 3 deletions editors/code/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,24 @@ export class Config {
* `platform` on GitHub releases. (It is also stored under the same name when
* downloaded by the extension).
*/
private static prebuiltLangServerFileName(platform: NodeJS.Platform): null | string {
private static prebuiltLangServerFileName(
platform: NodeJS.Platform,
arch: string
): null | string {
// See possible `arch` values here:
// https://nodejs.org/api/process.html#process_process_arch

switch (platform) {
case "linux": return "ra_lsp_server-linux";

case "linux": {
switch (arch) {
case "arm":
case "arm64": return null;

default: return "ra_lsp_server-linux";
}
}

case "darwin": return "ra_lsp_server-mac";
case "win32": return "ra_lsp_server-windows.exe";

Expand Down Expand Up @@ -95,7 +110,9 @@ export class Config {
};
}

const prebuiltBinaryName = Config.prebuiltLangServerFileName(process.platform);
const prebuiltBinaryName = Config.prebuiltLangServerFileName(
process.platform, process.arch
);

if (!prebuiltBinaryName) return null;

Expand Down

0 comments on commit f55d74d

Please sign in to comment.