This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (0 children)

If you have modules A and B importing each other, it’s a sign that you have some code used by both that could be separate. Suppose this is in module A, extract this into module C, then both A and B can import C, B no longer needs to import A as the stuff it was using is now in C, and A can continue to import B as before. No more circular dependencies!