nx affected:test/lint list all apps if the change is only made in lazy loaded lib
See original GitHub issueCurrent Behavior
In my angular repo, there is one app with several libs. All the libs are lazy loaded by the app by using loadChildren. All the libs have reference/imports from the app, but there is no reference/import from app to lib(except the loadChildren). When I run “nx dep-graph” the dependency graph looks like:
Does the dashed line indicate the relationship of the lazy load?
When I made a change on one of libs, the nx affected:test
would run all tests in all the libs and the app. The nx affected:lint
would do the same thing as nx affected:test
.
Expected Behavior
What I expected is that only the changed lib should be affected when I run either affected:test or affected:lint.
Steps to Reproduce
It works as expected before we upgrade the angular version from 8.x to 9.x. The nx workspace version was upgraded to 9.2.4 from 7.x during the angular 9 upgrade. It seems like the the newer version of nx changed the behaviours how it generates the dependency graph.
Failure Logs
Environment
@nrwl/angular : 8.12.0 @nrwl/cli : 9.2.4 @nrwl/cypress : 9.2.4 @nrwl/eslint-plugin-nx : Not Found @nrwl/express : Not Found @nrwl/jest : 8.12.0 @nrwl/linter : Not Found @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/react : Not Found @nrwl/schematics : Not Found @nrwl/tao : 9.2.4 @nrwl/web : Not Found @nrwl/workspace : 9.2.4 typescript : 3.8.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
My understanding of the issue is that, if project A is changed, why do all projects that depend on A need to be linted?
If project B depends on project A and only A changed, I don’t see why B would need to be linted as well.
same for unit tests