From e59880bb6fd00c0d6bef2d932f567f96264b12c8 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Wed, 13 May 2026 14:29:06 +0200 Subject: [PATCH 1/4] no more annotations --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c3a0494..650a9a7 100644 --- a/pom.xml +++ b/pom.xml @@ -155,7 +155,7 @@ org.rascalmpl rascal - 0.41.2 + 0.43.0-RC1 compile From 5b712d9583d85ed7af6d2dad5904e10c98606333 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Fri, 9 Oct 2026 11:26:43 +0200 Subject: [PATCH 2/4] fixed compilation errors and replaced JUnit tests by native rascal tests in the pom --- pom.xml | 40 +++++++---------------------- src/lang/cpp/internal/Parser.java | 5 ++-- src/lang/cpp/internal/RunTests.java | 12 --------- 3 files changed, 12 insertions(+), 45 deletions(-) delete mode 100644 src/lang/cpp/internal/RunTests.java diff --git a/pom.xml b/pom.xml index 650a9a7..281867a 100644 --- a/pom.xml +++ b/pom.xml @@ -59,7 +59,7 @@ org.rascalmpl rascal-maven-plugin - 0.30.3 + 0.32.0-RC7 false ${project.build.outputDirectory} @@ -81,6 +81,13 @@ compile + + it-test + test + + test + + default-cli compile @@ -88,7 +95,6 @@ tutor - true false ${project.build.outputDirectory} |http://github.com/usethesource/clair/blob/main| @@ -119,43 +125,15 @@ -Drascal.compile.skip -DskipTests -Drascal.tutor.skip - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M3 - - - test - test - - - -ea - -Xmx2G - -Xss128m - -Dfile.encoding=UTF-8 - - - **/*Tests.java - - ${basedir}/src/ - - - - - - junit - junit - 4.13.1 - org.rascalmpl rascal - 0.43.0-RC1 + 0.43.0-RC17 compile diff --git a/src/lang/cpp/internal/Parser.java b/src/lang/cpp/internal/Parser.java index 126c9fa..f88a148 100644 --- a/src/lang/cpp/internal/Parser.java +++ b/src/lang/cpp/internal/Parser.java @@ -209,6 +209,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics; import org.eclipse.core.runtime.CoreException; import org.rascalmpl.debug.IRascalMonitor; +import org.rascalmpl.ast.AbstractAST; import org.rascalmpl.exceptions.RuntimeExceptionFactory; import org.rascalmpl.interpreter.Evaluator; import org.rascalmpl.uri.URIUtil; @@ -334,7 +335,7 @@ public IValue parseC(ISourceLocation file, IString charset, IBool inferCharset, result = ((IConstructor) result).asWithKeywordParameters().setParameter("decl", tuDecl); if (result == null) { - throw RuntimeExceptionFactory.parseError(file, null, null); + throw RuntimeExceptionFactory.parseError(file, (AbstractAST) null, null); } return result; } @@ -361,7 +362,7 @@ public IValue parseCpp(ISourceLocation file, IString charset, IBool inferCharset ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationUnit", "", file.getPath()); result = ((IConstructor) result).asWithKeywordParameters().setParameter("decl", tuDecl); if (result == null) { - throw RuntimeExceptionFactory.parseError(file, null, null); + throw RuntimeExceptionFactory.parseError(file, (AbstractAST) null, null); } return result; } diff --git a/src/lang/cpp/internal/RunTests.java b/src/lang/cpp/internal/RunTests.java deleted file mode 100644 index c43d9cc..0000000 --- a/src/lang/cpp/internal/RunTests.java +++ /dev/null @@ -1,12 +0,0 @@ -package lang.cpp.internal; - -import org.junit.runner.RunWith; -import org.rascalmpl.test.infrastructure.RascalJUnitTestPrefix; -import org.rascalmpl.test.infrastructure.RascalJUnitTestRunner; - -@RunWith(RascalJUnitTestRunner.class) -@RascalJUnitTestPrefix("lang::cpp") -public class RunTests { - // nothing goes here. The test runner picks up all the Rascal source files from the - // src folder automaticall and starts loading and running their tests. -} From e1f23b82ad81b4914c16004bd7bf28495df374dd Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Fri, 9 Oct 2026 11:35:45 +0200 Subject: [PATCH 3/4] added test reporting --- .github/workflows/build.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e86eac5..5e2aebc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,6 +26,22 @@ jobs: - name: Test with Maven run: mvn -B --update-snapshots compile test + - name: Publish Test Reports + if: ${{ !cancelled() }} + uses: ctrf-io/github-test-reporter@v1 + with: + report-path: 'target/rascal-test-reports/*.json' + github-report: true + file-report: true + pull-request-report: true + summary-delta-report: true + insights-report: true + fail-rate-report: true + slowest-report: true + upload-artifact: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Attach artifact id: build-artifact uses: SWAT-engineering/maven-full-artifacts-action@v1 From 12cffb4d7915fb804c90efacd0a75732303e2791 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Fri, 9 Oct 2026 12:00:09 +0200 Subject: [PATCH 4/4] fixed problems with lowercase schemes --- src/lang/cpp/internal/BindingsResolver.java | 8 ++++---- src/lang/cpp/internal/Parser.java | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lang/cpp/internal/BindingsResolver.java b/src/lang/cpp/internal/BindingsResolver.java index 1f4da82..5115867 100644 --- a/src/lang/cpp/internal/BindingsResolver.java +++ b/src/lang/cpp/internal/BindingsResolver.java @@ -135,7 +135,7 @@ public class BindingsResolver { public ISetWriter containment; private ISourceLocation translationUnit; - private ISourceLocation translationUnitRoot = URIUtil.rootLocation("cpp+translationUnit"); + private ISourceLocation translationUnitRoot = URIUtil.rootLocation("cpp+translationunit"); private void out(String msg) { // stdOut.println(spaces() + msg.replace("\n", "\n" + spaces())); @@ -170,7 +170,7 @@ public BindingsResolver(IValueFactory vf, PrintWriter stdOut, PrintWriter stdErr this.vf = vf; this.stdErr = stdErr; this.containment = vf.setWriter(); - this.translationUnit = URIUtil.rootLocation("cpp+translationUnit"); + this.translationUnit = URIUtil.rootLocation("cpp+translationunit"); this.NYI = makeBinding("NYI", null, null); this.FIXME = makeBinding("FIXME", null, null); } @@ -183,9 +183,9 @@ private ISourceLocation ownedBinding(IBinding binding, String scheme, String pos String name = renameOperators(binding.getName()) + postfix; ISourceLocation ownerLocation = resolveOwner(binding, origin); ISourceLocation location = null; - boolean isAtRoot = "cpp+translationUnit".equals(ownerLocation.getScheme()); + boolean isAtRoot = "cpp+translationunit".equals(ownerLocation.getScheme()); - // * When we are at the root, we want a different parent from |cpp+translationUnit:///| as containment parent; name it should contain the file name from `translationUnit` + // * When we are at the root, we want a different parent from |cpp+translationunit:///| as containment parent; name it should contain the file name from `translationUnit` // * Also when we are the root, `static` variables and functions need to be prefixed with the file name because they are local to the current translationUnit if (isStatic) { diff --git a/src/lang/cpp/internal/Parser.java b/src/lang/cpp/internal/Parser.java index f88a148..3dd87fd 100644 --- a/src/lang/cpp/internal/Parser.java +++ b/src/lang/cpp/internal/Parser.java @@ -304,7 +304,7 @@ public IList parseFiles(IList files, IString charset, IBool inferCharset, IList IASTTranslationUnit tu = parser.parseFileAsCpp(file, charset, inferCharset); try { IValue result = convertCdtToRascal(tu, false); - ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationUnit", "", file.getPath()); + ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationunit", "", file.getPath()); result = ((IConstructor) result).asWithKeywordParameters().setParameter("decl", tuDecl); asts.append(result); } @@ -331,7 +331,7 @@ public IValue parseC(ISourceLocation file, IString charset, IBool inferCharset, try { IValue result = convertCdtToRascal(tu, false); - ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationUnit", "", file.getPath()); + ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationunit", "", file.getPath()); result = ((IConstructor) result).asWithKeywordParameters().setParameter("decl", tuDecl); if (result == null) { @@ -359,7 +359,7 @@ public IValue parseCpp(ISourceLocation file, IString charset, IBool inferCharset try { IValue result = convertCdtToRascal(tu, false); - ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationUnit", "", file.getPath()); + ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationunit", "", file.getPath()); result = ((IConstructor) result).asWithKeywordParameters().setParameter("decl", tuDecl); if (result == null) { throw RuntimeExceptionFactory.parseError(file, (AbstractAST) null, null); @@ -381,7 +381,7 @@ public ITuple parseCToM3AndAst(ISourceLocation file, IString charset, IBool infe this.stdLib = stdLib; IValue m3 = builder.M3_m3(file); - ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationUnit", "", file.getPath()); + ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationunit", "", file.getPath()); br.setTranslationUnit(tuDecl); CDTParser parser = new CDTParser(vf,stdOut, stdErr, stdLib, includeDirs, standardMacros, additionalMacros, includeStdLib.getValue()); @@ -439,7 +439,7 @@ public ITuple parseCppToM3AndAst(ISourceLocation file, IString charset, IBool in this.stdLib = stdLib; IValue m3 = builder.M3_m3(file); - ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationUnit", "", file.getPath()); + ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationunit", "", file.getPath()); br.setTranslationUnit(tuDecl); CDTParser parser = new CDTParser(vf, stdOut, stdErr, stdLib, includeDirs, standardMacros, additionalMacros, includeStdLib.getValue()); @@ -622,7 +622,7 @@ public IValue parseString(IString code, ISourceLocation loc) throws CoreExceptio try { IValue result = convertCdtToRascal(tu, false); - ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationUnit", "", loc == null ? "" : loc.getPath()); + ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationunit", "", loc == null ? "" : loc.getPath()); return ((IConstructor) result).asWithKeywordParameters().setParameter("decl", tuDecl); } catch (NullPointerException e) { @@ -651,7 +651,7 @@ public IValue convertCdtToRascal(IASTTranslationUnit translationUnit, boolean to stack.iterator().forEachRemaining(it -> err(it.toString())); ISourceLocation file = locs.forNode(translationUnit); - ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationUnit", "", file.getPath()); + ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationunit", "", file.getPath()); return ast.asWithKeywordParameters().setParameter("decl", tuDecl); } @@ -824,7 +824,7 @@ public int visit(IASTTranslationUnit tu) { boolean isMacroExpansion = isMacroExpansion(tu); IListWriter declarations = vf.listWriter(); ISourceLocation tuLoc = locs.forNode(tu); - ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationUnit", "", tuLoc.getPath()); + ISourceLocation tuDecl = URIUtil.correctLocation("cpp+translationunit", "", tuLoc.getPath()); monitor.jobStart("ClaiR AST marshalling"); declLoop: for (IASTDeclaration declaration : tu.getDeclarations()) {