Skip to content

Commit c4d2d41

Browse files
authored
Merge branch 'main' into fix/issues-2880-2881-newrascalpom
2 parents 1960874 + bdc1acc commit c4d2d41

65 files changed

Lines changed: 535 additions & 431 deletions

File tree

Some content is hidden

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

‎.github/workflows/build.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
pull_request:
99
branches:
1010
- main
11-
- 'feat/*'
11+
- 'feat/**'
12+
- 'feature/**'
1213
env:
1314
MAVEN_OPTS: "-Xmx4G -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
1415
IS_OWN_PR: "${{ secrets.MAVEN_MIRROR_URL }}"

‎pom.xml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
<groupId>org.rascalmpl</groupId>
55
<artifactId>rascal</artifactId>
6-
<version>0.43.0-RC13</version>
6+
<version>0.43.0-RC15-SNAPSHOT</version>
77
<packaging>jar</packaging>
88

99
<scm>
1010
<developerConnection>scm:git:ssh://git@github.com/usethesource/rascal.git</developerConnection>
11-
<tag>v0.43.0-RC14-PREVIEW-REGULAR-PARSERS</tag>
11+
<tag>v0.43.0-RC13</tag>
1212
</scm>
1313

1414
<!-- dependency resolution configuration (usethesource) -->
@@ -157,7 +157,7 @@
157157
<ignore>${project.basedir}/src/org/rascalmpl/library/experiments</ignore>
158158
<ignore>${project.basedir}/src/org/rascalmpl/library/resource</ignore>
159159
<ignore>${project.basedir}/src/org/rascalmpl/library/lang/rascal/tests</ignore>
160-
<ignore>${project.basedir}/src/org/rascalmpl/library/lang/rascal/grammar/tests</ignore>
160+
<ignore>${project.basedir}/src/org/rascalmpl/library/lang/rascal/grammar/tests</ignore>
161161
<ignore>${project.basedir}/src/org/rascalmpl/library/lang/rascal/syntax/tests</ignore>
162162
</ignores>
163163
</configuration>
@@ -201,7 +201,6 @@
201201
<srcs>
202202
<src>${project.basedir}/src/org/rascalmpl/library</src>
203203
</srcs>
204-
<sourceLookup>|std:///|</sourceLookup>
205204
</configuration>
206205
</execution>
207206
</executions>

‎src/org/rascalmpl/compiler/CheckTestSources.rsc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void checkTestSources(list[str] cmdLineArgs) {
6666
if("all" in cmdLineArgs){
6767
modulesToCheck = getRascalModules(REPO + "rascal/src/org/rascalmpl/library", pcfg);
6868
} else {
69-
testFolders = [ //|std:///lang/rascal/tests|,
69+
testFolders = [ //|project://rascal/src/org/rascalmpl/library/lang/rascal/tests|,
7070
//REPO + "/rascal-core/lang/rascalcore/check::tests",
7171
REPO + "/typepal/src/"
7272
];

‎src/org/rascalmpl/compiler/CompileTestSources.rsc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void compileTestSources(PathConfig pcfg) {
145145
// total += d;
146146
//}
147147

148-
testFolder = |std:///lang/rascal/|;
148+
testFolder = |project://rascal/src/org/rascalmpl/library/lang/rascal/|;
149149

150150
testModules = [ replaceAll(file[extension=""].path[1..], "/", "::")
151151
| loc file <- find(testFolder, "rsc") // all Rascal source files

‎src/org/rascalmpl/compiler/lang/rascalcore/check/TestConfigs.rsc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ public loc testModulesRoot = testRoot + "src";
7575
private int npc = 0;
7676
@synopsis{PathConfig for testing generated modules in |memory://test-modules/| in memory file system, not depending on any outside libraries.}
7777
@description{
78-
* gets source files exclusively from |memory://test-modules/| and |std:///| (for library code)
78+
* gets source files exclusively from |memory://test-modules/| and |project://rascal/src/org/rascalmpl/library/| (for library code)
7979
* generates bin files in the in-memory file system
8080
}
8181
public PathConfig getDefaultTestingPathConfig() {
8282
npc += 1;
8383
snpc = "<npc>";
8484
return pathConfig(
85-
srcs = [ testModulesRoot, |std:///| ],
85+
srcs = [ testModulesRoot, |project://rascal/src/org/rascalmpl/library/| ],
8686
bin = testRoot + "rascal-tests-bin-<snpc>",
8787
generatedSources = testRoot + "generated-test-sources-<snpc>",
8888
generatedResources = testRoot + "generated-test-resources-<snpc>",

‎src/org/rascalmpl/compiler/lang/rascalcore/compile/AREADME.txt‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ config void config( // Inspect type checker configuration file
7171
Query select = none()) // Query to define what to show
7272
Examples:
7373

74-
compile(|std:///experiments/Compiler/Examples/Fac.rsc|);
74+
compile(|project://rascal/src/org/rascalmpl/library/experiments/Compiler/Examples/Fac.rsc|);
7575

76-
execute(|std:///experiments/Compiler/Examples/Fac.rsc|, []);
77-
execute(|std:///experiments/Compiler/Examples/Fac.rsc|, [], recompile=true);
78-
execute(|std:///experiments/Compiler/Examples/Fac.rsc|, [], profile=true);
76+
execute(|project://rascal/src/org/rascalmpl/library/experiments/Compiler/Examples/Fac.rsc|, []);
77+
execute(|project://rascal/src/org/rascalmpl/library/experiments/Compiler/Examples/Fac.rsc|, [], recompile=true);
78+
execute(|project://rascal/src/org/rascalmpl/library/experiments/Compiler/Examples/Fac.rsc|, [], profile=true);
7979

80-
inspect(|std:///experiments/Compiler/Examples/Fac.rsc|)
80+
inspect(|project://rascal/src/org/rascalmpl/library/experiments/Compiler/Examples/Fac.rsc|)
8181

8282

8383
Directory structure:

‎src/org/rascalmpl/compiler/lang/rascalcore/compile/Examples/RascalExtraction.rsc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import util::Reflective;
3737
value main() = compareAll();
3838

3939
value compareAll() {
40-
moduleLoc = |std:///experiments/Compiler/Rascal2muRascal/RascalExpression.rsc|;
40+
moduleLoc = |project://rascal/src/org/rascalmpl/library/experiments/Compiler/Rascal2muRascal/RascalExpression.rsc|;
4141
//moduleLoc = |project://rascal/src/org/rascalmpl/library/experiments/Compiler/Examples/Tst3.rsc|;
4242
m = parse(#start[Module], moduleLoc).top;
4343
t = cpuTime();

‎src/org/rascalmpl/compiler/lang/rascalcore/compile/Examples/RascalMetrics.rsc‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ value main()
4545

4646
value measure(){
4747

48-
//moduleLoc = |std:///lang/rascal/syntax/Rascal.rsc|;
49-
moduleLoc = |std:///experiments/Compiler/RVM/AST.rsc|;
50-
//moduleLoc = |std:///experiments/Compiler/RVM/Syntax.rsc|;
51-
//moduleLoc = |std:///experiments/Compiler/muRascal/Syntax.rsc|;
52-
//moduleLoc = |std:///experiments/Compiler/muRascal/AST.rsc|;
53-
//moduleLoc = |std:///demo/lang/Pico/Syntax.rsc|;
54-
//moduleLoc = |std:///demo/lang/Exp/Concrete/NoLayout/Syntax.rsc|;
48+
//moduleLoc = |project://rascal/src/org/rascalmpl/library/lang/rascal/syntax/Rascal.rsc|;
49+
moduleLoc = |project://rascal/src/org/rascalmpl/library/experiments/Compiler/RVM/AST.rsc|;
50+
//moduleLoc = |project://rascal/src/org/rascalmpl/library/experiments/Compiler/RVM/Syntax.rsc|;
51+
//moduleLoc = |project://rascal/src/org/rascalmpl/library/experiments/Compiler/muRascal/Syntax.rsc|;
52+
//moduleLoc = |project://rascal/src/org/rascalmpl/library/experiments/Compiler/muRascal/AST.rsc|;
53+
//moduleLoc = |project://rascal/src/org/rascalmpl/library/demo/lang/Pico/Syntax.rsc|;
54+
//moduleLoc = |project://rascal/src/org/rascalmpl/library/demo/lang/Exp/Concrete/NoLayout/Syntax.rsc|;
5555
m = parse(#start[Module], moduleLoc).top;
5656
stats = ();
5757
nonterm = {};

‎src/org/rascalmpl/interpreter/load/IRascalSearchPathContributor.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
*******************************************************************************/
1212
package org.rascalmpl.interpreter.load;
1313

14-
import java.util.List;
14+
import java.util.Collection;
1515

1616
import io.usethesource.vallang.ISourceLocation;
1717

1818
public interface IRascalSearchPathContributor {
19-
void contributePaths(List<ISourceLocation> path);
19+
Collection<ISourceLocation> contributePaths();
2020
String getName();
2121
}

‎src/org/rascalmpl/interpreter/load/RascalSearchPath.java‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717
import java.io.IOException;
1818
import java.net.URISyntaxException;
1919
import java.util.ArrayList;
20+
import java.util.Collection;
2021
import java.util.Collections;
2122
import java.util.LinkedList;
2223
import java.util.List;
2324

2425
import org.rascalmpl.interpreter.Configuration;
2526
import org.rascalmpl.uri.URIResolverRegistry;
2627
import org.rascalmpl.uri.URIUtil;
28+
2729
import io.usethesource.vallang.ISourceLocation;
2830

2931
/**
@@ -41,7 +43,8 @@ public RascalSearchPath() {
4143
}
4244

4345
public void addPathContributor(IRascalSearchPathContributor contrib) {
44-
if(!contributors.contains(contrib)){
46+
if (!contributors.contains(contrib)) {
47+
// Later contributors take precedence over earlier ones. Insert at the front.
4548
contributors.add(0, contrib);
4649
}
4750
}
@@ -103,12 +106,12 @@ public ISourceLocation getRootForModule(String module) {
103106
}
104107
}
105108

106-
public List<ISourceLocation> collect() {
107-
List<ISourceLocation> paths = new LinkedList<ISourceLocation>();
109+
public Collection<ISourceLocation> collect() {
110+
var paths = new LinkedList<ISourceLocation>();
108111
for (IRascalSearchPathContributor c : contributors) {
109-
c.contributePaths(paths);
112+
paths.addAll(c.contributePaths());
110113
}
111-
114+
112115
return paths;
113116
}
114117

0 commit comments

Comments
 (0)