@@ -90,12 +90,25 @@ extension ABI {
90
90
sourceLocation = test. sourceLocation
91
91
id = ID ( encoding: test. id)
92
92
93
+ // Experimental test case encoding: This field was included in v0 with an
94
+ // underscore-prefixed name despite not having been formally proposed, and
95
+ // a prominent client (the VS Code Swift plugin) depends on it. To avoid
96
+ // breaking existing versions of that plugin, continue unconditionally
97
+ // including this field in versions earlier than 6.3 (including v0). In
98
+ // 6.3 and later, don't include it by default but allow opting-in to it
99
+ // via an environment variable. (This is to maintain compatibility until
100
+ // the field has been formally proposed and accepted, and discourage new
101
+ // clients from becoming dependent on it in the mean time.) Finally,
102
+ // in the special experimental version always include this field.
103
+ if isParameterized == true ,
104
+ ( V . versionNumber < ABI . v6_3. versionNumber
105
+ || V . versionNumber >= ABI . ExperimentalVersion. versionNumber
106
+ || Environment . flag ( named: " SWT_ENABLE_EXPERIMENTAL_EVENT_STREAM_TEST_CASE_ENCODING " ) == true ) {
107
+ _testCases = test. uncheckedTestCases? . map ( EncodedTestCase . init ( encoding: ) )
108
+ }
109
+
93
110
// Experimental
94
111
if V . versionNumber >= ABI . ExperimentalVersion. versionNumber {
95
- if isParameterized == true {
96
- _testCases = test. uncheckedTestCases? . map ( EncodedTestCase . init ( encoding: ) )
97
- }
98
-
99
112
let tags = test. tags
100
113
if !tags. isEmpty {
101
114
_tags = tags. map ( String . init ( describing: ) )
0 commit comments