Skip to content

fix(core): dont cache default plugins as all plugins if loading plugins fails #30927

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

Merged

Conversation

AgentEnder
Copy link
Member

Current Behavior

Nx 21 adds an error when loading a plugin that's not been updated with createNodesV2. When attempting to update the Nx repo it was uncovered that there is a bug when loading plugins on the daemon. Because of some improper caching logic in getPlugins, if loadSpecifiedNxPlugins throws the result of getDefaultPlugins is cached as if it was the result of getPlugins. This causes the error from loading plugins to mysteriously vanish on task reruns with the daemon disabled.

Expected Behavior

getDefaultPlugins should store its cache under its own var

Related Issue(s)

Fixes #

@AgentEnder AgentEnder requested a review from a team as a code owner April 29, 2025 19:04
@AgentEnder AgentEnder requested a review from xiongemi April 29, 2025 19:04
Copy link

vercel bot commented Apr 29, 2025

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

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Apr 30, 2025 2:53pm

Copy link

nx-cloud bot commented Apr 29, 2025

View your CI Pipeline Execution ↗ for commit d7c8ca0.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-ci ✅ Succeeded 24m 27s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 18s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 1s View ↗
nx documentation ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-04-30 15:54:33 UTC

@AgentEnder AgentEnder force-pushed the fix/dont-return-default-plugins-on-second-run-daemon branch from 9365486 to 02479c9 Compare April 29, 2025 19:12
@AgentEnder AgentEnder enabled auto-merge (squash) April 29, 2025 19:14
@AgentEnder AgentEnder force-pushed the fix/dont-return-default-plugins-on-second-run-daemon branch from 02479c9 to 76bc523 Compare April 29, 2025 21:14
@AgentEnder AgentEnder force-pushed the fix/dont-return-default-plugins-on-second-run-daemon branch from 937f87e to d7c8ca0 Compare April 30, 2025 14:50
@AgentEnder AgentEnder merged commit 8f2c11c into master Apr 30, 2025
6 checks passed
@AgentEnder AgentEnder deleted the fix/dont-return-default-plugins-on-second-run-daemon branch April 30, 2025 15:54
Copy link

github-actions bot commented May 6, 2025

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 May 6, 2025
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