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
Sort the projects to run starting from the bottom of the graph and ending at the top, in order to first run the task on low-level libraries, and at the end - on high-level ones
Motivation
I noticed that if you make changes to a low-level library (on which many libraries depend) and run affected:test, then the modified library is not tested first, but about in the middle of the queue.
It may be optimal to start from the lowest level of the graph (from the library that has changed) and move up.
Let's say I have a library in my project that 100 other libraries depend on. Having made changes to it, I expect that it will be tested first, and if the test falls, I will interrupt the rest of the tests and go to fix the error.
At the moment, I didn't find in the source code that before starting a task, projects are somehow sorted, and because of this, the launch is almost in random order:
Description
Sort the projects to run starting from the bottom of the graph and ending at the top, in order to first run the task on low-level libraries, and at the end - on high-level ones
Motivation
I noticed that if you make changes to a low-level library (on which many libraries depend) and run affected:test, then the modified library is not tested first, but about in the middle of the queue.
It may be optimal to start from the lowest level of the graph (from the library that has changed) and move up.
Let's say I have a library in my project that 100 other libraries depend on. Having made changes to it, I expect that it will be tested first, and if the test falls, I will interrupt the rest of the tests and go to fix the error.
At the moment, I didn't find in the source code that before starting a task, projects are somehow sorted, and because of this, the launch is almost in random order:
nx/packages/nx/src/command-line/affected.ts
Line 137 in 5045206
Suggested Implementation
As I have already described above, it is logical to perform tasks first at the lower levels of the tree, and move up.
The text was updated successfully, but these errors were encountered: