Skip to content

Commit 6243b89

Browse files
amcaseymprobst
authored andcommitted
Duplicate GDPR fragment from VS Code repo (microsoft#46625)
* Duplicate GDPR fragment from VS Code repo ...because the tool doesn't handle cross-repro references. * Explain functionality in more detail
1 parent e434155 commit 6243b89

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/server/protocol.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3199,6 +3199,25 @@ namespace ts.server.protocol {
31993199
payload: TypingsInstalledTelemetryEventPayload;
32003200
}
32013201

3202+
// A __GDPR__FRAGMENT__ has no meaning until it is ${include}d by a __GDPR__ comment, at which point
3203+
// the included properties are effectively inlined into the __GDPR__ declaration. In this case, for
3204+
// example, any __GDPR__ comment including the TypeScriptCommonProperties will be updated with an
3205+
// additional version property with the classification below. Obviously, the purpose of such a construct
3206+
// is to reduce duplication and keep multiple use sites consistent (e.g. by making sure that all reflect
3207+
// any newly added TypeScriptCommonProperties). Unfortunately, the system has limits - in particular,
3208+
// these reusable __GDPR__FRAGMENT__s are not accessible across repo boundaries. Therefore, even though
3209+
// the code for adding the common properties (i.e. version), along with the corresponding __GDPR__FRAGMENT__,
3210+
// lives in the VS Code repo (see https://github.com/microsoft/vscode/blob/main/extensions/typescript-language-features/src/utils/telemetry.ts)
3211+
// we have to duplicate it here. It would be nice to keep them in sync, but the only likely failure mode
3212+
// is adding a property to the VS Code repro but not here and the only consequence would be having that
3213+
// property suppressed on the events (i.e. __GDPT__ comments) in this repo that reference the out-of-date
3214+
// local __GDPR__FRAGMENT__.
3215+
/* __GDPR__FRAGMENT__
3216+
"TypeScriptCommonProperties" : {
3217+
"version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
3218+
}
3219+
*/
3220+
32023221
/* __GDPR__
32033222
"typingsinstalled" : {
32043223
"${include}": ["${TypeScriptCommonProperties}"],

0 commit comments

Comments
 (0)