Skip to content

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

Merged
AgentEnder merged 1 commit intomasterfrom
fix/dont-return-default-plugins-on-second-run-daemon
Apr 30, 2025
Merged

fix(core): dont cache default plugins as all plugins if loading plugins fails#30927
AgentEnder merged 1 commit intomasterfrom
fix/dont-return-default-plugins-on-second-run-daemon

Conversation

@AgentEnder
Copy link
Copy Markdown
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
@vercel
Copy link
Copy Markdown

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

@nx-cloud
Copy link
Copy Markdown
Contributor

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

Comment thread packages/nx/src/project-graph/plugins/get-plugins.ts Outdated
@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
@github-actions
Copy link
Copy Markdown
Contributor

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