Layer violations in Structure101
See original GitHub issueIn the process of testing our plugin/flavour for Structure101/g which parses JS/TS projects, we identified a few problems with the layering in VSCode 08b92738094. In a private channel, @egamma asked us to enter this issue.
Steps to Reproduce:
- Install Structure 101/g Studio
- Install the flavour/plugin net.betterdeveloper.javascript.imports 1.1.2
- Get the VSCode commit hash 08b92738094 (to make sure it is the same src I looked at)
- File->New, choose the right flavour/plugin above, and run pointing at the VS Code src dir and the tsconfig file, like this:
When the conversion finishes, you will get some layer violations:
-
platform is using editor. “/platform/browser/contextScopedHistoryWidget.ts imports /editor/contrib/suggest/suggest.ts”. This violation was reported in private and issue #140856 was entered by @egamma
-
bootstrap-amp.js uses “vs” and vice-versa:
bootstrap-amd.js imports vs/base/common/performance.js
bootstrap-amd.js imports vs/loader.js
vs/editor/test/common/model/benchmark/bootstrap.js imports bootstrap-amd.js
vs/server/cli.js imports bootstrap-amd.js
vs/server/main.js imports bootstrap-amd.js
- base uses platform: (although that seems due to the fact that test code is stored in the same folder as production code. We will send another analysis with synthetic model transformation to emulate tests in a separate dir tree)
/base/parts/ipc/test/node/ipc.net.test.ts imports /platform/product/common/product.ts
/base/test/parts/quickinput/browser/quickinput.test.ts imports /platform/list/browser/listService.ts
I will enable/explain Model Transformations and enter a separate comment for that mode (extracting tests out into a separate structure).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:24 (10 by maintainers)
Top Results From Across the Web
Define architecture - Structure101
Violations of the layering, i.e. dependencies in the mapped physical code-base that break the specified layering, are shown on the diagram (conformant ...
Read more >Fat Classes - Structure101
Dependencies should comply with the Structure Spec. SonarQube Rule Description. A Spec Dependency Violation breaks the layering and/or ...
Read more >Diagram editor - Structure101
The violations displayed on the diagram will generally change as the code that maps to the diagrams changes, but the diagram itself remains...
Read more >An Overview of Structure101 Architecture Diagrams
Once the mapping is established, any dependencies that violate the architecture is shown on the diagram as a curved dotted line as shown...
Read more >Monolith to Modular, Part 3 – Managing Violations
The Action List plus Structure Spec captures the target module architecture in Structure101 Studio. Publication of the Actions and Spec ...
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 FreeTop 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
Top GitHub Comments
@sglebs I am trying on a MacBook Pro 2019, 32GB RAM.
There must have been some unlucky timing, maybe you were releasing
1.1.3rc-1
exactly when I was trying to install it. Now, on macOS I see1.1.3rc-1
, but when I tried earlier I only saw1.1.0
, so the macOS Out-Of-Memory occurred with1.1.0
. I also pointed tovscode
instead ofvscode/src
.I then switched to a Windows 11 VM with 8GB, where I could see
1.1.3rc-1
, but which failed to install the first few times (I think the zip was being uploaded at the same time I was trying to download/install it). Also here I pointed tovscode
instead ofvscode/src
when the Out-Of-Memory occurred.But after correcting and pointing to
vscode/src
, the analysis runs fine now for me 💯 .🤦 That was the problem! Sorry about that, I’m now able to run the analysis. Thank you!