Skip to content

Commit

Permalink
Fixing issues regarding incrementality in the presence of libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Oct 30, 2024
1 parent fe61727 commit b7efd4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ ModuleStatus clearTModelCache(ModuleStatus ms){
}

ModuleStatus removeTModel(str candidate, ModuleStatus ms){
if(tpl_saved() notin ms.status[candidate]){
if(tpl_saved() notin ms.status[candidate] && rsc_not_found() notin ms.status[candidate]){
pcfg = ms.pathConfig;
if(ms.compilerConfig.verbose) println("Save <candidate> before removing from cache <ms.status[candidate]>");
tm = ms.tmodels[candidate];
Expand Down Expand Up @@ -291,11 +291,11 @@ tuple[bool, TModel, ModuleStatus] getTModelForModule(str qualifiedModuleName, Mo
if(tpl.rascalTplVersion? && isValidRascalTplVersion(tpl.rascalTplVersion)){
tpl.convertedToPhysical = false; // temporary
tpl = convertTModel2PhysicalLocs(tpl);
ms.tmodels[qualifiedModuleName] = tpl;
mloc = getModuleLocation(qualifiedModuleName, pcfg);
if(isModuleLocationInLibs(qualifiedModuleName, mloc, pcfg)){
ms.status[qualifiedModuleName] ? {} += rsc_not_found();
}
ms.tmodels[qualifiedModuleName] = tpl;
ms.status[qualifiedModuleName] ? {} += {tpl_uptodate(), tpl_saved()};
if(qualifiedModuleName notin hardwired){
ms.tmodelLIFO = [qualifiedModuleName, *ms.tmodelLIFO];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ ModuleStatus getImportAndExtendGraph(str qualifiedModuleName, ModuleStatus ms){
ms.status[qualifiedModuleName] += module_dependencies_extracted();

<found, tm, ms> = getTModelForModule(qualifiedModuleName, ms);
if(found && rsc_not_found() notin ms.status[qualifiedModuleName]){
if(found /*&& rsc_not_found() notin ms.status[qualifiedModuleName]*/){
allImportsAndExtendsValid = true;
rel[str, PathRole] localImportsAndExtends = {};

Expand Down Expand Up @@ -161,8 +161,8 @@ ModuleStatus getImportAndExtendGraph(str qualifiedModuleName, ModuleStatus ms){
}
}

else {
allImportsAndExtendsValid = false;
if(rsc_not_found() in ms.status[qualifiedModuleName]){
return ms;
}

<success, pt, ms> = getModuleParseTree(qualifiedModuleName, ms);
Expand Down Expand Up @@ -332,7 +332,7 @@ rel[str,datetime,PathRole] makeBom(str qualifiedModuleName, set[str] imports, se
+ { <qualifiedModuleName, getLastModified(qualifiedModuleName, moduleLastModified, pcfg), importPath() > };
}
void updateBOM(str qualifiedModuleName, set[str] imports, set[str] extends, ModuleStatus ms){
if(isModuleLocationInLibs(qualifiedModuleName, ms.moduleLocs[qualifiedModuleName], ms.pathConfig)){
if(rsc_not_found() in ms.status[qualifiedModuleName]){
return;
}
<found, tm, ms> = getTModelForModule(qualifiedModuleName, ms);
Expand Down

0 comments on commit b7efd4d

Please sign in to comment.