-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix(core): stabilizes project references in dependsOn and inputs when later plugins rename a project #34332
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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit 71a0422
☁️ Nx Cloud last updated this comment at |
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important

Nx Cloud has identified a possible root cause for your failed CI:
These Gradle e2e test failures are caused by an external infrastructure issue, not the PR changes. The foojay toolchain resolver API is returning 503 Service Temporarily Unavailable errors when Gradle attempts to download Java 21, preventing builds from completing. This is unrelated to our project name substitution changes in the core Nx project graph utilities.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
ba435cc to
615e53a
Compare
… later plugins rename a project
615e53a to
71a0422
Compare
Current Behavior
There's a bug currently where is a plugin returns a dependsOn dependency or input that directly references another project by name, and a later plugin renames that project, the dependsOn or input entry is left stale and pointing at a now non-existent project.
Expected Behavior
The old refs are kept up to date as the nodes get merged together
AI Summary
This pull request introduces a new mechanism to handle project name substitutions in the Nx project graph, ensuring that references to project names in
inputsanddependsOnblocks remain accurate even if a plugin changes a project's name during graph construction. The main addition is theProjectNameInNodePropsManager, which tracks and updates references when project names change. Several related refactorings and improvements were made to integrate this manager into the project configuration merging process.Project name substitution and consistency:
ProjectNameInNodePropsManagerclass to manage and apply project name substitutions when project names change, ensuring that all references ininputsanddependsOnblocks remain consistent.ProjectNameInNodePropsManagerinto themergeCreateNodesResultsfunction, registering substitutors for node results, marking roots as dirty when names change, and applying substitutions after merging. [1] [2] [3]API and function changes:
mergeProjectConfigurationIntoRootMapto return an object indicating whether a project name was changed, instead of just returning void. [1] [2]Code organization and import cleanup:
project-configuration-utils.tsfor better organization and to accommodate the new manager. [1] [2]