Skip to content

Commit

Permalink
fix(core): actually return graph
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Dec 3, 2024
1 parent 4058191 commit 0eeb22e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/nx/src/project-graph/project-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
retrieveWorkspaceFiles,
} from './utils/retrieve-workspace-files';
import { getPlugins } from './plugins/get-plugins';
import { logger } from '../utils/logger';

/**
* Synchronously reads the latest cached copy of the workspace's ProjectGraph.
Expand Down Expand Up @@ -244,8 +245,11 @@ export async function createProjectGraphAsync(
const { allWorkspaceFiles, fileMap, rustReferences } =
await retrieveWorkspaceFiles(workspaceRoot, projectRootMap);
hydrateFileMap(fileMap, allWorkspaceFiles, rustReferences);
return graph;
// If no cached graph is found, we will fall through to the normal flow
} catch {}
} catch (e) {
logger.verbose('Unable to use cached project graph', e);
}
}

const projectGraphAndSourceMaps = await createProjectGraphAndSourceMapsAsync(
Expand Down

0 comments on commit 0eeb22e

Please sign in to comment.