Skip to content

Commit c99009f

Browse files
committed
swift-api-digester: sort migration scripts before serializing them.
1 parent 58f7399 commit c99009f

File tree

4 files changed

+79
-252
lines changed

4 files changed

+79
-252
lines changed

test/api-digester/Outputs/apinotes-migrator-gen-revert.json

Lines changed: 13 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,9 @@
22
{
33
"DiffItemKind": "CommonDiffItem",
44
"NodeKind": "Function",
5-
"NodeAnnotation": "TypeRewritten",
6-
"ChildIndex": "1:0",
7-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingAttributes:",
8-
"LeftComment": "AnimalAttributeName",
9-
"RightUsr": "",
10-
"RightComment": "String",
11-
"ModuleName": "APINotesTest"
12-
},
13-
{
14-
"DiffItemKind": "CommonDiffItem",
15-
"NodeKind": "Function",
16-
"NodeAnnotation": "RevertDictionaryKeyUpdate",
5+
"NodeAnnotation": "RevertSimpleStringRepresentableUpdate",
176
"ChildIndex": "1",
18-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingAttributes:",
7+
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(cm)animalStatusSingleAttribute:",
198
"LeftComment": "",
209
"RightUsr": "",
2110
"RightComment": "",
@@ -25,30 +14,8 @@
2514
"DiffItemKind": "CommonDiffItem",
2615
"NodeKind": "Function",
2716
"NodeAnnotation": "TypeRewritten",
28-
"ChildIndex": "1:0",
29-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingAttributes:",
30-
"LeftComment": "AnimalAttributeName",
31-
"RightUsr": "",
32-
"RightComment": "String",
33-
"ModuleName": "APINotesTest"
34-
},
35-
{
36-
"DiffItemKind": "CommonDiffItem",
37-
"NodeKind": "Function",
38-
"NodeAnnotation": "RevertDictionaryKeyUpdate",
3917
"ChildIndex": "1",
40-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingAttributes:",
41-
"LeftComment": "",
42-
"RightUsr": "",
43-
"RightComment": "",
44-
"ModuleName": "APINotesTest"
45-
},
46-
{
47-
"DiffItemKind": "CommonDiffItem",
48-
"NodeKind": "Function",
49-
"NodeAnnotation": "TypeRewritten",
50-
"ChildIndex": "1:0:0",
51-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingOptionalAttributes:",
18+
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(cm)animalStatusSingleAttribute:",
5219
"LeftComment": "AnimalAttributeName",
5320
"RightUsr": "",
5421
"RightComment": "String",
@@ -57,9 +24,9 @@
5724
{
5825
"DiffItemKind": "CommonDiffItem",
5926
"NodeKind": "Function",
60-
"NodeAnnotation": "RevertOptionalDictionaryKeyUpdate",
27+
"NodeAnnotation": "RevertSimpleOptionalStringRepresentableUpdate",
6128
"ChildIndex": "1",
62-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingOptionalAttributes:",
29+
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(cm)animalStatusSingleOptionalAttribute:",
6330
"LeftComment": "",
6431
"RightUsr": "",
6532
"RightComment": "",
@@ -69,8 +36,8 @@
6936
"DiffItemKind": "CommonDiffItem",
7037
"NodeKind": "Function",
7138
"NodeAnnotation": "TypeRewritten",
72-
"ChildIndex": "1:0:0",
73-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingOptionalAttributes:",
39+
"ChildIndex": "1:0",
40+
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(cm)animalStatusSingleOptionalAttribute:",
7441
"LeftComment": "AnimalAttributeName",
7542
"RightUsr": "",
7643
"RightComment": "String",
@@ -79,9 +46,9 @@
7946
{
8047
"DiffItemKind": "CommonDiffItem",
8148
"NodeKind": "Function",
82-
"NodeAnnotation": "RevertOptionalDictionaryKeyUpdate",
49+
"NodeAnnotation": "RevertDictionaryKeyUpdate",
8350
"ChildIndex": "1",
84-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingOptionalAttributes:",
51+
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingAttributes:",
8552
"LeftComment": "",
8653
"RightUsr": "",
8754
"RightComment": "",
@@ -92,7 +59,7 @@
9259
"NodeKind": "Function",
9360
"NodeAnnotation": "TypeRewritten",
9461
"ChildIndex": "1:0",
95-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingAttributesArray:",
62+
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingAttributes:",
9663
"LeftComment": "AnimalAttributeName",
9764
"RightUsr": "",
9865
"RightComment": "String",
@@ -123,9 +90,9 @@
12390
{
12491
"DiffItemKind": "CommonDiffItem",
12592
"NodeKind": "Function",
126-
"NodeAnnotation": "RevertArrayMemberUpdate",
93+
"NodeAnnotation": "RevertOptionalDictionaryKeyUpdate",
12794
"ChildIndex": "1",
128-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingAttributesArray:",
95+
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingOptionalAttributes:",
12996
"LeftComment": "",
13097
"RightUsr": "",
13198
"RightComment": "",
@@ -136,7 +103,7 @@
136103
"NodeKind": "Function",
137104
"NodeAnnotation": "TypeRewritten",
138105
"ChildIndex": "1:0:0",
139-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingOptionalAttributesArray:",
106+
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingOptionalAttributes:",
140107
"LeftComment": "AnimalAttributeName",
141108
"RightUsr": "",
142109
"RightComment": "String",
@@ -164,61 +131,6 @@
164131
"RightComment": "String",
165132
"ModuleName": "APINotesTest"
166133
},
167-
{
168-
"DiffItemKind": "CommonDiffItem",
169-
"NodeKind": "Function",
170-
"NodeAnnotation": "RevertOptionalArrayMemberUpdate",
171-
"ChildIndex": "1",
172-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(im)animalStatusDescriptorByAddingOptionalAttributesArray:",
173-
"LeftComment": "",
174-
"RightUsr": "",
175-
"RightComment": "",
176-
"ModuleName": "APINotesTest"
177-
},
178-
{
179-
"DiffItemKind": "CommonDiffItem",
180-
"NodeKind": "Function",
181-
"NodeAnnotation": "TypeRewritten",
182-
"ChildIndex": "1:0",
183-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(cm)animalStatusSingleOptionalAttribute:",
184-
"LeftComment": "AnimalAttributeName",
185-
"RightUsr": "",
186-
"RightComment": "String",
187-
"ModuleName": "APINotesTest"
188-
},
189-
{
190-
"DiffItemKind": "CommonDiffItem",
191-
"NodeKind": "Function",
192-
"NodeAnnotation": "RevertSimpleOptionalStringRepresentableUpdate",
193-
"ChildIndex": "1",
194-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(cm)animalStatusSingleOptionalAttribute:",
195-
"LeftComment": "",
196-
"RightUsr": "",
197-
"RightComment": "",
198-
"ModuleName": "APINotesTest"
199-
},
200-
{
201-
"DiffItemKind": "CommonDiffItem",
202-
"NodeKind": "Function",
203-
"NodeAnnotation": "RevertSimpleStringRepresentableUpdate",
204-
"ChildIndex": "1",
205-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(cm)animalStatusSingleAttribute:",
206-
"LeftComment": "",
207-
"RightUsr": "",
208-
"RightComment": "",
209-
"ModuleName": "APINotesTest"
210-
},
211-
{
212-
"DiffItemKind": "CommonDiffItem",
213-
"NodeKind": "Function",
214-
"NodeAnnotation": "TypeRewritten",
215-
"ChildIndex": "1",
216-
"LeftUsr": "c:objc(cs)AnimalStatusDescriptor(cm)animalStatusSingleAttribute:",
217-
"LeftComment": "AnimalAttributeName",
218-
"RightUsr": "",
219-
"RightComment": "String",
220-
"ModuleName": "APINotesTest"
221-
},
222134
{
223135
"DiffItemKind": "CommonDiffItem",
224136
"NodeKind": "TypeDecl",

0 commit comments

Comments
 (0)