You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Function sortProjectsTopologically processes all edges for each project in the processQueue. This means that a project A will process many edges that have nothing to do with it, creating a wrong topological ordering.
For instance, in a simple repo with dependencies:
C --> B --> A
the topological ordering algorithm will:
pick A
go through the dependency C --> B and add C to the processQueue
go through the dependency B --> A and add B to the processQueue
pick C
pick B
resulting in order [A, C, B] instead of the desired [A, B, C]
Expected Behavior
As the comment says in the code, when processing nodes in the project graph, we should Process each project that depends on the current node.
That means taking only the edges whose target is the node which we just picked from the processQueue.
Adding this issue because I saw it was necessary when opening a PR (in the contributing guide).
Please let me know if there's something else to do. It's my first PR 😄
The text was updated successfully, but these errors were encountered:
Current Behavior
Function sortProjectsTopologically processes all edges for each project in the
processQueue
. This means that a projectA
will process many edges that have nothing to do with it, creating a wrong topological ordering.For instance, in a simple repo with dependencies:
the topological ordering algorithm will:
A
C --> B
and addC
to theprocessQueue
B --> A
and addB
to theprocessQueue
C
B
resulting in order
[A, C, B]
instead of the desired[A, B, C]
Expected Behavior
As the comment says in the code, when processing nodes in the project graph, we should
Process each project that depends on the current node
.That means taking only the edges whose target is the node which we just picked from the
processQueue
.GitHub Repo
https://github.com/mpsanchis/nx-basic-repo
Steps to Reproduce
all-independent
node tools/add-tags.js HEAD~1 100.0.0
) for instancenx release version --dry-run
app1
is not bumped despite of depending onlib1
, because it has been wrongly sorted in the topological orderingNx Report
Failure Logs
No response
Package Manager Version
pnpm 8.10.0
Operating System
Additional Information
Adding this issue because I saw it was necessary when opening a PR (in the contributing guide).
Please let me know if there's something else to do. It's my first PR 😄
The text was updated successfully, but these errors were encountered: