Update: metals(scala-lsp) version 1.6.2 -> 1.6.4 (#838)

This commit is contained in:
youM authored and GitHub committed 2025-12-15 18:17:10 +01:00
1 parent 83f5f3bdf4
commit e8bb288f34
3 files changed
+18 -2

No files matched your search

@@ -57,9 +57,11 @@ class ScalaLanguageServer(SolidLanguageServer):
"""
assert shutil.which("java") is not None, "JDK is not installed or not in PATH."
metals_version = "1.6.4"
metals_home = os.path.join(cls.ls_resources_dir(solidlsp_settings), "metals-lsp")
os.makedirs(metals_home, exist_ok=True)
metals_executable = os.path.join(metals_home, "metals")
metals_executable = os.path.join(metals_home, metals_version, "metals")
coursier_command_path = shutil.which("coursier")
cs_command_path = shutil.which("cs")
assert cs_command_path is not None or coursier_command_path is not None, "coursier is not installed or not in PATH."
@@ -82,7 +84,8 @@ class ScalaLanguageServer(SolidLanguageServer):
log.info("'cs' command installed successfully.")
log.info(f"metals executable not found at {metals_executable}, bootstrapping...")
artifact = "org.scalameta:metals_2.13:1.6.2"
subprocess.run(["mkdir", "-p", os.path.join(metals_home, metals_version)], check=True)
artifact = f"org.scalameta:metals_2.13:{metals_version}"
cmd = [
cs_command_path,
"bootstrap",
@@ -17,4 +17,13 @@ object Main {
def add(a: Int, b: Int): Int = {
a + b
}
// https://github.com/oraios/serena/issues/688
def someMethod(config: Config): Unit = {
val str = config.field1
println(str)
}
case class Config(field1:String)
}
@@ -34,6 +34,10 @@ def test_scala_document_symbols(scala_ls):
assert symbol_names[3] == "result"
assert symbol_names[4] == "sum"
assert symbol_names[5] == "add"
assert symbol_names[6] == "someMethod"
assert symbol_names[7] == "str"
assert symbol_names[8] == "Config"
assert symbol_names[9] == "field1" # confirm https://github.com/oraios/serena/issues/688
def test_scala_references_within_same_file(scala_ls):