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
Then the equivalent of nx run my-module:my-target is run, but does not take into consideration target dependencies. It ignores dependsOn (at least for the cases I have tried).
For instance, if my-module has the following targets in the project.json:
If running await runExecutor(targetDescription, {}, context) and the target dependsOn some other target, then that target should run as well.
I expect the devkit to work equivalently to running the NX CLI.
Run npx nx run cart:build-me. Verify that the dist/ folder is empty
Change the apps/cart/project.json: remove the build target and rename build-webpack to build.
Run npx nx run cart:build-me. Verify that the dist/ folder is not empty
Note that I added a simple library in the repo, called nx-builder-lib, which basically has one executor (buildme) which delegates to the build target of the module. This was inspired by the source code of ngx-deploy-npm, where Diego runs the build target before deploying the NPM package here.
This is expected behavior, runExecutor runs a specific executor. It doesn't spawn the task orchestrator or any of that, so dependencies are not ran and caching is not considered.
Current Behavior
If:
When running
Then the equivalent of
nx run my-module:my-target
is run, but does not take into consideration target dependencies. It ignoresdependsOn
(at least for the cases I have tried).For instance, if
my-module
has the following targets in theproject.json
:then the module is not built. However, if it has directly:
then it is built correctly.
Expected Behavior
If running
await runExecutor(targetDescription, {}, context)
and the targetdependsOn
some other target, then that target should run as well.I expect the devkit to work equivalently to running the NX CLI.
GitHub Repo
https://github.com/mpsanchis/nx-devkit-runExecutor-bug
Steps to Reproduce
npx nx run cart:build-me
. Verify that thedist/
folder is emptyapps/cart/project.json
: remove thebuild
target and renamebuild-webpack
tobuild
.npx nx run cart:build-me
. Verify that thedist/
folder is not emptyNote that I added a simple library in the repo, called
nx-builder-lib
, which basically has one executor (buildme
) which delegates to thebuild
target of the module. This was inspired by the source code of ngx-deploy-npm, where Diego runs the build target before deploying the NPM package here.Nx Report
Failure Logs
Package Manager Version
any
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: