Skip to content

Commit

Permalink
fixes / adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
mmews committed Aug 14, 2024
1 parent fdeb72f commit ffa244f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,14 @@ public BuildOrderIterator visit(Collection<? extends ProjectConfigSnapshot> proj
for (ProjectConfigSnapshot pc : projectConfigs) {
String projectID = pc.getName();

if (!visitedAlready.contains(pc)
&& boi.sortedProjects.indexOf(pc) < boi.sortedProjects.indexOf(lastVisited)) {
String currentProjectID = current().getName();
throw new IllegalStateException("Dependency-inverse visit order not supported: from "
+ currentProjectID + " to " + projectID);
}
if (boi.sortedProjects.indexOf(pc) < boi.sortedProjects.indexOf(lastVisited)) {
// Dependency-inverse visit order not supported. Happens in dependency cycles
} else {

visitProjectIDs.add(projectID);
iteratorIndex = boi.sortedProjects.indexOf(lastVisited);
moveNext();
visitProjectIDs.add(projectID);
iteratorIndex = boi.sortedProjects.indexOf(lastVisited);
moveNext();
}
}
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,17 @@ public IEObjectDescription getSingleElement(QualifiedName name) {
// main case
IEObjectDescription objDescr = result.get(0);

// references within a dependency cycle not suppored
// references within a dependency cycle not supported
if (workspaceConfigSnapshot.isInDependencyCycle(contextProject.getName())) {
URI uri = objDescr.getEObjectURI();
N4JSProjectConfigSnapshot n4jsdProject = workspaceConfigSnapshot.findProjectContaining(uri);
workspaceConfigSnapshot.isInDependencyCycle(n4jsdProject.getName());

if (workspaceConfigSnapshot.isInDependencyCycle(n4jsdProject.getName())) {
return null;
if (Objects.equals(n4jsdProject.getName(), contextProject.getName())) {
// allow references within the same project
} else {
return null;
}
}
}
return objDescr;
Expand Down

0 comments on commit ffa244f

Please sign in to comment.