From 4724975d6ab0bcc8be50a554e73ee74105d2386a Mon Sep 17 00:00:00 2001 From: Sung-Shik Jongmans Date: Mon, 21 Sep 2026 11:05:31 +0200 Subject: [PATCH 1/4] Update rascal-maven-plugin version --- src/org/rascalmpl/library/util/Reflective.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/rascalmpl/library/util/Reflective.rsc b/src/org/rascalmpl/library/util/Reflective.rsc index 4140497f582..b035c49f698 100644 --- a/src/org/rascalmpl/library/util/Reflective.rsc +++ b/src/org/rascalmpl/library/util/Reflective.rsc @@ -529,7 +529,7 @@ private str pomXml(str name, str group, str version) ' \ ' \org.rascalmpl\ ' \rascal-maven-plugin\ - ' \0.8.2\ + ' \0.30.3\ ' \ ' \true\ ' \${project.build.outputDirectory}\ From 0976d9a7d876329fbb589bc5a842243d6a6e47b2 Mon Sep 17 00:00:00 2001 From: Sung-Shik Jongmans Date: Mon, 21 Sep 2026 11:06:05 +0200 Subject: [PATCH 2/4] Add execution tags to be able to invoke compiler using Maven --- src/org/rascalmpl/library/util/Reflective.rsc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/org/rascalmpl/library/util/Reflective.rsc b/src/org/rascalmpl/library/util/Reflective.rsc index b035c49f698..33d25e16c57 100644 --- a/src/org/rascalmpl/library/util/Reflective.rsc +++ b/src/org/rascalmpl/library/util/Reflective.rsc @@ -537,6 +537,15 @@ private str pomXml(str name, str group, str version) ' \${project.basedir}/src/main/rascal\ ' \ ' \ + ' \ + ' \ + ' \-compile\ + ' \compile\ + ' \ + ' \compile\ + ' \ + ' \ + ' \ ' \ ' \ ' \ From 1960874c49da2b30d8f40ed0cfb1932080efa1cc Mon Sep 17 00:00:00 2001 From: Sung-Shik Jongmans Date: Mon, 21 Sep 2026 11:59:39 +0200 Subject: [PATCH 3/4] Add function to make best-effort attempt at finding the latest version of rascal-maven-plugin --- src/org/rascalmpl/library/util/Reflective.rsc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/org/rascalmpl/library/util/Reflective.rsc b/src/org/rascalmpl/library/util/Reflective.rsc index 33d25e16c57..23b034c7c80 100644 --- a/src/org/rascalmpl/library/util/Reflective.rsc +++ b/src/org/rascalmpl/library/util/Reflective.rsc @@ -529,7 +529,7 @@ private str pomXml(str name, str group, str version) ' \ ' \org.rascalmpl\ ' \rascal-maven-plugin\ - ' \0.30.3\ + ' \\ ' \ ' \true\ ' \${project.build.outputDirectory}\ @@ -552,6 +552,16 @@ private str pomXml(str name, str group, str version) '\ "; +private str getRascalMavenPluginVersion() { + try { // Best-effort attempt to get the latest version + loc l = |https://api.github.com/repos/usethesource/rascal-maven-plugin/releases/latest|; + if (/"tag_name":\s*"v"/ := readFile(l)) { + return version; + } + } catch _: ; + return "0.31.0"; // 2 March 2026 +} + private str vscodeSettings() = "{ ' \"search.exclude\": { ' \"/target/\": true, From b5edf3119073a7d702b8f374d2bd35be711cc012 Mon Sep 17 00:00:00 2001 From: Sung-Shik Jongmans Date: Tue, 22 Sep 2026 12:43:45 +0200 Subject: [PATCH 4/4] Use JSON parser --- src/org/rascalmpl/library/util/Reflective.rsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/rascalmpl/library/util/Reflective.rsc b/src/org/rascalmpl/library/util/Reflective.rsc index 7f05eb1c772..dde32c10155 100644 --- a/src/org/rascalmpl/library/util/Reflective.rsc +++ b/src/org/rascalmpl/library/util/Reflective.rsc @@ -23,6 +23,7 @@ import Message; import lang::rascal::\syntax::Rascal; import lang::manifest::IO; +import lang::json::IO; @synopsis{Returns the system-dependent line separator string} @javaClass{org.rascalmpl.library.util.Reflective} @@ -540,7 +541,7 @@ private str pomXml(str name, str group, str version) ' \ ' \ ' \ - ' \-compile\ + ' \default-compile\ ' \compile\ ' \ ' \compile\ @@ -555,8 +556,7 @@ private str pomXml(str name, str group, str version) private str getRascalMavenPluginVersion() { try { // Best-effort attempt to get the latest version - loc l = |https://api.github.com/repos/usethesource/rascal-maven-plugin/releases/latest|; - if (/"tag_name":\s*"v"/ := readFile(l)) { + if (str s := readJSON(#map[str, value], |https://api.github.com/repos/usethesource/rascal-maven-plugin/releases/latest|)["tag_name"], /v/ := s) { return version; } } catch _: ;