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

feat(core): error when a project graph plugin fails #16095

Conversation

AgentEnder
Copy link
Member

Current Behavior

We warn when a project graph throws - this can hide logs and leave the repository in a confusing state.

Expected Behavior

We throw when a project graph plugin throws - this prevents the repository from ending up in a half-baked state.

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Apr 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 5, 2023 4:21pm

logger.warn(message);
logger.warn(`Run with NX_VERBOSE_LOGGING=true to see the error.`);
}
const message = `Failed to process the project graph with "${plugin.name}".`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think we should just throw the real error? People can see from the stacktrace where it is from right?

Copy link
Member Author

Choose a reason for hiding this comment

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

I like having this line in here - the stack trace may show something like "Unable to read property X from undefined" and I can see folks opening that issue up here when its from a comm. plugin.

Putting the plugin name front and center should make it more likely that those issues don't start on our repo. I do think we should show the e.message too though - I'll get that updated.

@AgentEnder AgentEnder force-pushed the chore/throw-error-instead-of-warn-for-plugins branch from 7f83525 to 0d3fe0b Compare April 5, 2023 16:16
@AgentEnder AgentEnder requested a review from FrozenPandaz April 5, 2023 22:09
@FrozenPandaz FrozenPandaz merged commit ad6ec99 into nrwl:master Apr 6, 2023
@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 Apr 12, 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.

2 participants