New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using generators in parallel executed targets will fail #8887
Comments
when executing workspace generators the tools/generators are first compiled to dist/out-tsc and the compilation will conflict if generators are invoked in run-commands with parallel execution. with this change a lock file is used to serialize access to dist/out-tsc and in addition to this tools/generator/* are hashed so that compilation is only invoked when there is some change since last compilation ISSUES CLOSED: nrwl#8887
when executing workspace generators the tools/generators are first compiled to dist/out-tsc and the compilation will conflict if generators are invoked in run-commands with parallel execution. with this change a lock file is used to serialize access to dist/out-tsc and in addition to this tools/generator/* are hashed so that compilation is only invoked when there is some change since last compilation ISSUES CLOSED: nrwl#8887
Hey! I think this should work out-of-the-box if swapped over to using the local-plugin functionality introduced in 13.10 (#9116). In the future, we are planning to migrate existing workspace generators + schematics into a local workspace plugin and retire the current Can you try moving the generators into a plugin? I think it should solve your issue without introducing any new complexities. |
I will try building a local plugin - may take some days before I get around to it thoug :-) |
Moved all executors and generators from tools/ to a local workspace plugin |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
If you have targets in your
project.json
that call upon a workspace generator then parallel execution of these tasks will faile.g.
Expected Behavior
The generator should execute even when called from parallel executed targets.
This is working with
but fails with
Steps to Reproduce
clone this repo: https://github.com/jonhamm/nx-error-parallel-tools.git
then execute
nx delay-all common
The parallel execution occurs in
common/project.json
:All 9 buildable libraries have a similar
delay
target (differing only on the delay time):and the call the target
delay-one
incommon
will execute the generator:This issue may not be prioritized if details are not provided to help us reproduce the issue.
Failure Logs
Environment
The text was updated successfully, but these errors were encountered: