Avoiding circular dependencies

Circular dependencies are problematic. To understand why, consider the following example.

Let's say we have five packages (A, B, C, D, and E) with the following dependencies:

  • A depends on B and C
  • C depends on D and E
  • E depends on A

To illustrate these graphically, we can create a diagram where we can use an arrow notation to indicate dependencies between components. The direction of the arrow indicates the direction of the dependency.

Get Hands-On Design Patterns and Best Practices with Julia now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.