From 80081b60bf26326cbf50ba5a504e586de89a77b7 Mon Sep 17 00:00:00 2001 From: Kacper Date: Sun, 11 Jan 2026 19:34:29 +0100 Subject: [PATCH] fix(platform): remove logger import to avoid circular dependency Replace createLogger with console.warn to prevent circular import between @automaker/platform and @automaker/utils. Co-Authored-By: Claude Opus 4.5 --- libs/platform/src/editor.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/libs/platform/src/editor.ts b/libs/platform/src/editor.ts index a0da688c..b6daa022 100644 --- a/libs/platform/src/editor.ts +++ b/libs/platform/src/editor.ts @@ -13,23 +13,12 @@ import { homedir } from 'os'; import { join } from 'path'; import { access } from 'fs/promises'; import type { EditorInfo } from '@automaker/types'; -import { createLogger } from '@automaker/utils'; - const execFileAsync = promisify(execFile); // Platform detection const isWindows = process.platform === 'win32'; const isMac = process.platform === 'darwin'; -// Lazy-initialized logger for editor detection -let logger: ReturnType | null = null; -function getLogger() { - if (!logger) { - logger = createLogger('editor'); - } - return logger; -} - // Cache with TTL for editor detection let cachedEditors: EditorInfo[] | null = null; let cacheTimestamp: number = 0; @@ -158,7 +147,7 @@ async function isXcodeFullyInstalled(): Promise { const xcodeAppPath = await findMacApp('Xcode'); if (xedExists && xcodeAppPath) { - getLogger().warn( + console.warn( 'Xcode is installed but xcode-select is pointing to Command Line Tools. ' + 'To use Xcode as an editor, run: sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer' );