Skip to content

Commit

Permalink
Warn if vendordep with duplicate uuid is found (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
sciencewhiz authored Feb 10, 2025
1 parent dd5e4ca commit 81bc2e8
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,20 @@ private JsonDependency parse(File f) {
private void load(JsonDependency dep) throws VendorParsingException {
// Don"t double-add a dependency!
if (dependencySet.findByName(dep.uuid) != null) {
String requiredFrcYear = frcYear.getOrNull();
if (requiredFrcYear != null) {
if (!requiredFrcYear.equals(dep.frcYear)) {
log.logError("Warning! Ignoring duplicate vendordep: " + dep.fileName
+ " because it has the wrong year.");
return;
}
}
NamedJsonDependency duplicateDep = dependencySet.findByName(dep.uuid);
log.logErrorHead(
"Warning! Duplicate Vendordeps detected. " + dep.fileName + " and "
+ duplicateDep.getDependency().fileName);
log.logError("have the same UUID: " + dep.uuid);
log.logError("Remove one of these vendordeps to avoid conflicts.");
return;
}

Expand Down

0 comments on commit 81bc2e8

Please sign in to comment.