Skip to content

Commit

Permalink
Hide "Checked X" messages behind compiler option infoModuleChecked
Browse files Browse the repository at this point in the history
This is used for tests regarding incremental checking
  • Loading branch information
PaulKlint committed Oct 29, 2024
1 parent a1cc6fb commit 4412c4d
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module lang::rascalcore::check::BasicRascalConfig
The checker itself is configure in RascalConfig.
*/
extend analysis::typepal::TypePal;

import lang::rascal::\syntax::Rascal;
import Location;
import util::SemVer;
Expand Down Expand Up @@ -36,14 +36,14 @@ data IdRole

public set[IdRole] syntaxRoles = {aliasId(), nonterminalId(), lexicalId(), layoutId(), keywordId()};
public set[IdRole] dataOrSyntaxRoles = {dataId()} + syntaxRoles;
public set[IdRole] dataRoles = {aliasId(), dataId()};
public set[IdRole] dataRoles = {aliasId(), dataId()};
public set[IdRole] outerFormalRoles = {formalId(), keywordFormalId()};
public set[IdRole] positionalFormalRoles = {formalId(), nestedFormalId()};
public set[IdRole] formalRoles = outerFormalRoles + {nestedFormalId()};
public set[IdRole] variableRoles = formalRoles + {variableId(), moduleVariableId(), patternVariableId()};
public set[IdRole] inferrableRoles = formalRoles + {variableId(), moduleVariableId(), patternVariableId()};
public set[IdRole] keepInTModelRoles = dataOrSyntaxRoles + { moduleId(), constructorId(), functionId(),
fieldId(), keywordFieldId(), annoId(),
public set[IdRole] keepInTModelRoles = dataOrSyntaxRoles + { moduleId(), constructorId(), functionId(),
fieldId(), keywordFieldId(), annoId(),
moduleVariableId(), productionId(), nonterminalId()
};
public set[IdRole] assignableRoles = variableRoles;
Expand All @@ -52,7 +52,7 @@ data PathRole
= importPath()
| extendPath()
;

data ScopeRole
= //moduleScope()
functionScope()
Expand Down Expand Up @@ -130,21 +130,22 @@ alias RascalCompilerConfig = TypePalConfig;

data TypePalConfig(
str rascalTplVersion = getCurrentRascalTplVersion(),

// Control message level
bool warnUnused = true,
bool warnUnusedFormals = true,
bool warnUnusedVariables = true,
bool warnUnusedPatternFormals = true,

bool infoModuleChecked = false,

loc reloc = |noreloc:///|, // Unused

// Debugging options
bool verbose = true, // for each compiled module, module name and compilation time
bool logImports = false, // log all imported files
bool logWrittenFiles = false, // log all files written by compiler
bool logPathConfig = false, // log PathConfig that is used

bool optimizeVisit = true, // Options for compiler developer
bool enableAsserts = true,
bool forceCompilationTopModule = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ ModuleStatus rascalTModelForLocs(
msgs = [];
<success, pt, ms> = getModuleParseTree(m, ms);
if(success){
msgs += [info("Checked <m>", pt.header.name@\loc)];
if(compilerConfig.infoModuleChecked){
msgs += [info("Checked <m>", pt.header.name@\loc)];
}
check_imports:
for(imod <- pt.header.imports, imod has \module){
iname = unescape("<imod.\module.name>");
Expand Down
Loading

0 comments on commit 4412c4d

Please sign in to comment.