From c855921410f6a465989a611500df33fac9a7434f Mon Sep 17 00:00:00 2001 From: paulklint Date: Sun, 15 Feb 2026 16:51:54 +0100 Subject: [PATCH 1/3] Fixed type errors in ignored tests --- .../library/lang/rascal/tests/library/ValueIO.rsc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/org/rascalmpl/library/lang/rascal/tests/library/ValueIO.rsc b/src/org/rascalmpl/library/lang/rascal/tests/library/ValueIO.rsc index 1bbdd8707a2..d9c10858f30 100644 --- a/src/org/rascalmpl/library/lang/rascal/tests/library/ValueIO.rsc +++ b/src/org/rascalmpl/library/lang/rascal/tests/library/ValueIO.rsc @@ -13,6 +13,7 @@ module lang::rascal::tests::library::ValueIO import ValueIO; import util::UUID; +import util::Reflective; data Bool(str def = "2") = btrue() | bfalse(bool falsity = true) | band(Bool left, Bool right) | bor(Bool left, Bool right); @@ -98,9 +99,8 @@ test bool textSet() = textWriteRead(#set[int], {1,2,3}); test bool textMap() = textWriteRead(#map[int, int], (1:10, 2:20)); test bool textTuple() = textWriteRead(#tuple[int, bool, str], <1,true,"abc">); - -@ignore -test bool textAdt() = textWriteRead1(#Bool, band(bor(btrue(),bfalse()),band(btrue(),btrue()))); + +test bool textAdt() = textWriteRead(#Bool, band(bor(btrue(),bfalse()),band(btrue(),btrue()))); test bool valueText(value v) = textWriteRead(#value, v); @@ -148,14 +148,14 @@ loc parsetree1 = |memory://test-tmp/parsetree1-<"">.test|; @Ignore{FOR NOW} test bool writingParseTreeWorks() { - t = parseNamedModuleWithSpaces(|project://rascal/src/org/rascalmpl/library/lang/rascal/syntax/Rascal.rsc|); + t = parseModuleWithSpaces(|project://rascal/src/org/rascalmpl/library/lang/rascal/syntax/Rascal.rsc|); writeBinaryValueFile(parsetree1, t); return readBinaryValueFile(parsetree1) == t; } @Ignore{FOR NOW} test bool writingParseTreeWorksWithoutCompression() { - t = parseNamedModuleWithSpaces(|project://rascal/src/org/rascalmpl/library/lang/rascal/syntax/Rascal.rsc|); + t = parseModuleWithSpaces(|project://rascal/src/org/rascalmpl/library/lang/rascal/syntax/Rascal.rsc|); writeBinaryValueFile(parsetree1, t, compression=false); return readBinaryValueFile(parsetree1) == t; } From 89a3b1641b80d8baa724040e811da6fab623d823 Mon Sep 17 00:00:00 2001 From: paulklint Date: Sun, 15 Feb 2026 16:55:29 +0100 Subject: [PATCH 2/3] Renamed ignoreCompiler -> hasIgnoreCompilerTag; Adapted definition --- .../compiler/lang/rascalcore/check/Checker.rsc | 2 +- .../lang/rascalcore/check/CollectDataDeclaration.rsc | 2 +- .../lang/rascalcore/check/CollectDeclaration.rsc | 12 ++++++------ .../compiler/lang/rascalcore/check/SyntaxGetters.rsc | 7 +++++-- .../compile/Rascal2muRascal/ConcreteSyntax.rsc | 2 +- .../compile/Rascal2muRascal/RascalDeclaration.rsc | 8 ++++---- .../compile/Rascal2muRascal/RascalModule.rsc | 2 +- .../rascalcore/compile/muRascal2Java/CodeGen.rsc | 6 +++--- 8 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/Checker.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/Checker.rsc index 701b82eb123..d7e3dc4fc63 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/check/Checker.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/Checker.rsc @@ -466,7 +466,7 @@ tuple[TModel, ModuleStatus] rascalTModelComponent(set[MODID] moduleIds, ModuleSt if(success){ tagsMap = getTags(pt.header.tags); - if(ignoreCompiler(tagsMap)) { + if(hasIgnoreCompilerTag(tagsMap)) { ms.messages[mid] ? {} += { Message::info("Ignoring module ", pt.header.name@\loc) }; ms.status[mid] += MStatus::ignored(); } diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectDataDeclaration.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectDataDeclaration.rsc index 96bc64408ff..e260fa90d25 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectDataDeclaration.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectDataDeclaration.rsc @@ -57,7 +57,7 @@ void dataDeclaration(Tags tags, Declaration current, list[Variant] variants, Col adtName = prettyPrintName(userType.name); tagsMap = getTags(tags); - if(ignoreCompiler(tagsMap)) { + if(hasIgnoreCompilerTag(tagsMap)) { c.report(info(adtName, "Ignoring declaration of ``")); return; } diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectDeclaration.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectDeclaration.rsc index ac701878611..da9e32c7837 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectDeclaration.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectDeclaration.rsc @@ -82,7 +82,7 @@ void collect(Module current, Collector c){ tagsMap = getTags(header.tags); - if(ignoreCompiler(tagsMap)) { + if(hasIgnoreCompilerTag(tagsMap)) { c.report(info(header.name, "Ignoring module ")); return; } @@ -159,7 +159,7 @@ void collect(current: (Import) `extend ;`, Collector c){ void collect(current: (Declaration) ` <{Variable ","}+ variables> ;`, Collector c){ tagsMap = getTags(tags); - if(ignoreCompiler(tagsMap)) { + if(hasIgnoreCompilerTag(tagsMap)) { c.report(info(current, "Ignoring variable declaration")); return; } @@ -210,7 +210,7 @@ void collect(current: (Declaration) ` anno `")); return; } @@ -265,7 +265,7 @@ void collect(current: (FunctionDeclaration) ``, Collec ppfname = prettyPrintName(fname); modifiers = ["" | m <- signature.modifiers.modifiers]; tagsMap = getTags(decl.tags); - if(ignoreCompiler(tagsMap) && "test" notin modifiers) { + if(hasIgnoreCompilerTag(tagsMap)) { c.report(info(fname, "Ignoring function declaration for ``")); return; } @@ -711,7 +711,7 @@ void collect(current: (Statement) `return `, Collector c){ void collect (current: (Declaration) ` alias = ;`, Collector c){ aliasName = prettyPrintName(name); tagsMap = getTags(tags); - if(ignoreCompiler(tagsMap)) { + if(hasIgnoreCompilerTag(tagsMap)) { c.report(info(name, "Ignoring alias declaration for ``")); return; } @@ -729,7 +729,7 @@ void collect (current: (Declaration) ` alias aliasName = prettyPrintName(name); tagsMap = getTags(tags); - if(ignoreCompiler(tagsMap)) { + if(hasIgnoreCompilerTag(tagsMap)) { c.report(info(name, "Ignoring alias declaration for ``")); return; } diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/SyntaxGetters.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/SyntaxGetters.rsc index 4256726e2c5..a14a21c88d2 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/check/SyntaxGetters.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/SyntaxGetters.rsc @@ -99,8 +99,11 @@ map[str,str] getTags(Tags tags){ //map[str,str] getTags(Tags tags) // = ("" : tg has contents ? "" : "" | tg <- tags.tags); -bool ignoreCompiler(map[str,str] tagsMap) - = !isEmpty(domain(tagsMap) & {"ignore", "Ignore", "ignoreCompiler", "IgnoreCompiler"}); +bool hasIgnoreCompilerTag(map[str,str] tagsMap) + = !isEmpty(domain(tagsMap) & {"hasIgnoreCompilerTag", "IgnoreCompiler"}); + +bool hasIgnoreTag(map[str,str] tagsMap) + = !isEmpty(domain(tagsMap) & {"ignore", "Ignore"}); tuple[bool, str] getDeprecated(map[str,str] tagsMap){ for(depr <- {"deprecated", "Deprecated"}){ diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/ConcreteSyntax.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/ConcreteSyntax.rsc index 8604a2588f3..09976df45c5 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/ConcreteSyntax.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/ConcreteSyntax.rsc @@ -68,7 +68,7 @@ tuple[Tree, TModel] parseConcreteFragments(Tree M, TModel tm, AGrammar gr) { } } - ignoredFunctionLocs = {fd@\loc | /FunctionDeclaration fd := M, ignoreCompiler(getTags(fd.tags)) }; + ignoredFunctionLocs = {fd@\loc | /FunctionDeclaration fd := M, hasIgnoreCompilerTag(getTags(fd.tags)) }; M = top-down-break visit(M) { case Tree t:appl(p:prod(label("concrete",sort(/Expression|Pattern/)), _, _),[Tree concrete]) diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/RascalDeclaration.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/RascalDeclaration.rsc index c2a3e590370..20862bd93a0 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/RascalDeclaration.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/RascalDeclaration.rsc @@ -559,12 +559,12 @@ public map[str,str] translateTags(Tags tags){ return m; } -public bool ignoreCompiler(map[str,str] tagsMap) - = !isEmpty(domain(tagsMap) & {"ignore", "Ignore", "ignoreCompiler", "IgnoreCompiler"}); +// public bool hasIgnoreCompilerTag(map[str,str] tagsMap) +// = !isEmpty(domain(tagsMap) & {"ignore", "Ignore", "hasIgnoreCompilerTag", "IgnoreCompiler"}); -//private bool ignoreCompilerTest(map[str, str] tags) = !isEmpty(domain(tags) & {"ignoreCompiler", "IgnoreCompiler"}); +//private bool hasIgnoreCompilerTagTest(map[str, str] tags) = !isEmpty(domain(tags) & {"hasIgnoreCompilerTag", "IgnoreCompiler"}); -public bool ignoreTest(map[str, str] tags) = !isEmpty(domain(tags) & {"ignore", "Ignore", "ignoreCompiler", "IgnoreCompiler"}); +// public bool ignoreTest(map[str, str] tags) = !isEmpty(domain(tags) & {"ignore", "Ignore", "hasIgnoreCompilerTag", "IgnoreCompiler"}); /********************************************************************/ /* Translate the modifiers in a function declaration */ diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/RascalModule.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/RascalModule.rsc index 1256b76af38..527441d3e35 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/RascalModule.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/RascalModule.rsc @@ -78,7 +78,7 @@ tuple[TModel, MuModule] r2mu(lang::rascal::\syntax::Rascal::Module M, TModel tmo mtags = translateTags(M.header.tags); setModuleTags(mtags); - if(ignoreTest(mtags)){ + if(hasIgnoreTag(mtags)){ e = info("Ignore tag suppressed compilation", M.header.name@\loc); tmodel.messages += [e]; return ; diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/CodeGen.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/CodeGen.rsc index 1542d7e804c..fdec9581eaa 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/CodeGen.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/CodeGen.rsc @@ -457,8 +457,8 @@ tuple[int secondsTimeout, int maxSize] getMemoSettings(str memoString){ // Copy from RascalDeclaration, move to separate module -bool ignoreCompiler(map[str,str] tagsMap) - = !isEmpty(domain(tagsMap) & {"ignore", "Ignore", "ignoreCompiler", "IgnoreCompiler"}); +bool hasIgnoreCompilerTag(map[str,str] tagsMap) + = !isEmpty(domain(tagsMap) & {"ignore", "Ignore", "hasIgnoreCompilerTag", "IgnoreCompiler"}); str getMemoCache(MuFunction fun) = "$memo_"; @@ -468,7 +468,7 @@ tuple[str constantKwpDefaults, str constantKwpDefaultsInit, JCode jcode] trans(M if(!jg.isContainedIn(fun.src, jg.getModuleLoc())) return <"", "", "">; - if(ignoreCompiler(fun.tags)) return <"", "", "">; + if(hasIgnoreCompilerTag(fun.tags)) return <"", "", "">; ftype = fun.ftype; jg.setFunction(fun); From b3ede2c68c49b5853c53f2a09ec9e86b410b3ffa Mon Sep 17 00:00:00 2001 From: paulklint Date: Sun, 15 Feb 2026 17:10:05 +0100 Subject: [PATCH 3/3] Fixed renaming issue --- .../rascalmpl/compiler/lang/rascalcore/check/SyntaxGetters.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/SyntaxGetters.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/SyntaxGetters.rsc index a14a21c88d2..01504fe9163 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/check/SyntaxGetters.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/SyntaxGetters.rsc @@ -100,7 +100,7 @@ map[str,str] getTags(Tags tags){ // = ("" : tg has contents ? "" : "" | tg <- tags.tags); bool hasIgnoreCompilerTag(map[str,str] tagsMap) - = !isEmpty(domain(tagsMap) & {"hasIgnoreCompilerTag", "IgnoreCompiler"}); + = !isEmpty(domain(tagsMap) & {"ignoreCompiler", "IgnoreCompiler"}); bool hasIgnoreTag(map[str,str] tagsMap) = !isEmpty(domain(tagsMap) & {"ignore", "Ignore"});