From a2670639dbf09e0676a37b0583f6948e5d63f54c Mon Sep 17 00:00:00 2001 From: Jason Jean Date: Tue, 10 Dec 2024 15:36:41 -0500 Subject: [PATCH] fix(repo): cleanup old plugins promise (#29295) ## Current Behavior When plugins in `nx.json` are changed, the daemon can no longer communicate with plugin workers and create the graph. It will just hang waiting for messages to go through. ## Expected Behavior Proper cleanup is done when plugins in `nx.json` are changed and the daemon continues responding properly with project graphs. ## Related Issue(s) Fixes # --- packages/nx/src/project-graph/plugins/get-plugins.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/nx/src/project-graph/plugins/get-plugins.ts b/packages/nx/src/project-graph/plugins/get-plugins.ts index 1a245d318d598..2ad348a2ff28d 100644 --- a/packages/nx/src/project-graph/plugins/get-plugins.ts +++ b/packages/nx/src/project-graph/plugins/get-plugins.ts @@ -24,6 +24,7 @@ export async function getPlugins() { // Cleanup current plugins before loading new ones if (cleanup) { + pendingPluginsPromise = undefined; cleanup(); } @@ -50,6 +51,7 @@ export async function getOnlyDefaultPlugins() { // Cleanup current plugins before loading new ones if (cleanupDefaultPlugins) { + pendingDefaultPluginPromise = undefined; cleanupDefaultPlugins(); }