Skip to content

Commit

Permalink
fix(core): calculate dependencies of mixed targets (#9942)
Browse files Browse the repository at this point in the history
  • Loading branch information
wSedlacek committed Apr 27, 2022
1 parent 5e124ee commit e3817ef
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/nx/src/tasks-runner/run-command.ts
Expand Up @@ -368,7 +368,7 @@ function addTasksForProjectDependencyConfig(
};

const newPath = [...path, pathFragment];
seenSet.add(project.name);
seenSet.add(targetIdentifier);

if (tasksMap.has(targetIdentifier)) {
return;
Expand All @@ -388,11 +388,11 @@ function addTasksForProjectDependencyConfig(
) {
const depTargetId = getId({
project: depProject.name,
target,
target: dependencyConfig.target,
configuration: configuration,
});
exitOnCircularDep(newPath, depTargetId);
if (seenSet.has(dep.target)) {
if (seenSet.has(depTargetId)) {
continue;
}

Expand All @@ -413,18 +413,17 @@ function addTasksForProjectDependencyConfig(
);
} else {
if (!depProject) {
seenSet.add(dep.target);
continue;
}
const depTargetId = getId({
project: depProject.name,
target,
target: dependencyConfig.target,
configuration: configuration,
});

exitOnCircularDep(newPath, depTargetId);

if (seenSet.has(dep.target)) {
if (seenSet.has(depTargetId)) {
continue;
}

Expand Down

1 comment on commit e3817ef

@vercel
Copy link

@vercel vercel bot commented on e3817ef Apr 27, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx.dev
nx-dev-nrwl.vercel.app

Please sign in to comment.