-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(angular): support maxParallel, parallel, and withDeps options in webpack-browser schema #4548
fix(angular): support maxParallel, parallel, and withDeps options in webpack-browser schema #4548
Conversation
Nx Cloud ReportCI ran the following commands for commit 126a537. Click to see the status, the terminal output, and the build insights.
Sent with 💌 from NxCloud. |
Looking for guidance on how to pass this test failure in
|
@LayZeeDK sorry for the late reply and thank you for the PR.
Is you concern the lack of docs? Or the fact that you have to do: |
When nx runs any command it reads the tasks runner config from nx.json. This is how it knows what tasks runner to use, what options it has etc. The workspace.json file lists the tasks and configures the executors/builders. The file-server target is a special case cause it actually invokes |
I see, @vsavkin. Is there any way we can add these options to for example |
@LayZeeDK it depends on the build target. You can have a build target that actually invokes Nx under the hood (as the file-server target does), in this case we could add them. The executor implementing the target has to be able to interpret those params. For instance, the jest executor has a param called maxWorkers, which is analogous to maxParallel. The options in workspace.json configure targets' executors. When you run things like I imagine your use case is something like this: When building myapp, I'd like to always build it with deps and build all the targets in parallel. But I don't want this to affect other targets and other apps. It's a legitimate use case. Right now we allow you to set parallel and maxParallel for all commands, but you cannot set the defaults for some commands. |
Yes, we wanted to set The schema of |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
The
withDeps
option is required for incremental build when using the@nrwl/angular:webpack-browser
executor as briefly mentioned in Setup incremental builds for Angular applications > Running and serving incremental builds.This guide also mentions that we can configure
withDeps
andparallel
in the options of the incrementalserve
target of our workspace configuration. It doesn't mention this for thebuild
target.However, the
maxParallel
,parallel
, orwithDeps
options are not declared in the executor schema or its documentation.Expected Behavior
Seeing as
withDeps
is required for the incrementalbuild
target to work, we should add support for themaxParallel
,parallel
, andwithDeps
options in the schema of@nrwl/angular:webpack-browser
.Related Issue(s)
Fixes #
Other information
We're building an Nx plugin to convert an application and its library dependencies to use incremental build and this is blocking us from implementing it for the best end-developer experience.
See nx-worker/nxworker#5.