-
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
Add Ignore dependencies CLI option #18053
Comments
+1 This would be very practical and save some work making redundant task definitions |
We've recently bumped into that case and while completely ignoring dependencies is some solution, but in Gradle (a build tool originally for Java/JVM), there is also a switch to disable/ignore just particular test, e.g.
That would ignore the dependent Maybe that variant could also be available (together with the "total" dependencies ignoring)? |
Same here. |
Same pb for me. I have to duplicate tasks to add a variant without dependencies just to skip the chain. |
Any news about this issue?? |
+1 |
+1. With a large repo with lot of projects, running all of the task dependencies takes a lot of time, even when they are cached. Would like to be able to just execute the test task without running the dependent tasks. We build all our code upfront beforehand, as this is much faster than letting nx build everything. |
Any news about this issue?? 👋 |
Any news about this issue?? |
+1 |
1 similar comment
+1 |
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior There is no option to exclude dependent tasks when running Nx. ## Expected Behavior There is a flag, `--exclude-task-dependencies`, to exclude task deps from running. This is inline with other tools: - [dotnet cli](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-build#:~:text=%2D%2Dno%2D-,dependencies,-Ignores%20project%2Dto) ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes nrwl#18053
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. |
Description
Currently, when you run an Nx command, like
build
or any other custom target that has the following configuration:There is no way to ignore the
dependsOn
Motivation
Sometimes we don't need to run the entire dependency tree when we are testing something, or doing something repetitively, of course, I can have a second target for the same task with the same configuration, but it is not ideal, because you need to maintain 2 versions of the same thing.
Suggested Implementation
Have a CLI option
--ignore-dependencies
or--no-deps
(personally like--no-deps
more) and when the option is detected ignore all the task dependencies.Or
In this way, the default always runs the entire dependency graph for the task, but if the developer provides the CLI option, Nx bypasses them.
Alternate Implementations
The text was updated successfully, but these errors were encountered: