Skip to content
Draft
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
16 changes: 16 additions & 0 deletions src/org/rascalmpl/library/util/PathConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,9 @@ else if (projectName.equals("rascal-lsp")) {
buildRascalLSPConfig(manifestRoot, mode, mavenClasspath, srcsWriter, libsWriter, messages);
}
else {
if (mavenClasspath.stream().filter(PathConfig::isRascal).findFirst().isEmpty()) {
messages.append(Messages.error("Dependency on 'org.rascalmpl:rascal' is required", getPomXmlLocation(manifestRoot)));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a warning because for backward compatibility we support projects that do not have the dependency.

}
buildNormalProjectConfig(manifestRoot, mode, mavenClasspath, isRoot, srcsWriter, libsWriter, messages);
}
}
Expand Down Expand Up @@ -979,6 +982,19 @@ private static boolean messageStartsWith(IValue message, String prefix) {
return ((IString) msg).getValue().startsWith(prefix);
}

private static boolean isRascalMplGroup(ArtifactCoordinate coord) {
return "org.rascalmpl".equals(coord.getGroupId());
}

private static boolean isRascal(Artifact art) {
var coord = art.getCoordinate();
return isRascalMplGroup(coord) && isRascal(coord.getArtifactId());
}

private static boolean isRascal(String projectName) {
return "rascal".equalsIgnoreCase(projectName);
}

private static boolean isTypePalArtifact(ArtifactCoordinate artifact) {
return "org.rascalmpl".equals(artifact.getGroupId())
&& "typepal".equals(artifact.getArtifactId());
Expand Down
Loading