Greetings gentlemen! Thanks for an awesome tool! I have a question, I’m trying to use the incremental builds with the affected commands.
I have a monorepo, with five apps, and about 52 buildable libs.
I noticed something weird.
First, when I run
nx affected:build -c=staging --with-deps after a small change to the app lib, which is consumed as a lazy module by the app itself, I see all the dep-graph of the app as affected, O_o, then nx tries to rebuild all the “affected” libs and takes them from the cache. Although if u run
nx affected:build -c=staging u will see only two affected projects, the app itself and the app lib, which is correct.
Also, it seems that the final app build uses the source libs, not the built artefacts of the libs.
Isn’t that just what
--with-deps is supposed to do?
Oh I see, the dest is empty at the call of the command, and we need to take all the libs’ artefacts from the cache to use it for the app build. The confusion came from thinking that the affected command shows on the console only actually affected projects. But in this case, we see the affected ones and the ones what should be fetched to be used for the apps build