Skip to content

Commit

Permalink
ignore new graph logic for now
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKless committed Jan 9, 2024
1 parent 9529a95 commit 7a2f9e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public suspend fun getNxGraphService(project: Project): INxGraphService? {
CoroutineScope(Dispatchers.Default).async { nxlsService.workspace()?.nxVersion }.await()
?: return null

// TODO: replace with actual version
return if (nxVersion.gte(NxVersion(major = 18, minor = 0, full = "18.0.0"))) {
// TODO: enable & replace with actual version
return if (false && nxVersion.gte(NxVersion(major = 18, minor = 0, full = "18.0.0"))) {
NxGraphService.getInstance(project)
} else {
OldNxGraphService.getInstance(project)
Expand Down
15 changes: 8 additions & 7 deletions libs/vscode/project-graph/src/lib/init-vscode-project-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ export function getGraphWebviewManager(): GraphWebviewManager {

export async function initVscodeProjectGraph(context: ExtensionContext) {
const nxVersion = await getNxVersion();
// TODO: replace with actual version
if (gte(nxVersion.version, '18.0.0')) {
graphWebviewManager = new GraphWebviewManager(context);
registerActions(graphWebviewManager);
} else {
context.subscriptions.push(projectGraph());
}
// TODO: enable & replace with actual version that has nx graph api changes
// eslint-disable-next-line no-constant-condition
// if (gte(nxVersion.version, '18.0.0')) {
// graphWebviewManager = new GraphWebviewManager(context);
// registerActions(graphWebviewManager);
// } else {
context.subscriptions.push(projectGraph());
// }
}

function registerActions(graphWebviewManager: GraphWebviewManager) {
Expand Down

0 comments on commit 7a2f9e9

Please sign in to comment.