extensionDescriptionRegistry.ts ×11

Frontier kind: Joint frontier

unlabeled · c_01e4112c120b

1 test · 7967 LOC · 35 files · introduces 1 test · 80 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
14 ranges80 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
1145 ranges7967 lines · 35 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationextensionDescriptionRegistry.ts ×2 · 13 introduced LOCextensionDescriptionRegi…extensionDescriptionRegistry.ts ×1 · 1 introduced LOCextensionDescriptionRegi…extensionDescriptionRegistry.ts ×3 · 16 introduced LOCextensionDescriptionRegi…extensionDescriptionRegistry.ts ×1 · 2 introduced LOCextensionDescriptionRegi…extensionDescriptionRegistry.ts ×1 · 3 introduced LOCextensionDescriptionRegi…extensionDescriptionRegistry.ts ×1 · 2 introduced LOCextensionDescriptionRegi…extensionDescriptionRegistry.ts ×37 · 139 introduced LOCextensionDescriptionRegi…extensions.ts ×1 · 2 introduced LOCextensions.ts ×1extensions.ts ×1 · 1 introduced LOCextensions.ts ×1extensions.ts ×1 · 2 introduced LOCextensions.ts ×1extensions.ts ×1 · 2 introduced LOCextensions.ts ×1extensions.ts ×2 · 2 introduced LOCextensions.ts ×2async.ts ×202 · 1247 introduced LOCasync.ts ×202extensions.ts ×1 · 3 introduced LOCextensions.ts ×1extensions.ts ×24 · 483 introduced LOCextensions.ts ×24resources.ts ×23 · 253 introduced LOCresources.ts ×23remoteHosts.ts ×7 · 52 introduced LOCremoteHosts.ts ×7network.ts ×20 · 292 introduced LOCnetwork.ts ×20strings.test|title=Strings trimWhitespace|occurrence=1 · 0 introduced LOCstrings.test|title=Strin…extpath.ts ×17 · 91 introduced LOCextpath.ts ×17strings.ts ×101 · 542 introduced LOCstrings.ts ×101cancellation.test|title=CancellationToken None|occurrence=1 · 0 introduced LOCcancellation.test|title=…event.ts ×3 · 19 introduced LOCevent.ts ×3cancellation.ts ×18 · 90 introduced LOCcancellation.ts ×18lifecycle.ts ×2 · 3 introduced LOClifecycle.ts ×2lifecycle.test|title=Lifecycle dispose disposable array|occurrence=1, lifecycle.test|title=Lifecycle Action bar has broken accessibility #100273|occurrence=1 · 0 introduced LOClifecycle.test|title=Lif…event.ts ×1 · 1 introduced LOCevent.ts ×1event.ts ×4 · 9 introduced LOCevent.ts ×4event.ts ×2 · 4 introduced LOCevent.ts ×2event.ts ×2 · 6 introduced LOCevent.ts ×2event.ts ×93 · 864 introduced LOCevent.ts ×93lifecycle.ts ×1 · 6 introduced LOClifecycle.ts ×1languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication disposes entries no longer in model|occurrence=1 · 0 introduced LOClanguageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication mixed unique and duplicate IDs|occurrence=1, languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication creates new entry when none exists|occurrence=1, +4 · 0 introduced LOClanguageStatusDedupe.tes…uri.test|title=URI URI#file, win-speciale|occurrence=1, charCode.test|title=CharCode has good values|occurrence=1, +2 · 0 introduced LOCuri.test|title=URI URI#f…uri.ts ×3 · 15 introduced LOCuri.ts ×3uri.ts ×2 · 10 introduced LOCuri.ts ×2utils.ts ×3 · 9 introduced LOCutils.ts ×3uri.ts ×1 · 2 introduced LOCuri.ts ×1uri.ts ×9 · 37 introduced LOCuri.ts ×9lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1linkedList.ts ×13 · 44 introduced LOClinkedList.ts ×13instantiation.ts ×5 · 111 introduced LOCinstantiation.ts ×5lifecycle.ts ×1 · 4 introduced LOClifecycle.ts ×1lifecycle.ts ×2 · 6 introduced LOClifecycle.ts ×2lifecycle.ts ×2 · 4 introduced LOClifecycle.ts ×2lifecycle.ts ×1 · 6 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 1 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1lifecycle.ts ×3 · 9 introduced LOClifecycle.ts ×3lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 7 introduced LOClifecycle.ts ×1lifecycle.ts ×4 · 7 introduced LOClifecycle.ts ×4lifecycle.ts ×4 · 8 introduced LOClifecycle.ts ×4lifecycle.ts ×6 · 16 introduced LOClifecycle.ts ×6lifecycle.ts ×2 · 2 introduced LOClifecycle.ts ×2lazy.ts ×1 · 2 introduced LOClazy.ts ×1lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1lifecycle.ts ×3 · 3 introduced LOClifecycle.ts ×3lazy.ts ×3 · 37 introduced LOClazy.ts ×3lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1uint.ts ×2 · 43 introduced LOCuint.ts ×2iterator.ts ×1 · 2 introduced LOCiterator.ts ×1lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1map.ts ×97 · 3334 introduced LOCmap.ts ×97src/vs/base/common/arrays.ts · 949 LOCcommon/arrays.tssrc/vs/base/common/arraysFind.ts · 226 LOCcommon/arraysFind.tssrc/vs/base/common/assert.ts · 91 LOCcommon/assert.tssrc/vs/base/common/async.ts · 2749 LOCcommon/async.tssrc/vs/base/common/cache.ts · 153 LOCcommon/cache.tssrc/vs/base/common/cancellation.ts · 206 LOCcommon/cancellation.tssrc/vs/base/common/charCode.ts · 450 LOCcommon/charCode.tssrc/vs/base/common/collections.ts · 176 LOCcommon/collections.tssrc/vs/base/common/errors.ts · 357 LOCcommon/errors.tssrc/vs/base/common/event.ts · 1964 LOCcommon/event.tssrc/vs/base/common/extpath.ts · 433 LOCcommon/extpath.tssrc/vs/base/common/functional.ts · 32 LOCcommon/functional.tssrc/vs/base/common/iterator.ts · 194 LOCcommon/iterator.tssrc/vs/base/common/lazy.ts · 57 LOCcommon/lazy.tssrc/vs/base/common/lifecycle.ts · 974 LOCcommon/lifecycle.tssrc/vs/base/common/linkedList.ts · 151 LOCcommon/linkedList.tssrc/vs/base/common/map.ts · 1016 LOCcommon/map.tssrc/vs/base/common/marshallingIds.ts · 33 LOCcommon/marshallingIds.tssrc/vs/base/common/network.ts · 440 LOCcommon/network.tssrc/vs/base/common/path.ts · 1589 LOCcommon/path.tssrc/vs/base/common/platform.ts · 281 LOCcommon/platform.tssrc/vs/base/common/process.ts · 76 LOCcommon/process.tssrc/vs/base/common/resources.ts · 444 LOCcommon/resources.tssrc/vs/base/common/stopwatch.ts · 41 LOCcommon/stopwatch.tssrc/vs/base/common/strings.ts · 1413 LOCcommon/strings.tssrc/vs/base/common/symbols.ts · 9 LOCcommon/symbols.tssrc/vs/base/common/types.ts · 410 LOCcommon/types.tssrc/vs/base/common/uint.ts · 59 LOCcommon/uint.tssrc/vs/base/common/uri.ts · 754 LOCcommon/uri.tssrc/vs/base/test/common/utils.ts · 107 LOCcommon/utils.tssrc/vs/nls.ts · 244 LOCvs/nls.tssrc/vs/platform/extensions/common/extensions.ts · 570 LOCcommon/extensions.tssrc/vs/platform/instantiation/common/instantiation.ts · 130 LOCcommon/instantiation.tssrc/vs/platform/remote/common/remoteHosts.ts · 109 LOCcommon/remoteHosts.tssrc/vs/workbench/services/extensions/common/extensionDescriptionRegistry.ts · 423 LOCcommon/extensionDescript…cancellation.test|title=CancellationToken None|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/cancellation.test|title=CancellationToken None|occurrence=1cancellation.test|title=…charCode.test|title=CharCode has good values|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1charCode.test|title=Char…lifecycle.test|title=Lifecycle Action bar has broken accessibility #100273|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/lifecycle.test|title=Lifecycle Action bar has broken accessibility #100273|occurrence=1lifecycle.test|title=Lif…lifecycle.test|title=Lifecycle dispose disposable array|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/lifecycle.test|title=Lifecycle dispose disposable array|occurrence=1lifecycle.test|title=Lif…path.test|title=Paths (Node Implementation) path|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1path.test|title=Paths (N…strings.test|title=Strings trimWhitespace|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/strings.test|title=Strings trimWhitespace|occurrence=1strings.test|title=Strin…uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1uri.test|title=URI File …uri.test|title=URI URI#file, win-speciale|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1uri.test|title=URI URI#f…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication creates new entry when none exists|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication creates new entry when none exists|occurrence=1languageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication disposes entries no longer in model|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication disposes entries no longer in model|occurrence=1languageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate IDs with existing entry - fixed version reuses existing|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate IDs with existing entry - fixed version reuses existing|occurrence=1languageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate status IDs - buggy version leaks entry|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate status IDs - buggy version leaks entry|occurrence=1languageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate status IDs - fixed version reuses entry from current update|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate status IDs - fixed version reuses entry from current update|occurrence=1languageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication mixed unique and duplicate IDs|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication mixed unique and duplicate IDs|occurrence=1languageStatusDedupe.tes…languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication reuses existing entry from previous update|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication reuses existing entry from previous update|occurrence=1languageStatusDedupe.tes…extensionDescriptionRegistry.test|title=ExtensionDescriptionRegistry allow removing and adding the same extension at a different version|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/extensions/test/common/extensionDescriptionRegistry.test|title=ExtensionDescriptionRegistry allow removing and adding the same extension at a different version|occurrence=1extensionDescriptionRegi…Focused concept · extensionDescriptionRegistry.ts ×11 · 80 introduced LOCextensionDescriptionRegi…

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 80 introduced LOC across 14 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.ts 70 introduced LOC · 11 ranges

Open complete file

12 export class DeltaExtensionsResult {
13 constructor(
14 > public readonly versionId: number, extensionDescriptionRegistry.ts
15 > public readonly removedDueToLooping: IExtensionDescription[]
16 > ) { }
17 }
18
102
103 public deltaExtensions(toAdd: IExtensionDescription[], toRemove: ExtensionIdentifier[]): DeltaExtensionsResult {
104 > // It is possible that an extension is removed, only to be added again at a different version extensionDescriptionRegistry.ts
105 > // so we will first handle removals
106 > this._extensionDescriptions = removeExtensions(this._extensionDescriptions, toRemove);
107 >
108 > // Then, handle the extensions to add
109 > this._extensionDescriptions = this._extensionDescriptions.concat(toAdd);
110 >
111 > // Immediately remove looping extensions!
112 > const looping = ExtensionDescriptionRegistry._findLoopingExtensions(this._extensionDescriptions);
113 > this._extensionDescriptions = removeExtensions(this._extensionDescriptions, looping.map(ext => ext.identifier));
114 >
115 > this._initialize();
116 > this._versionId++;
117 > this._onDidChange.fire(undefined);
118 > return new DeltaExtensionsResult(this._versionId, looping);
119 > }
120
121 private static _findLoopingExtensions(extensionDescriptions: IExtensionDescription[]): IExtensionDescription[] {
122 > const G = new class { extensionDescriptionRegistry.ts
123 >
124 > private _arcs = new Map<string, string[]>();
125 > private _nodesSet = new Set<string>();
126 > private _nodesArr: string[] = [];
127 >
128 > addNode(id: string): void {
129 if (!this._nodesSet.has(id)) {
130 this._nodesSet.add(id);
149 return [];
150 }
152 > hasOnlyGoodArcs(id: string, good: Set<string>): boolean {
153 const dependencies = G.getArcs(id);
154 for (let i = 0; i < dependencies.length; i++) {
159 return true;
160 }
162 > getNodes(): string[] {
163 > return this._nodesArr;
164 > }
165 > };
166 >
167 > const descs = new ExtensionIdentifierMap<IExtensionDescription>();
168 > for (const extensionDescription of extensionDescriptions) {
169 > descs.set(extensionDescription.identifier, extensionDescription);
170 > if (extensionDescription.extensionDependencies) {
171 > for (const depId of extensionDescription.extensionDependencies) {
172 G.addArc(ExtensionIdentifier.toKey(extensionDescription.identifier), ExtensionIdentifier.toKey(depId));
173 }
175 > }
176 >
177 > // initialize with all extensions with no dependencies.
178 > const good = new Set<string>();
179 > G.getNodes().filter(id => G.getArcs(id).length === 0).forEach(id => good.add(id));
180 >
181 > // all other extensions will be processed below.
182 > const nodes = G.getNodes().filter(id => !good.has(id));
183 >
184 > let madeProgress: boolean;
185 > do {
186 > madeProgress = false;
187 >
188 > // find one extension which has only good deps
189 > for (let i = 0; i < nodes.length; i++) {
190 const id = nodes[i];
191
197 }
198 }
199 > } while (madeProgress); extensionDescriptionRegistry.ts
200 >
201 > // The remaining nodes are bad and have loops
202 > return nodes.map(id => descs.get(id)!);
203 > }
204
205 public containsActivationEvent(activationEvent: string): boolean {
217
218 public getAllExtensionDescriptions(): IExtensionDescription[] {
219 > return this._extensionsArr.slice(0); extensionDescriptionRegistry.ts
220 > }
221
222 public getSnapshot(): ExtensionDescriptionRegistrySnapshot {
418 }
419
420 > function removeExtensions(arr: IExtensionDescription[], toRemove: ExtensionIdentifier[]): IExtensionDescription[] { extensionDescriptionRegistry.ts
421 > const toRemoveSet = new ExtensionIdentifierSet(toRemove);
422 > return arr.filter(extension => !toRemoveSet.has(extension.identifier));
423 > }
src/vs/platform/extensions/common/extensions.ts 10 introduced LOC · 3 ranges

Open complete file

447
448 constructor(iterable?: Iterable<ExtensionIdentifier | string>) {
449 > if (iterable) { extensions.ts
450 > for (const value of iterable) {
451 > this.add(value);
452 > }
453 > }
454 > }
455
456 public add(id: ExtensionIdentifier | string): void {
457 > this._set.add(ExtensionIdentifier.toKey(id)); extensions.ts
458 > }
459
460 public delete(extensionId: ExtensionIdentifier): boolean {
463
464 public has(id: ExtensionIdentifier | string): boolean {
465 > return this._set.has(ExtensionIdentifier.toKey(id)); extensions.ts
466 > }
467 }
468