Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Jul 10, 2024
1 parent a0fe1d0 commit 5385c21
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/org/rascalmpl/core/library/lang/rascalcore/check/Import.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ ModuleStatus getImportAndExtendGraph(str qualifiedModuleName, ModuleStatus ms){
} catch value _:{
allImportsAndExtendsValid = true;
println("--- reusing tmodel of <qualifiedModuleName> (source not accessible)");
isCompatible(tm, domain(localImportsAndExtends), ms);
//throw rascalSourceMissing("Source of <qualifiedModuleName> is not accessible");
//isCompatible(tm, domain(localImportsAndExtends), ms);
throw rascalSourceMissing("Source of <qualifiedModuleName> is not accessible");
}
}
if(allImportsAndExtendsValid){
Expand Down Expand Up @@ -191,23 +191,23 @@ str getModuleFromLogical(loc l){
return i >= 0 ? l.path[1..i+1] : l.path[1..];
}

bool isCompatible(TModel lib, set[str] otherImportsAndExtends, ModuleStatus ms){
provides = {<m , l> | l <- domain(lib.logical2physical), m := getModuleFromLogical(l) };
println("<lib.modelName> provides:"); iprintln(provides);
requires = {};
for(m <- otherImportsAndExtends){
<found, tm, ms> = getTModelForModule(m, ms);
if(found){
println("<m>:"); iprintln(domain(tm.logical2physical));
requires += {<m , l> | l <- domain(tm.logical2physical), m := getModuleFromLogical(l) };
}
}
println("requires:"); iprintln(requires);

println("unstatisfied: <requires - provides>");

return true;
}
//bool isCompatible(TModel lib, set[str] otherImportsAndExtends, ModuleStatus ms){
// provides = {<m , l> | l <- domain(lib.logical2physical), m := getModuleFromLogical(l) };
// println("<lib.modelName> provides:"); iprintln(provides);
// requires = {};
// for(m <- otherImportsAndExtends){
// <found, tm, ms> = getTModelForModule(m, ms);
// if(found){
// println("<m>:"); iprintln(domain(tm.logical2physical));
// requires += {<m , l> | l <- domain(tm.logical2physical), m := getModuleFromLogical(l) };
// }
// }
// println("requires:"); iprintln(requires);
//
// println("unstatisfied: <requires - provides>");
//
// return true;
//}

rel[str, PathRole, str] getModulePathsAsStr(Module m){
moduleName = unescape("<m.header.name>");
Expand Down

0 comments on commit 5385c21

Please sign in to comment.