-
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
dependsOn
shorthand broken when target name matches name of a project in the same repo.
#16931
Closed
2 of 4 tasks
Comments
After poking around in the code - I figured out where the issue is, and after reading it realized it may be an intentional change. That said, if it is an intentional change, it should be better documented to avoid folks running into this issue. |
acburdine
added a commit
to acburdine/nx
that referenced
this issue
May 11, 2023
closes nrwl#16931 - if a project has a `dependsOn` string with only a target that has the same name as another project, it is now treated correctly as a reference to a target in the same project
acburdine
added a commit
to acburdine/nx
that referenced
this issue
May 11, 2023
closes nrwl#16931 - if a project has a `dependsOn` string with only a target that has the same name as another project, it is now treated correctly as a reference to a target in the same project
acburdine
added a commit
to acburdine/nx
that referenced
this issue
May 11, 2023
closes nrwl#16931 - if a project has a `dependsOn` string with only a target that has the same name as another project, it is now treated correctly as a reference to a target in the same project
acburdine
added a commit
to acburdine/nx
that referenced
this issue
May 11, 2023
closes nrwl#16931 - if a project has a `dependsOn` string with only a target that has the same name as another project, it is now treated correctly as a reference to a target in the same project
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Current Behavior
Noticed this after the Nx v16 update - a number of our
dependsOn
configurations in various projects in our Nx monorepo were failing to run.Example: A given repo has two projects:
a
andcore
. Projecta
has abuild
target and acore
target. Thebuild
target has"dependsOn": ["core"]
set, however whenevernx build a
is run, thecore
target is not invoked. Caching isn't the cause here as far as I can tell, given that thecore
target is not listed under cacheableOperations in nx.json.Using the slightly more explicit configuration of
"dependsOn": [{ "target": "core" }]
works as expected.Expected Behavior
Prior to the Nx v16 update, the
core
target in the above example would be correctly invoked before thebuild
target.GitHub Repo
https://github.com/acburdine/nx-dependson-repro
Steps to Reproduce
nx build test
, see that thecore
target is not invoked, though thecore-2
target is invoked.nx build test-2
, see that both thecore
andcore-2
targets are invoked.Nx Report
Failure Logs
No response
Operating System
Additional Information
If I had to guess, this may be related to the changes in v16 allowing for dependsOn configurations to specify explicit projects, rather than just
dependencies
orself
.The text was updated successfully, but these errors were encountered: