Circular dependencies / Tangles between modules
See original GitHub issueAs we introduced the top/primitive components via https://github.com/microsoft/vscode-jupyter/issues/8976 and moved the moduels/helpers to their logical folders, we had circular dependencies between the top components. Below is a simplified version of component dependnecies generated by Structure101

We want to gradually remove the dependencies in wrong directions, including
- No dependencies on
notebooks
/iw
/webview
inplatform
- No dependencies on
iw
in notebooks - Move feature code/helpers from
telemetry
to feature components.notebooks
/iw
/webview
depends ontelemetry
but not the other way around - …
With above items tackled we could end up with an ideal architecture like below (we still need to revisit if it fits)

Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
java - Is there any way to get around circular dependencies in ...
I have two modules in my package, call them Module1 and Module2 . Module1 has a dependency on Module2 and would prefer to...
Read more >Circular dependencies between modules - Microsoft Learn
Circular references between modules, constants, and user-defined types aren't allowed. This error has the following cause and solution:.
Read more >Why cyclic dependency errors occur - a look into the Python ...
In simplest terms, a circular import occurs when module A tries to import and use an object from module B, while module B...
Read more >Cyclic dependencies are evil (2013) - Hacker News
circular dependencies at runtime are not really a problem and often necessary. circular dependencies at build time/between modules are evil.
Read more >java - Cyclic dependency in this project design
The dependencies are in form of method calls to classes located inside the modules A and B. An extraction would be possible but...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My short answer is not always. The tangles from structure101 can be used as indicators for how decoupled a component is and can be used as one approach to improve the code. There are good discussions in VS Code https://github.com/microsoft/vscode/issues/140874 about if/why/how of using structure101 to analyze and improve VS Code’s code base.
I agree and I don’t think we should enforce any layering concepts inside top components. 0 tangle is also not what we would try to archive. The goal IMHO should be better readability.
Based on my experience of the last two weeks, the tangles shown by structure101 (or a super-restrict eslint rule) helped find code that are placed in wrong folders/modules.