Skip to content

Commit

Permalink
Reduced number of error prints
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Oct 8, 2024
1 parent c6b8049 commit cd29f5f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/org/rascalmpl/core/library/lang/rascalcore/check/Import.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,13 @@ ModuleStatus doSaveModule(set[str] component, map[str,set[str]] m_imports, map[s
if(any(c <- component, !isEmpty({parse_error(), rsc_not_found(), MStatus::ignored()} & ms.status[c]))){
return ms;
}

if(any(c <- component, error(_,_) <- ms.messages[c])){
for(c <- component){
iprintln(ms.messages[c]);
}
//return ms;
// Commented out to make checker less noisy
// for(c <- component){
// iprintln(ms.messages[c]);
// }
return ms;
}
//println("doSaveModule: <qualifiedModuleName>, <imports>, <extends>, <moduleScopes>");
component_scopes = { getModuleScope(qualifiedModuleName, moduleScopes, pcfg) | qualifiedModuleName <- component };
Expand Down Expand Up @@ -341,7 +343,7 @@ ModuleStatus doSaveModule(set[str] component, map[str,set[str]] m_imports, map[s
m1.specializedFacts = (key : tm.specializedFacts[key] | key <- tm.specializedFacts, isContainedInComponentScopes(key), any(fms <- filteredModuleScopes, isContainedIn(key, fms)));
m1.facts += m1.specializedFacts;

m1.messages = sort( { msg | msg <- tm.messages, /*msg is error || */msg.at.path == mscope.path}, bool(Message a, Message b){ return a.at.begin.line < b.at.begin.line; });
m1.messages = sort( { msg | msg <- tm.messages, msg.at.path == mscope.path}, bool(Message a, Message b){ return a.at.begin.line < b.at.begin.line; });
ms.messages[qualifiedModuleName] = m1.messages;

filteredModuleScopePaths = {ml.path |loc ml <- filteredModuleScopes};
Expand Down

0 comments on commit cd29f5f

Please sign in to comment.