Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/org/rascalmpl/library/util/PathConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ private static void translateSources(ISourceLocation manifestRoot, IListWriter s
}
}

private static void buildNormalProjectConfig(ISourceLocation manifestRoot, RascalConfigMode mode, List<Artifact> mavenClasspath, boolean isRoot, IListWriter srcs, IListWriter libs, IListWriter messages) throws IOException, URISyntaxException {
private static void buildNormalProjectConfig(ISourceLocation manifestRoot, RascalConfigMode mode, List<Artifact> mavenClasspath, boolean isRoot, IListWriter srcs, IListWriter libs, IListWriter messages, IListWriter resources) throws IOException, URISyntaxException {
if (isRoot) {
if (mode == RascalConfigMode.INTERPRETER) {
srcs.append(URIUtil.rootLocation("std")); // you'll always get rascal from standard in case of interpreter mode
Expand All @@ -557,10 +557,11 @@ private static void buildNormalProjectConfig(ISourceLocation manifestRoot, Rasca
assert mode == RascalConfigMode.COMPILER: "should be compiler";
// untill we go pom.xml first, you'll always get the rascal jar from our runtime
// not the one you requested in the pom.xml
libs.append(JarURIResolver.jarify(resolveCurrentRascalRuntimeJar()));
libs.append(JarURIResolver.jarify(resolveCurrentRascalRuntimeJar()));
}
}

resources.append(URIUtil.getChildLocation(manifestRoot, "src/main/resources"));

// This processes Rascal libraries we can find in maven dependencies,
// and we add them to the srcs unless a project is open with the same name, then we defer to its srcs
Expand Down Expand Up @@ -664,7 +665,8 @@ private static void addProjectAndItsDependencies(RascalConfigMode mode, IListWri
IListWriter messages, ISourceLocation projectLoc) throws IOException, URISyntaxException {
projectLoc = safeResolve(projectLoc); // for now, remove the project loc, later we can undo this and keep the project loc around
var childMavenClasspath = getPomXmlCompilerClasspath(projectLoc, messages);
buildNormalProjectConfig(projectLoc, mode, childMavenClasspath, false, srcs, libs, messages);
IListWriter resourcesWriter = (IListWriter) vf.listWriter().unique();
buildNormalProjectConfig(projectLoc, mode, childMavenClasspath, false, srcs, libs, messages, resourcesWriter);
}

private static void checkLSPVersionsMatch(ISourceLocation manifestRoot, IListWriter messages, ISourceLocation jarLocation, Artifact artifact) throws IOException {
Expand Down Expand Up @@ -760,7 +762,7 @@ else if (projectName.equals("rascal-lsp")) {
buildRascalLSPConfig(manifestRoot, mode, mavenClasspath, srcsWriter, libsWriter, messages);
}
else {
buildNormalProjectConfig(manifestRoot, mode, mavenClasspath, isRoot, srcsWriter, libsWriter, messages);
buildNormalProjectConfig(manifestRoot, mode, mavenClasspath, isRoot, srcsWriter, libsWriter, messages, resourcesWriter);
}
}
catch (IOException | URISyntaxException e) {
Expand Down