Skip to content

fix: break 3-file import cycle in cli/#904

Open
AbhijitK20 wants to merge 1 commit into
CodebuffAI:mainfrom
AbhijitK20:fix-import-cycles
Open

fix: break 3-file import cycle in cli/#904
AbhijitK20 wants to merge 1 commit into
CodebuffAI:mainfrom
AbhijitK20:fix-import-cycles

Conversation

@AbhijitK20

Copy link
Copy Markdown

project-files.ts was importing getConfigDir from ./utils/auth, which imported logger, which imported back to project-files. Changed the import to ./utils/config-dir which has no transitive dependencies on project-files, breaking the cycle:

project-files.ts -> auth.ts -> logger.ts -> project-files.ts

Now: project-files.ts -> config-dir.ts (no cycle)

project-files.ts was importing getConfigDir from ./utils/auth, which
imported logger, which imported back to project-files. Changed the
import to ./utils/config-dir which has no transitive dependencies on
project-files, breaking the cycle:

  project-files.ts -> auth.ts -> logger.ts -> project-files.ts

Now: project-files.ts -> config-dir.ts (no cycle)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant