Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 445a03b

Browse files
committed
Merge branch 'master' into renamings-for-move-to-rascal
2 parents 42788e7 + eb25cc4 commit 445a03b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+655
-1271
lines changed

.classpath

Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
3+
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
4+
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="rascal_eclipse.rascal_builder"/>
5+
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
6+
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
7+
</launchConfiguration>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
3+
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
4+
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="rascal_eclipse.term_builder"/>
5+
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
6+
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
7+
</launchConfiguration>

.github/workflows/build.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ jobs:
3636
distribution: 'temurin'
3737
cache: 'maven'
3838

39+
- name: Disable some local only tests
40+
run: |
41+
echo "These test require local repo setup, for now we delete them before running the test"
42+
rm src/org/rascalmpl/core/library/lang/rascalcore/check/tests/BinaryDependencyTests.rsc
43+
rm src/org/rascalmpl/core/library/lang/rascalcore/check/tests/ChangeScenarioTests.rsc
44+
3945
- name: Compile, Generate and Test (never fails)
4046
run: mvn -B -Dmaven.test.failure.ignore -Drascal.test.memory=4 test
4147

.project

Lines changed: 0 additions & 57 deletions
This file was deleted.

META-INF/MANIFEST.MF

Lines changed: 0 additions & 10 deletions
This file was deleted.

pom.xml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>org.rascalmpl</groupId>
55
<artifactId>rascal-core</artifactId>
6-
<version>0.12.13-SNAPSHOT</version>
6+
<version>0.12.17-SNAPSHOT</version>
77

88
<packaging>jar</packaging>
99

@@ -66,6 +66,9 @@
6666
<includes>
6767
<include>**/*.constants</include>
6868
</includes>
69+
<excludes>
70+
<exclude>test-annotations/**/*</exclude>
71+
</excludes>
6972
</testResource>
7073
</testResources>
7174
<plugins>
@@ -228,22 +231,17 @@
228231
<dependency>
229232
<groupId>org.rascalmpl</groupId>
230233
<artifactId>typepal</artifactId>
231-
<version>0.15.0-RC1</version>
232-
</dependency>
233-
<dependency>
234-
<groupId>io.usethesource</groupId>
235-
<artifactId>vallang</artifactId>
236-
<version>0.15.1</version>
234+
<version>0.15.0</version>
237235
</dependency>
238-
<dependency>
236+
<!-- <dependency>
239237
<groupId>org.junit.jupiter</groupId>
240238
<artifactId>junit-jupiter-api</artifactId>
241239
<version>5.8.2</version>
242-
</dependency>
240+
</dependency> -->
243241
<dependency>
244242
<groupId>org.rascalmpl</groupId>
245243
<artifactId>rascal</artifactId>
246-
<version>0.40.18-SNAPSHOT</version>
244+
<version>0.40.17</version>
247245
</dependency>
248246
</dependencies>
249247
</project>

src/org/rascalmpl/core/library/CheckTestSources.rsc

Lines changed: 24 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import lang::rascalcore::check::Checker;
99
import util::FileSystem;
1010
import util::Benchmark;
1111
import lang::rascalcore::compile::util::Names;
12+
import lang::rascalcore::check::RascalConfig;
1213

1314

1415
void main() = checkTestSources([]);
@@ -17,95 +18,46 @@ void main() = checkTestSources([]);
1718
// otherwise only standard library and test files (~200 files)
1819
void main(list[str] cmdLineArgs) = checkTestSources(cmdLineArgs);
1920

21+
loc REPO = |file:///Users/paulklint/git/|;
22+
23+
list[str] getRascalModules(loc rootFolder, PathConfig pcfg)
24+
= [ getModuleName(file, pcfg)
25+
| loc file <- find(rootFolder, "rsc")
26+
];
27+
2028
void checkTestSources(list[str] cmdLineArgs) {
2129
testConfig = getRascalPathConfig();
2230
2331
println("PathConfig for type checking test sources:\n");
2432
iprintln(testConfig);
2533
26-
testCompilerConfig = rascalCompilerConfig(testConfig)[logPathConfig=false];
34+
genCompilerConfig = getAllSrcCompilerConfig()[logPathConfig=false];
2735
total = 0;
28-
29-
println(readFile(|lib://rascal/META-INF/MANIFEST.MF|));
3036
31-
testModules = [];
37+
list[str] modulesToCheck = [];
3238
3339
if("all" in cmdLineArgs){
34-
rootFolder = |std:///|;
35-
36-
testModules = [ replaceAll(file[extension=""].path[1..], "/", "::")
37-
| loc file <- find(rootFolder, "rsc")
38-
];
40+
modulesToCheck = getRascalModules(|std:///|, genCompilerConfig.typepalPathConfig);
3941
} else {
40-
41-
libraryModules = ["Boolean",
42-
"DateTime",
43-
"Exception",
44-
"Grammar",
45-
"IO",
46-
"List",
47-
"ListRelation",
48-
"Location",
49-
"Map",
50-
"Message",
51-
"Node",
52-
"ParseTree",
53-
"Prelude",
54-
"Relation",
55-
"Set", "String",
56-
/*"Traversal",*/
57-
"Type",
58-
"ValueIO",
59-
"analysis::graphs::Graph",
60-
"analysis::statistics::Correlation",
61-
"analysis::statistics::Descriptive",
62-
"analysis::statistics::Frequency",
63-
"analysis::statistics::Inference",
64-
"analysis::statistics::SimpleRegression",
65-
"lang::csv::IO",
66-
"lang::json::IO",
67-
"lang::manifest::IO",
68-
"lang::rascal::syntax::Rascal",
69-
"lang::xml::DOM",
70-
"lang::xml::IO",
71-
"util::FileSystem",
72-
"util::Math",
73-
"util::Maybe",
74-
"util::Memo",
75-
"util::PriorityQueue",
76-
"util::Reflective",
77-
"util::SemVer",
78-
"util::UUID",
79-
80-
"analysis::m3::AST",
81-
"analysis::m3::Core",
82-
"analysis::m3::FlowGraph",
83-
"analysis::m3::Registry",
84-
"analysis::m3::TypeSymbol"];
85-
86-
for (m <- libraryModules) {
87-
<e,d> = safeCheck(m, testCompilerConfig);
88-
total += d;
89-
}
90-
91-
testFolder = |std:///|;
92-
//testFolder = |std:///lang/rascal/tests|;
93-
94-
testModules = [ replaceAll(file[extension=""].path[1..], "/", "::")
95-
| loc file <- find(testFolder, "rsc") // all Rascal source files
96-
];
97-
}
42+
testFolders = [ //|std:///lang/rascal/tests|,
43+
//REPO + "/rascal-core/lang/rascalcore/check::tests",
44+
REPO + "/typepal/src/"
45+
];
46+
modulesToCheck = [ *getRascalModules(testFolder, genCompilerConfig.typepalPathConfig)
47+
| testFolder <- testFolders
48+
];
49+
}
9850
9951
ignored = ["lang::rascal::tests::concrete::Patterns3" // takes too long
10052
];
101-
testModules -= ignored;
53+
modulesToCheck -= ignored;
10254
10355
list[str] exceptions = [];
104-
int n = size(testModules);
105-
for (i <- index(testModules)) {
106-
m = testModules[i];
56+
int n = size(modulesToCheck);
57+
for (i <- index(modulesToCheck)) {
58+
m = modulesToCheck[i];
10759
println("Checking test module <m> [<i>/<n>]");
108-
<e, d> = safeCheck(m, testCompilerConfig);
60+
<e, d> = safeCheck(m, genCompilerConfig);
10961
total += d;
11062
if(!isEmpty(e)){
11163
exceptions += e;

src/org/rascalmpl/core/library/CompileTestSources.rsc

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,16 @@ import util::FileSystem;
1515
import util::Benchmark;
1616
import lang::rascalcore::compile::util::Names;
1717

18-
PathConfig manualTestConfig= pathConfig(bin=|project://rascal-core/target/test-classes|,
19-
generatedSources = |project://rascal-core/target/generated-test-sources|,
20-
resources = |project://rascal-core/target/test-classes| //|project://rascal-core/target/generated-test-resources|
21-
);
18+
loc REPO = |file:///Users/paulklint/git/|;
2219

20+
PathConfig manualTestConfig= pathConfig(bin= REPO + "generated-sources/target/classes",
21+
generatedSources = REPO + "generated-sources/target/generated-sources",
22+
resources = REPO + "generated-sources/target/classes" //|project://rascal-core/target/generated-test-resources|
23+
);
2324
void main() = compileTestSources(manualTestConfig);
2425

2526
void compileTestSources(PathConfig pcfg) {
26-
testConfig = pathConfig(
27-
bin=pcfg.bin,
28-
generatedSources=|project://rascal-core/target/generated-test-sources|,
29-
resources = pcfg.bin, //|project://rascal-core/target/generated-test-resources2|,
30-
srcs=[ |project://rascal/src/org/rascalmpl/library|, |std:///|, |project://rascal-core/src/org/rascalmpl/core/library|],
31-
libs = [ ]
32-
);
33-
34-
println("PathConfig for compiling test sources:\n");
35-
iprintln(testConfig);
36-
37-
testCompilerConfig = getRascalCoreCompilerConfig(testConfig)[logPathConfig=false];
27+
testCompilerConfig = getAllSrcCompilerConfig()[logPathConfig=false];
3828
total = 0;
3929

4030
println(readFile(|lib://rascal/META-INF/MANIFEST.MF|));
@@ -118,25 +108,27 @@ void compileTestSources(PathConfig pcfg) {
118108
// ];
119109

120110

121-
for (m <- libraryModules) {
122-
<e, d> = safeCompile(m, testCompilerConfig);
123-
total += d;
124-
}
111+
// for (m <- libraryModules) {
112+
// <e, d> = safeCompile(m, testCompilerConfig);
113+
// total += d;
114+
// }
125115

126116
//for (m <- checkerTestModules) {
127117
// <e, d> = safeCompile(m, testConfig, testCompilerConfig);
128118
// total += d;
129119
//}
130120

131-
testFolder = |std:///lang/rascal/tests|;
121+
testFolder = |std:///lang/rascal/|;
132122

133123
testModules = [ replaceAll(file[extension=""].path[1..], "/", "::")
134124
| loc file <- find(testFolder, "rsc") // all Rascal source files
135125
];
136126
137127
ignored = ["lang::rascal::tests::concrete::Patterns3" // takes too long
138128
];
139-
testModules -= ignored;
129+
testModules -= ignored;
130+
println("Compiling test modules:");
131+
println(testModules);
140132
141133
list[str] exceptions = [];
142134
int n = size(testModules);

0 commit comments

Comments
 (0)