Skip to content

Layer violations in Structure101 #140874

@sglebs

Description

@sglebs

In 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 08b9273. In a private channel, @egamma asked us to enter this issue.

Steps to Reproduce:

  1. Install Structure 101/g Studio
  2. Install the flavour/plugin net.betterdeveloper.javascript.imports 1.1.2
  3. Get the VSCode commit hash 08b9273 (to make sure it is the same src I looked at)
  4. File->New, choose the right flavour/plugin above, and run pointing at the VS Code src dir and the tsconfig file, like this:

image

When the conversion finishes, you will get some layer violations:

  1. platform is using editor. "/platform/browser/contextScopedHistoryWidget.ts imports /editor/contrib/suggest/suggest.ts". This violation was reported in private and issue Layer breaker in browser/contextScopedHistoryWidget.ts#L14 #140856 was entered by @egamma

image

  1. 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		

image

  1. 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		

image

I will enable/explain Model Transformations and enter a separate comment for that mode (extracting tests out into a separate structure).

Metadata

Metadata

Labels

engineeringVS Code - Build / issue tracking / etc.under-discussionIssue is under discussion for relevance, priority, approach

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions