Skip to content
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(core): add more descriptive dependencies build error #9031

Merged
merged 3 commits into from Mar 28, 2022

Conversation

yharaskrik
Copy link
Contributor

Current Behavior

Right now if you have a library with a dozen dependencies (everything being buildable) and you do not have targetDependencies or dependsOn setup correctly in the project you are trying to build the error makes it seem like
their is an issue buildable one or more of the dependencies rather than the library itself.

There are really two problems that can occur when building buildable libraries:

root project is configured wrong so that NONE of the deps get build (targetDependencies or dependsOn not setup for it or in the root)

one of the root projects deps is configured wrong so that even though the deps are attempting to be built there is an issue.

The same error is shown in both places.

When does this happen? If you cannot yet configure targetDependencies in the root nx.json because you are refactoring a large legacy repo to have buildable libs then you need to add dependsOn to each project individually, if you forget one you can end up in the situation abov.

Expected Behavior

If the number of dependencies that have not been build yet is equal to the number of dependencies the project has then it can (mostly) be assumed that the project being built is configured wrong rather than one of the others is (which still might be the case)

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Feb 18, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/68NUauKfgGuXfBgFX6YaanzeNLiU
✅ Preview: Canceled

[Deployment for 26614df canceled]

@nx-cloud
Copy link

nx-cloud bot commented Feb 18, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 26614df. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 7 targets

Sent with 💌 from NxCloud.

Copy link
Member

@AgentEnder AgentEnder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some failing tests, I think they should be fixed by my suggestion.

@AgentEnder AgentEnder force-pushed the jaybell/add-more-descriptive-error branch from 21fa587 to 26614df Compare March 28, 2022 20:13
@AgentEnder AgentEnder merged commit 70492f3 into nrwl:master Mar 28, 2022
sidmonta pushed a commit to sidmonta/nx that referenced this pull request Apr 2, 2022
Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants