Circular Dependencies

Domain: Package Ecosystem

🎯 Motivation

When package A depends on B and B depends on A, neither can be installed cleanly. Detecting and breaking cycles is essential for a healthy, installable package graph.

πŸ“‹ Concrete Example

If auth-tools imports db-tools and db-tools imports auth-tools, the cycle blocks installation. Fix it by extracting shared code into a third package common that both depend on instead.

πŸ”— Analogy

Two people standing in a doorway, each saying β€œafter you.” Neither moves. Someone must step out of the cycle β€” by taking a separate door β€” so both can proceed.