diff --git a/pom.xml b/pom.xml
index 8b7c7913d3f..1d000aa1593 100644
--- a/pom.xml
+++ b/pom.xml
@@ -456,7 +456,7 @@
org.rascalmpl
typepal
- 0.15.2-RC16
+ 0.15.2-RC19
compile
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/agrammar/definition/Characters.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/agrammar/definition/Characters.rsc
index 8e260a699cc..54698609b3d 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/agrammar/definition/Characters.rsc
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/agrammar/definition/Characters.rsc
@@ -38,7 +38,6 @@ extend lang::rascalcore::check::ATypeBase;
import String;
import List;
-//data AType;
data ACharRange = \empty-range();
ACharRange \new-range(int from, int to) = from <= to ? arange(from, to) : \empty-range();
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/BasicRascalConfig.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/BasicRascalConfig.rsc
index 420762d43a1..fbc76975909 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/check/BasicRascalConfig.rsc
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/BasicRascalConfig.rsc
@@ -148,9 +148,6 @@ data DefInfo(map[str,str] tags = ());
// Function modifiers
data DefInfo(list[str] modifiers = []);
-// Function md5Hash of source
-data DefInfo(str md5 = "");
-
// Common Keyword fields for ADTs
data DefInfo(list[KeywordFormal] commonKeywordFields = []);
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/Checker.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/Checker.rsc
index f4dc90debba..8b42be85c74 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/check/Checker.rsc
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/Checker.rsc
@@ -462,7 +462,7 @@ tuple[TModel, ModuleStatus] rascalTModelComponent(set[str] moduleNames, ModuleSt
start_check = cpuTime();
resetClosureCounter();
- c = newCollector(modelName, namedTrees, compilerConfig);
+ c = newCollector(modelName, namedTrees, compilerConfig, timestamp = getLastModified(modelName, ms.moduleLastModified, pcfg));
c.push(key_pathconfig, pcfg);
rascalPreCollectInitialization(namedTrees, c);
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/CheckerCommon.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/CheckerCommon.rsc
index 14dea332912..9dbcc6836b5 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/check/CheckerCommon.rsc
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/CheckerCommon.rsc
@@ -431,24 +431,26 @@ ModuleStatus updatePaths(loc oldModuleLoc, loc newModuleLoc, ModuleStatus ms){
}
ModuleStatus consolidatePaths(ModuleStatus ms){
- set[loc] locs = {lc| /loc lc := ms.paths};
- map[loc,loc] lprops = ();
- rel[loc,PathRole,loc] paths = ms.paths;
- for(loc l <- locs){
- if(l.top in lprops && loc r := lprops[l.top] && r != l){
- if(l.length? && !r.length?){
- paths = visit(paths) { case r: { insert l; }};
- } else if(!l.length? && r.length?){
- paths = visit(paths) { case l: { insert r; }};
- } else {
- mname = getRascalModuleName(l, ms.pathConfig);
- causes = [info("Module location for : ", x) | x <- [l, r]];
- ms.messages[mname] ? {} += { error("Conflicting module locations found for ", l, causes=causes) };
- }
- }
- lprops[l.top] = l;
- }
- ms.paths = paths;
+ // set[loc] locs = {lc| /loc lc := ms.paths};
+ // map[loc,loc] lprops = ();
+ // rel[loc,PathRole,loc] paths = ms.paths;
+ // for(loc l <- locs){
+ // if(l.top in lprops && loc r := lprops[l.top] && r != l){
+ // if(l.length? && !r.length?){
+ // paths = visit(paths) { case r: { insert l; }};
+ // } else if(!l.length? && r.length?){
+ // paths = visit(paths) { case l: { insert r; }};
+ // } else {
+ // paths = visit(paths) { case l: { insert l.top; }};
+ // // mname = getRascalModuleName(l, ms.pathConfig);
+ // // causes = [info("Module location for : ", x) | x <- [l, r]];
+ // // ms.messages[mname] ? {} += { error("Conflicting module locations found for ", l, causes=causes) };
+ // }
+ // }
+ // lprops[l.top] = l;
+ // }
+ // ms.paths = paths;
+ //ms.paths = visit(ms.paths) { case loc l => l.top };
// strPaths = getStrPaths(ms.paths, ms.pathConfig);
// if(strPaths != ms.strPaths){
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectDeclaration.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectDeclaration.rsc
index 10fb51abe9d..ea81a49777c 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectDeclaration.rsc
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectDeclaration.rsc
@@ -42,6 +42,7 @@ import lang::rascalcore::agrammar::definition::Attributes;
import lang::rascalcore::check::SyntaxGetters;
import lang::rascalcore::check::ATypeBase; // seemingly redundant
+extend lang::rascalcore::check::BasicRascalConfig;
import IO;
import List;
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectSyntaxDeclaration.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectSyntaxDeclaration.rsc
index 6a474472b4e..83b66455721 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectSyntaxDeclaration.rsc
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/CollectSyntaxDeclaration.rsc
@@ -40,6 +40,7 @@ import util::Maybe;
import lang::rascalcore::agrammar::definition::Symbols;
import lang::rascalcore::agrammar::definition::Attributes;
import lang::rascalcore::check::ATypeBase; // seemingly redundant
+extend lang::rascalcore::check::BasicRascalConfig;
// ---- syntax definition -----------------------------------------------------
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/RascalConfig.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/RascalConfig.rsc
index 8031643e163..2a6148ff925 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/check/RascalConfig.rsc
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/RascalConfig.rsc
@@ -31,8 +31,6 @@ module lang::rascalcore::check::RascalConfig
High level configuration of the Rascal checker.
*/
-//import lang::rascalcore::check::CheckerCommon;
-
import lang::rascalcore::check::ADTandGrammar;
import lang::rascalcore::compile::muRascal::AST;
@@ -529,19 +527,19 @@ void rascalPostSolver(map[str,Tree] namedTrees, Solver s){
// bool isLogicalLoc(loc l)
// = startsWith(l.scheme, "rascal+");
-loc rascalCreateLogicalLoc(Define def, str _modelName, PathConfig pcfg){
+tuple[bool, loc] rascalCreateLogicalLoc(Define def, str _modelName, PathConfig pcfg){
if(def.idRole in keepInTModelRoles){
if(isLogicalLoc(def.defined)) return def.defined;
moduleName = getRascalModuleName(def.defined, pcfg);
moduleNameSlashed = replaceAll(moduleName, "::", "/");
suffix = def.defInfo.md5? ? "$" : "";
if(def.idRole == moduleId()){
- return |<"rascal+">:///|;
+ return ">:///|>;
} else {
- return |<"rascal+">:////|;
+ return ">:////|>;
}
}
- return def.defined;
+ return ;
}
@memo{expireAfter(minutes=5),maximumSize(1000)}
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/TestConfigs.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/TestConfigs.rsc
index 90508259e10..f1c268f9e19 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/check/TestConfigs.rsc
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/TestConfigs.rsc
@@ -50,6 +50,7 @@ public loc RASCAL = |mvn://org.rascalmpl--rascal--0.41.0-RC15/|;
public loc TYPEPAL = |mvn://org.rascalmpl--typepal--0.14.8/|;
public loc OUTDATED_TYPEPAL
= |mvn://org.rascalmpl--typepal--0.14.1/|;
+public loc RASCAL_RC67 = |mvn://org.rascalmpl--rascal--0.41.0-RC67/|;
public loc DRAMBIGUITY = |mvn://org.rascalmpl--drambiguity--0.1.2/|;
public loc FLYBYTES = |mvn://org.rascalmpl--flybytes--0.1.5/|;
@@ -57,6 +58,7 @@ public loc SALIX_CORE = |mvn://org.rascalmpl--salix-core--0.2.7/|;
public loc SALIX_CONTRIB = |mvn://org.rascalmpl--salix-contrib--0.2.7/|;
public loc RASCAL_LSP = |mvn://org.rascalmpl--rascal-lsp--2.21.2/|;
public loc PHP_ANALYSIS = |mvn://org.rascalmpl--php-analysis--0.2.5-SNAPSHOT/|;
+public loc JAVA_AIR = |mvn://org.rascalmpl--java-air--1.0.0-RC2/|;
public loc REPO = |file:///Users/paulklint/git/|;
public loc COMPILED_RASCAL
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/BinaryDependencyTests.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/BinaryDependencyTests.rsc
index 31511550942..dc3126f40a4 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/BinaryDependencyTests.rsc
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/BinaryDependencyTests.rsc
@@ -403,6 +403,27 @@ test bool incompatibleVersionsOfBinaryLibrary(){
// Recompile Check and discover the error
return checkExpectErrors("Check", ["Review of dependencies, reconfiguration or recompilation needed: binary module `TP` depends (indirectly) on incompatible module(s)"], core.pcfg, remove = [rascal, typepal, core]);
}
+@ignore{Unclear whether it should fail or succeed}
+test bool mixedRascalVersions() {
+ // This test project has a dependency on:
+ // * Rascal 0.41.0-RC67
+ // * java-air 1.0.0-RC2, which was built using Rascal 0.41.0-RC35
+ // The test module imports:
+ // * a standard library module from 0.41.0-RC67
+ // * a library module of which the packaged tpl was built using 0.41.0-RC35
+ clearMemory();
+ project_name = "test-project";
+ test_project =
+ createProject(
+ project_name,
+ ("Test": "import IO;
+ 'import lang::java::m3::Core;"),
+ createPathConfig(project_name)
+ [libs=[RASCAL_RC67, JAVA_AIR]]
+ [srcs=[src(project_name)]]
+ );
+ return checkExpectNoErrors("Test", test_project.pcfg, remove = [test_project]);
+}
// ---- Binary compatibility of two TModels -----------------------------------
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/StaticTestingUtils.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/StaticTestingUtils.rsc
index 5f4c03fdb88..6dc2017f1c4 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/StaticTestingUtils.rsc
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/StaticTestingUtils.rsc
@@ -193,17 +193,17 @@ bool validateUseDefs(str moduleName, map[str, tuple[int, set[int]]] usedefs, Mod
println("names:"); iprintln(names);
= getTModelForModule(moduleName, ms);
foundUseDefs = tm.useDef;
- println("foundUseDefs:");
- for( <- foundUseDefs){
- println(": ==\> ");
- }
+ // println("foundUseDefs:");
+ // for( <- foundUseDefs){
+ // println(": ==\> ");
+ // }
for(str v <- usedefs){
= usedefs[v];
list[loc] occ = [];
if(names[v]?) occ = names[v]; else throw " not found in tree";
if(!occ[def]?) throw "Missing define for ";
for(int u <- uses){
- println("u = ");
+ //println("u = ");
if(!occ[u]?){
throw "Missing use for ";
}
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/download-test-jars.sh b/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/download-test-jars.sh
index 5627b4b0c26..2e11565378e 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/download-test-jars.sh
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/download-test-jars.sh
@@ -8,10 +8,12 @@ function download() {
# these should be synced with `TestConfigs.rsc`
download "org.rascalmpl" "rascal" "0.41.0-RC15"
+download "org.rascalmpl" "rascal" "0.41.0-RC67"
download "org.rascalmpl" "typepal" "0.14.8"
download "org.rascalmpl" "typepal" "0.14.1"
download "org.rascalmpl" "drambiguity" "0.1.2"
download "org.rascalmpl" "flybytes" "0.1.5"
download "org.rascalmpl" "salix-core" "0.2.7"
download "org.rascalmpl" "salix-contrib" "0.2.7"
-download "org.rascalmpl" "rascal-lsp" "2.21.2"
\ No newline at end of file
+download "org.rascalmpl" "rascal-lsp" "2.21.2"
+download "org.rascalmpl" "java-air" "1.0.0-RC2"
\ No newline at end of file
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/JGenie.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/JGenie.rsc
index 84c3c961ae9..76c6339c543 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/JGenie.rsc
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/JGenie.rsc
@@ -91,6 +91,7 @@ JGenie makeJGenie(MuModule m,
map[str,loc] allModuleLocs = moduleLocs;
map[loc,str] allLocs2Module = invertUnique(moduleLocs);
+ allLocs2Module += (l.top : allLocs2Module[l] | l <- domain(allLocs2Module) );
MuModule currentModule = m;
str moduleName = m.name;
map[AType, map[str,AType]] commonKeywordFieldsNameAndType = m.commonKeywordFields;
diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/Resolvers.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/Resolvers.rsc
index 9cfda02bd34..719f692ffb0 100644
--- a/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/Resolvers.rsc
+++ b/src/org/rascalmpl/compiler/lang/rascalcore/compile/muRascal2Java/Resolvers.rsc
@@ -151,8 +151,8 @@ public set[set[Define]] mygroup(set[Define] input, bool (Define a, Define b) sim
str generateResolvers(str moduleName, map[loc, MuFunction] loc2muFunction, set[str] imports, set[str] extends, map[str,TModel] tmodels, map[str,loc] module2loc, PathConfig pcfg, JGenie jg){
module_scope = module2loc[moduleName];
- loc2module = invertUnique(module2loc);
- module_scopes = domain(loc2module);
+ map[loc,str] loc2module = invertUnique(module2loc);
+ set[loc] module_scopes = domain(loc2module);
extend_scopes = { module2loc[ext] | ext <- extends, ext in module2loc};
import_scopes = { module2loc[imp] | imp <- imports, imp in module2loc };
@@ -376,7 +376,7 @@ str generateResolver(str moduleName, str functionName, set[Define] fun_defs, map
map[int, lrel[str,str]] overload_table = ();
lrel[str,str] defaults_and_constructors = [];
- physical2logical = invertUnique(tm.logical2physical);
+ map[loc,loc] physical2logical = invertUnique(tm.logical2physical);
// Handle a function or constructor defintion