From 211849f4c417f6e8a1b8bdb6f323cef88b31155b Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Wed, 27 Nov 2024 14:23:13 +0100 Subject: [PATCH 1/3] Using new rascal-core with fast typechecking and quickfixes --- rascal-lsp/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rascal-lsp/pom.xml b/rascal-lsp/pom.xml index 0c47fb9d..ad1e5250 100644 --- a/rascal-lsp/pom.xml +++ b/rascal-lsp/pom.xml @@ -70,12 +70,12 @@ org.rascalmpl rascal-core - 0.12.12 + 0.12.13-RC1 org.rascalmpl typepal - 0.14.8 + 0.15.0-RC1 From 4faa86a5055f179e5a166fff90b3247a03aee351 Mon Sep 17 00:00:00 2001 From: Toine Hartman Date: Wed, 27 Nov 2024 14:41:50 +0100 Subject: [PATCH 2/3] Remove use of compiler parameter (core API change) --- rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc | 3 +-- .../src/main/rascal/lang/rascal/tests/rename/TestUtils.rsc | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc b/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc index 3707ccb5..e935ec8c 100644 --- a/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc +++ b/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc @@ -562,8 +562,7 @@ Edits rascalRenameSymbol(Tree cursorT, set[loc] workspaceFolders, str newName, P for (projectFolder <- projectFiles.projectFolder, \files := projectFiles[projectFolder]) { PathConfig pcfg = getPathConfig(projectFolder); - RascalCompilerConfig ccfg = rascalCompilerConfig(pcfg)[forceCompilationTopModule = true] - [verbose = false] + RascalCompilerConfig ccfg = rascalCompilerConfig(pcfg)[verbose = false] [logPathConfig = false]; for ( <- \files) { ms = rascalTModelForLocs([file], ccfg, dummy_compile1); diff --git a/rascal-lsp/src/main/rascal/lang/rascal/tests/rename/TestUtils.rsc b/rascal-lsp/src/main/rascal/lang/rascal/tests/rename/TestUtils.rsc index 8014979a..188a56df 100644 --- a/rascal-lsp/src/main/rascal/lang/rascal/tests/rename/TestUtils.rsc +++ b/rascal-lsp/src/main/rascal/lang/rascal/tests/rename/TestUtils.rsc @@ -69,7 +69,7 @@ private void verifyTypeCorrectRenaming(loc root, Edits edits, PathConfig pcfg) { assert size(editLocs) == size(toSet(editLocs)) : "Duplicate locations in suggested edits - VS Code cannot handle this"; executeDocumentEdits(sortEdits(edits<0>)); remove(pcfg.resources); - RascalCompilerConfig ccfg = rascalCompilerConfig(pcfg)[forceCompilationTopModule = true][verbose = false][logPathConfig = false]; + RascalCompilerConfig ccfg = rascalCompilerConfig(pcfg)[verbose = false][logPathConfig = false]; throwAnyErrors(checkAll(root, ccfg)); } From af04c3b5fc1d2606b4d61e1605194e60af42bb06 Mon Sep 17 00:00:00 2001 From: Toine Hartman Date: Wed, 27 Nov 2024 14:43:11 +0100 Subject: [PATCH 3/3] Change type of module messages (core API change) --- rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Util.rsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Util.rsc b/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Util.rsc index d062a5df..f9dfdcd8 100644 --- a/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Util.rsc +++ b/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Util.rsc @@ -87,10 +87,10 @@ str toString(error(msg)) = "[error] \'\'"; str toString(warning(msg, l)) = "[warning] \'\' at "; str toString(info(msg, l)) = "[info] \'\' at "; -str toString(list[Message] msgs, int indent = 1) = +str toString(set[Message] msgs, int indent = 1) = intercalate("\n", ([] | it + " <}>- " | msg <- msgs)); -str toString(map[str, list[Message]] moduleMsgs) = +str toString(map[str, set[Message]] moduleMsgs) = intercalate("\n", ([] | it + "Messages for :\n" | m <- moduleMsgs)); rel[&K, &V] groupBy(set[&V] s, &K(&V) pred) =