From cd29f5f3e4f7151851c3da8da683f583a5a0016b Mon Sep 17 00:00:00 2001 From: paulklint Date: Tue, 8 Oct 2024 14:58:42 +0200 Subject: [PATCH] Reduced number of error prints --- .../core/library/lang/rascalcore/check/Import.rsc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/org/rascalmpl/core/library/lang/rascalcore/check/Import.rsc b/src/org/rascalmpl/core/library/lang/rascalcore/check/Import.rsc index 37bcd075..d383f310 100644 --- a/src/org/rascalmpl/core/library/lang/rascalcore/check/Import.rsc +++ b/src/org/rascalmpl/core/library/lang/rascalcore/check/Import.rsc @@ -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: , , , "); component_scopes = { getModuleScope(qualifiedModuleName, moduleScopes, pcfg) | qualifiedModuleName <- component }; @@ -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};