From 8e7662069977cf811cbc7d5301741a067c7e24d4 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Fri, 18 Oct 2024 08:44:48 +0300 Subject: [PATCH] add support for osx-arm64 for Java and Rust --- .../language_servers/eclipse_jdtls/eclipse_jdtls.py | 8 ++++---- .../eclipse_jdtls/runtime_dependencies.json | 9 +++++++-- .../rust_analyzer/runtime_dependencies.json | 8 ++++++++ .../language_servers/rust_analyzer/rust_analyzer.py | 8 ++++---- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/multilspy/language_servers/eclipse_jdtls/eclipse_jdtls.py b/src/multilspy/language_servers/eclipse_jdtls/eclipse_jdtls.py index 10eb83f..d7c0f02 100644 --- a/src/multilspy/language_servers/eclipse_jdtls/eclipse_jdtls.py +++ b/src/multilspy/language_servers/eclipse_jdtls/eclipse_jdtls.py @@ -150,10 +150,10 @@ def setupRuntimeDependencies(self, logger: MultilspyLogger, config: MultilspyCon os.makedirs(str(PurePath(os.path.abspath(os.path.dirname(__file__)), "static")), exist_ok=True) - assert platformId.value in [ - "linux-x64", - "win-x64", - ], "Only linux-x64 platform is supported for in multilspy at the moment" + # assert platformId.value in [ + # "linux-x64", + # "win-x64", + # ], "Only linux-x64 platform is supported for in multilspy at the moment" gradle_path = str( PurePath( diff --git a/src/multilspy/language_servers/eclipse_jdtls/runtime_dependencies.json b/src/multilspy/language_servers/eclipse_jdtls/runtime_dependencies.json index b1611d9..bc2cb74 100644 --- a/src/multilspy/language_servers/eclipse_jdtls/runtime_dependencies.json +++ b/src/multilspy/language_servers/eclipse_jdtls/runtime_dependencies.json @@ -13,10 +13,15 @@ "archiveType": "zip", "relative_extraction_path": "vscode-java" }, - "darwin-x64": { + "osx-arm64": { "url": "https://github.com/redhat-developer/vscode-java/releases/download/v1.23.0/java@darwin-x64-1.23.0.vsix", "archiveType": "zip", - "relative_extraction_path": "vscode-java" + "relative_extraction_path": "vscode-java", + "jre_home_path": "extension/jre/17.0.8.1-macosx-x86_64", + "jre_path": "extension/jre/17.0.8.1-macosx-x86_64/bin/java", + "lombok_jar_path": "extension/lombok/lombok-1.18.30.jar", + "jdtls_launcher_jar_path": "extension/server/plugins/org.eclipse.equinox.launcher_1.6.500.v20230717-2134.jar", + "jdtls_readonly_config_path": "extension/server/config_mac_arm" }, "linux-arm64": { "url": "https://github.com/redhat-developer/vscode-java/releases/download/v1.23.0/java@linux-arm64-1.23.0.vsix", diff --git a/src/multilspy/language_servers/rust_analyzer/runtime_dependencies.json b/src/multilspy/language_servers/rust_analyzer/runtime_dependencies.json index 88fde14..517d8b8 100644 --- a/src/multilspy/language_servers/rust_analyzer/runtime_dependencies.json +++ b/src/multilspy/language_servers/rust_analyzer/runtime_dependencies.json @@ -1,6 +1,14 @@ { "_description": "Used to download the runtime dependencies for running RustAnalyzer. Obtained from https://github.com/rust-lang/rust-analyzer/releases", "runtimeDependencies": [ + { + "id": "RustAnalyzer", + "description": "RustAnalyzer for Linux (x64)", + "url": "https://github.com/rust-lang/rust-analyzer/releases/download/2023-10-09/rust-analyzer-aarch64-apple-darwin.gz", + "platformId": "osx-arm64", + "archiveType": "gz", + "binaryName": "rust_analyzer" + }, { "id": "RustAnalyzer", "description": "RustAnalyzer for Linux (x64)", diff --git a/src/multilspy/language_servers/rust_analyzer/rust_analyzer.py b/src/multilspy/language_servers/rust_analyzer/rust_analyzer.py index bbcdd3f..d7d7cff 100644 --- a/src/multilspy/language_servers/rust_analyzer/rust_analyzer.py +++ b/src/multilspy/language_servers/rust_analyzer/rust_analyzer.py @@ -49,10 +49,10 @@ def setup_runtime_dependencies(self, logger: MultilspyLogger, config: MultilspyC d = json.load(f) del d["_description"] - assert platform_id.value in [ - "linux-x64", - "win-x64", - ], "Only linux-x64 and win-x64 platform is supported for in multilspy at the moment" + # assert platform_id.value in [ + # "linux-x64", + # "win-x64", + # ], "Only linux-x64 and win-x64 platform is supported for in multilspy at the moment" runtime_dependencies = d["runtimeDependencies"] runtime_dependencies = [