Skip to content

Commit 512ddff

Browse files
authored
Merge pull request #25248 from nkcsgexi/api-digester-clean
swift-api-digester: teach the tool to directly compare two module interfaces
2 parents 6a2123f + d405fcd commit 512ddff

File tree

11 files changed

+264
-262
lines changed

11 files changed

+264
-262
lines changed
Lines changed: 86 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,107 @@
11

22
/* Generic Signature Changes */
3-
cake1: Func P1.P1Constraint() has generic signature change from <τ_0_0 where τ_0_0 : P1, τ_0_0 : P2> to <τ_0_0 where τ_0_0 : P1>
4-
cake1: Protocol P3 has generic signature change from <τ_0_0 : cake.P1, τ_0_0 : cake.P2> to <τ_0_0 : cake.P1, τ_0_0 : cake.P4>
3+
cake: Func P1.P1Constraint() has generic signature change from <τ_0_0 where τ_0_0 : P1, τ_0_0 : P2> to <τ_0_0 where τ_0_0 : P1>
4+
cake: Protocol P3 has generic signature change from <τ_0_0 : cake.P1, τ_0_0 : cake.P2> to <τ_0_0 : cake.P1, τ_0_0 : cake.P4>
55

66
/* RawRepresentable Changes */
77

88
/* Removed Decls */
99
Swift: Extension Int has been removed
10-
cake1: Accessor GlobalVarChangedToLet.Set() has been removed
11-
cake1: Accessor RemoveSetters.Value.Set() has been removed
12-
cake1: AssociatedType RequiementChanges.removedType has been removed
13-
cake1: Class C3 has been removed
14-
cake1: Constructor Somestruct2.init(_:) has been removed
15-
cake1: Func C4.foo() has been removed
16-
cake1: Func RequiementChanges.removedFunc() has been removed
17-
cake1: Subscript RemoveSetters.subscript(_:) has removed its setter
18-
cake1: Var GlobalVarChangedToLet has removed its setter
19-
cake1: Var RemoveSetters.Value has removed its setter
20-
cake1: Var RequiementChanges.removedVar has been removed
10+
cake: Accessor GlobalVarChangedToLet.Set() has been removed
11+
cake: Accessor RemoveSetters.Value.Set() has been removed
12+
cake: AssociatedType RequiementChanges.removedType has been removed
13+
cake: Class C3 has been removed
14+
cake: Constructor Somestruct2.init(_:) has been removed
15+
cake: Func C4.foo() has been removed
16+
cake: Func RequiementChanges.removedFunc() has been removed
17+
cake: Subscript RemoveSetters.subscript(_:) has removed its setter
18+
cake: Var GlobalVarChangedToLet has removed its setter
19+
cake: Var RemoveSetters.Value has removed its setter
20+
cake: Var RequiementChanges.removedVar has been removed
2121

2222
/* Moved Decls */
23-
cake1: Class ClassToStruct has been changed to a Struct
24-
cake1: InfixOperator ..*.. has been changed to a PrefixOperator
25-
cake1: Protocol ProtocolToEnum has been changed to a Enum
23+
cake: Class ClassToStruct has been changed to a Struct
24+
cake: InfixOperator ..*.. has been changed to a PrefixOperator
25+
cake: Protocol ProtocolToEnum has been changed to a Enum
2626

2727
/* Renamed Decls */
28-
cake1: Func S1.foo5(x:y:) has been renamed to Func foo5(x:y:z:)
29-
cake1: Struct Somestruct2 has been renamed to Struct NSSomestruct2
28+
cake: Func S1.foo5(x:y:) has been renamed to Func foo5(x:y:z:)
29+
cake: Struct Somestruct2 has been renamed to Struct NSSomestruct2
3030

3131
/* Type Changes */
32-
cake1: AssociatedType AssociatedTypePro.T3 has default type change from C1 to C6
33-
cake1: Class TChangesFromIntToString has type witness type for AssociatedTypesProtocol.T changing from Int to String
34-
cake1: Constructor S1.init(_:) has parameter 0 type change from Int to Double
35-
cake1: Func C1.foo2(_:) has parameter 0 type change from Int to () -> ()
36-
cake1: Func C7.foo(_:_:) has removed default argument from parameter 0
37-
cake1: Func C7.foo(_:_:) has removed default argument from parameter 1
38-
cake1: Func EscapingFunctionType.addedEscaping(_:) has added @escaping in parameter 0
39-
cake1: Func EscapingFunctionType.removedEscaping(_:) has removed @escaping in parameter 0
40-
cake1: Func Somestruct2.foo1(_:) has parameter 0 type change from C3 to C1
41-
cake1: Func ownershipChange(_:_:) has parameter 0 changing from InOut to Default
42-
cake1: Func ownershipChange(_:_:) has parameter 1 changing from Shared to Owned
32+
cake: AssociatedType AssociatedTypePro.T3 has default type change from C1 to C6
33+
cake: Class TChangesFromIntToString has type witness type for AssociatedTypesProtocol.T changing from Int to String
34+
cake: Constructor S1.init(_:) has parameter 0 type change from Int to Double
35+
cake: Func C1.foo2(_:) has parameter 0 type change from Int to () -> ()
36+
cake: Func C7.foo(_:_:) has removed default argument from parameter 0
37+
cake: Func C7.foo(_:_:) has removed default argument from parameter 1
38+
cake: Func EscapingFunctionType.addedEscaping(_:) has added @escaping in parameter 0
39+
cake: Func EscapingFunctionType.removedEscaping(_:) has removed @escaping in parameter 0
40+
cake: Func Somestruct2.foo1(_:) has parameter 0 type change from C3 to C1
41+
cake: Func ownershipChange(_:_:) has parameter 0 changing from InOut to Default
42+
cake: Func ownershipChange(_:_:) has parameter 1 changing from Shared to Owned
4343

4444
/* Decl Attribute changes */
45-
cake1: Class C5 is now without @objc
46-
cake1: Enum IceKind is now without @frozen
47-
cake1: Func C1.foo1() is now not static
48-
cake1: Func C5.dy_foo() is now with dynamic
49-
cake1: Func FinalFuncContainer.NewFinalFunc() is now with final
50-
cake1: Func FinalFuncContainer.NoLongerFinalFunc() is now without final
51-
cake1: Func HasMutatingMethodClone.foo() has self access kind changing from Mutating to NonMutating
52-
cake1: Func S1.foo1() has self access kind changing from NonMutating to Mutating
53-
cake1: Func S1.foo3() is now static
54-
cake1: Func _NoResilientClass.NoLongerFinalFunc() is now without final
55-
cake1: Struct C6 is now with @frozen
56-
cake1: Var C1.CIIns1 changes from weak to strong
57-
cake1: Var C1.CIIns2 changes from strong to weak
58-
cake1: Var GlobalLetChangedToVar changes from let to var
59-
cake1: Var GlobalVarChangedToLet changes from var to let
60-
cake2: Accessor GlobalLetChangedToVar.Set() is a new API without @available attribute
61-
cake2: Accessor fixedLayoutStruct2.BecomeFixedBinaryOrder.Set() is a new API without @available attribute
62-
cake2: AssociatedType RequiementChanges.addedTypeWithDefault is a new API without @available attribute
63-
cake2: AssociatedType RequiementChanges.addedTypeWithoutDefault is a new API without @available attribute
64-
cake2: Class C0 is a new API without @available attribute
65-
cake2: Class C8 is a new API without @available attribute
66-
cake2: Constructor C1.init(_:) is a new API without @available attribute
67-
cake2: EnumElement FrozenKind.AddedCase is a new API without @available attribute
68-
cake2: Func RequiementChanges.addedFunc() is a new API without @available attribute
69-
cake2: Func fixedLayoutStruct.OKChange() is a new API without @available attribute
70-
cake2: Protocol P4 is a new API without @available attribute
71-
cake2: Var RequiementChanges.addedVar is a new API without @available attribute
72-
cake2: Var fixedLayoutStruct.$__lazy_storage_$_lazy_d is a new API without @available attribute
73-
cake2: Var fixedLayoutStruct.c is a new API without @available attribute
45+
cake: Accessor GlobalLetChangedToVar.Set() is a new API without @available attribute
46+
cake: Accessor fixedLayoutStruct2.BecomeFixedBinaryOrder.Set() is a new API without @available attribute
47+
cake: AssociatedType RequiementChanges.addedTypeWithDefault is a new API without @available attribute
48+
cake: AssociatedType RequiementChanges.addedTypeWithoutDefault is a new API without @available attribute
49+
cake: Class C0 is a new API without @available attribute
50+
cake: Class C5 is now without @objc
51+
cake: Class C8 is a new API without @available attribute
52+
cake: Constructor C1.init(_:) is a new API without @available attribute
53+
cake: Enum IceKind is now without @frozen
54+
cake: EnumElement FrozenKind.AddedCase is a new API without @available attribute
55+
cake: Func C1.foo1() is now not static
56+
cake: Func C5.dy_foo() is now with dynamic
57+
cake: Func FinalFuncContainer.NewFinalFunc() is now with final
58+
cake: Func FinalFuncContainer.NoLongerFinalFunc() is now without final
59+
cake: Func HasMutatingMethodClone.foo() has self access kind changing from Mutating to NonMutating
60+
cake: Func RequiementChanges.addedFunc() is a new API without @available attribute
61+
cake: Func S1.foo1() has self access kind changing from NonMutating to Mutating
62+
cake: Func S1.foo3() is now static
63+
cake: Func _NoResilientClass.NoLongerFinalFunc() is now without final
64+
cake: Func fixedLayoutStruct.OKChange() is a new API without @available attribute
65+
cake: Protocol P4 is a new API without @available attribute
66+
cake: Struct C6 is now with @frozen
67+
cake: Var C1.CIIns1 changes from weak to strong
68+
cake: Var C1.CIIns2 changes from strong to weak
69+
cake: Var GlobalLetChangedToVar changes from let to var
70+
cake: Var GlobalVarChangedToLet changes from var to let
71+
cake: Var RequiementChanges.addedVar is a new API without @available attribute
72+
cake: Var fixedLayoutStruct.$__lazy_storage_$_lazy_d is a new API without @available attribute
73+
cake: Var fixedLayoutStruct.c is a new API without @available attribute
7474

75-
/* Fixed-layout Type changes */
76-
cake1: EnumElement FrozenKind.Fixed in a non-resilient type changes position from 1 to 2
77-
cake1: EnumElement FrozenKind.Rigid in a non-resilient type changes position from 2 to 1
78-
cake1: Var fixedLayoutStruct.a in a non-resilient type changes position from 1 to 0
79-
cake1: Var fixedLayoutStruct.b in a non-resilient type changes position from 0 to 1
80-
cake1: Var fixedLayoutStruct2.BecomeFixedBinaryOrder is now a stored property
81-
cake1: Var fixedLayoutStruct2.NoLongerWithFixedBinaryOrder is no longer a stored property
82-
cake2: EnumElement FrozenKind.AddedCase is added to a non-resilient type
83-
cake2: Var fixedLayoutStruct.$__lazy_storage_$_lazy_d is added to a non-resilient type
84-
cake2: Var fixedLayoutStruct.c is added to a non-resilient type
75+
/* Fixed-layout Type Changes */
76+
cake: EnumElement FrozenKind.AddedCase is added to a non-resilient type
77+
cake: EnumElement FrozenKind.Fixed in a non-resilient type changes position from 1 to 2
78+
cake: EnumElement FrozenKind.Rigid in a non-resilient type changes position from 2 to 1
79+
cake: Var fixedLayoutStruct.$__lazy_storage_$_lazy_d is added to a non-resilient type
80+
cake: Var fixedLayoutStruct.a in a non-resilient type changes position from 1 to 0
81+
cake: Var fixedLayoutStruct.b in a non-resilient type changes position from 0 to 1
82+
cake: Var fixedLayoutStruct.c is added to a non-resilient type
83+
cake: Var fixedLayoutStruct2.BecomeFixedBinaryOrder is now a stored property
84+
cake: Var fixedLayoutStruct2.NoLongerWithFixedBinaryOrder is no longer a stored property
8585

86-
/* Conformance changes */
87-
cake1: Func ObjCProtocol.addOptional() is now an optional requirement
88-
cake1: Func ObjCProtocol.removeOptional() is no longer an optional requirement
89-
cake1: Protocol P3 has removed inherited protocol P2
90-
cake1: Struct fixedLayoutStruct has removed conformance to P1
91-
cake2: Class C7 has added a conformance to an existing protocol P1
92-
cake2: Class SuperClassChange has added a conformance to an existing protocol P1
93-
cake2: Protocol P3 has added inherited protocol P4
94-
cake2: Struct fixedLayoutStruct has added a conformance to an existing protocol P2
86+
/* Protocol Conformance Change */
87+
cake: Class C7 has added a conformance to an existing protocol P1
88+
cake: Class SuperClassChange has added a conformance to an existing protocol P1
89+
cake: Func ObjCProtocol.addOptional() is now an optional requirement
90+
cake: Func ObjCProtocol.removeOptional() is no longer an optional requirement
91+
cake: Protocol P3 has added inherited protocol P4
92+
cake: Protocol P3 has removed inherited protocol P2
93+
cake: Struct fixedLayoutStruct has added a conformance to an existing protocol P2
94+
cake: Struct fixedLayoutStruct has removed conformance to P1
9595

9696
/* Protocol Requirement Change */
97-
cake1: Accessor HasMutatingMethodClone.bar.Get() now requires new witness table entry
98-
cake1: AssociatedType AssociatedTypePro.T1 has removed default type Int
99-
cake1: Func HasMutatingMethodClone.foo() now requires new witness table entry
100-
cake2: AssociatedType RequiementChanges.addedTypeWithoutDefault has been added as a protocol requirement
101-
cake2: Func RequiementChanges.addedFunc() has been added as a protocol requirement
102-
cake2: Var RequiementChanges.addedVar has been added as a protocol requirement
97+
cake: Accessor HasMutatingMethodClone.bar.Get() now requires new witness table entry
98+
cake: AssociatedType AssociatedTypePro.T1 has removed default type Int
99+
cake: AssociatedType RequiementChanges.addedTypeWithoutDefault has been added as a protocol requirement
100+
cake: Func HasMutatingMethodClone.foo() now requires new witness table entry
101+
cake: Func RequiementChanges.addedFunc() has been added as a protocol requirement
102+
cake: Var RequiementChanges.addedVar has been added as a protocol requirement
103103

104104
/* Class Inheritance Change */
105-
cake1: Class C4 has changed its super class from OldType to NewType
106-
cake1: Class SubGenericClass has changed its super class from GenericClass<P1> to GenericClass<P2>
107-
cake1: Class SuperClassRemoval has removed its super class C3
105+
cake: Class C4 has changed its super class from OldType to NewType
106+
cake: Class SubGenericClass has changed its super class from GenericClass<P1> to GenericClass<P2>
107+
cake: Class SuperClassRemoval has removed its super class C3

test/api-digester/Outputs/Cake.txt

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
11

22
/* Generic Signature Changes */
3-
cake1: Func P1.P1Constraint() has generic signature change from <Self where Self : P1, Self : P2> to <Self where Self : P1>
4-
cake1: Protocol P3 has generic signature change from <Self : cake.P1, Self : cake.P2> to <Self : cake.P1, Self : cake.P4>
3+
cake: Func P1.P1Constraint() has generic signature change from <Self where Self : P1, Self : P2> to <Self where Self : P1>
4+
cake: Protocol P3 has generic signature change from <Self : cake.P1, Self : cake.P2> to <Self : cake.P1, Self : cake.P4>
55

66
/* RawRepresentable Changes */
77

88
/* Removed Decls */
99
Swift: Extension Int has been removed
10-
cake1: Accessor GlobalVarChangedToLet.Set() has been removed
11-
cake1: Accessor RemoveSetters.Value.Set() has been removed
12-
cake1: AssociatedType RequiementChanges.removedType has been removed
13-
cake1: Constructor Somestruct2.init(_:) has been removed
14-
cake1: Func C4.foo() has been removed
15-
cake1: Func RequiementChanges.removedFunc() has been removed
16-
cake1: Subscript RemoveSetters.subscript(_:) has removed its setter
17-
cake1: Var GlobalVarChangedToLet has removed its setter
18-
cake1: Var RemoveSetters.Value has removed its setter
19-
cake1: Var RequiementChanges.removedVar has been removed
10+
cake: Accessor GlobalVarChangedToLet.Set() has been removed
11+
cake: Accessor RemoveSetters.Value.Set() has been removed
12+
cake: AssociatedType RequiementChanges.removedType has been removed
13+
cake: Constructor Somestruct2.init(_:) has been removed
14+
cake: Func C4.foo() has been removed
15+
cake: Func RequiementChanges.removedFunc() has been removed
16+
cake: Subscript RemoveSetters.subscript(_:) has removed its setter
17+
cake: Var GlobalVarChangedToLet has removed its setter
18+
cake: Var RemoveSetters.Value has removed its setter
19+
cake: Var RequiementChanges.removedVar has been removed
2020

2121
/* Moved Decls */
22-
cake1: Class ClassToStruct has been changed to a Struct
23-
cake1: InfixOperator ..*.. has been changed to a PrefixOperator
24-
cake1: Protocol ProtocolToEnum has been changed to a Enum
22+
cake: Class ClassToStruct has been changed to a Struct
23+
cake: InfixOperator ..*.. has been changed to a PrefixOperator
24+
cake: Protocol ProtocolToEnum has been changed to a Enum
2525

2626
/* Renamed Decls */
27-
cake1: Func S1.foo5(x:y:) has been renamed to Func foo5(x:y:z:)
28-
cake1: Struct Somestruct2 has been renamed to Struct NSSomestruct2
27+
cake: Func S1.foo5(x:y:) has been renamed to Func foo5(x:y:z:)
28+
cake: Struct Somestruct2 has been renamed to Struct NSSomestruct2
2929

3030
/* Type Changes */
31-
cake1: AssociatedType AssociatedTypePro.T3 has default type change from C1 to C6
32-
cake1: Constructor S1.init(_:) has parameter 0 type change from Int to Double
33-
cake1: Func C1.foo2(_:) has parameter 0 type change from Int to () -> ()
34-
cake1: Func C7.foo(_:_:) has removed default argument from parameter 0
35-
cake1: Func C7.foo(_:_:) has removed default argument from parameter 1
36-
cake1: Func ownershipChange(_:_:) has parameter 0 changing from InOut to Default
37-
cake1: Func ownershipChange(_:_:) has parameter 1 changing from Shared to Owned
38-
cake1: TypeAlias TChangesFromIntToString.T has underlying type change from Int to String
31+
cake: AssociatedType AssociatedTypePro.T3 has default type change from C1 to C6
32+
cake: Constructor S1.init(_:) has parameter 0 type change from Int to Double
33+
cake: Func C1.foo2(_:) has parameter 0 type change from Int to () -> ()
34+
cake: Func C7.foo(_:_:) has removed default argument from parameter 0
35+
cake: Func C7.foo(_:_:) has removed default argument from parameter 1
36+
cake: Func ownershipChange(_:_:) has parameter 0 changing from InOut to Default
37+
cake: Func ownershipChange(_:_:) has parameter 1 changing from Shared to Owned
38+
cake: TypeAlias TChangesFromIntToString.T has underlying type change from Int to String
3939

4040
/* Decl Attribute changes */
41-
cake1: Func C1.foo1() is now not static
42-
cake1: Func FinalFuncContainer.NewFinalFunc() is now with final
43-
cake1: Func FinalFuncContainer.NoLongerFinalFunc() is now without final
44-
cake1: Func HasMutatingMethodClone.foo() has self access kind changing from Mutating to NonMutating
45-
cake1: Func S1.foo1() has self access kind changing from NonMutating to Mutating
46-
cake1: Func S1.foo3() is now static
47-
cake1: Var C1.CIIns1 changes from weak to strong
48-
cake1: Var C1.CIIns2 changes from strong to weak
41+
cake: Func C1.foo1() is now not static
42+
cake: Func FinalFuncContainer.NewFinalFunc() is now with final
43+
cake: Func FinalFuncContainer.NoLongerFinalFunc() is now without final
44+
cake: Func HasMutatingMethodClone.foo() has self access kind changing from Mutating to NonMutating
45+
cake: Func S1.foo1() has self access kind changing from NonMutating to Mutating
46+
cake: Func S1.foo3() is now static
47+
cake: Var C1.CIIns1 changes from weak to strong
48+
cake: Var C1.CIIns2 changes from strong to weak
4949

5050
/* Conformance changes */
51-
cake1: Func ObjCProtocol.removeOptional() is no longer an optional requirement
52-
cake1: Protocol P3 has removed inherited protocol P2
53-
cake1: Struct fixedLayoutStruct has removed conformance to P1
54-
cake2: Protocol P3 has added inherited protocol P4
51+
cake: Func ObjCProtocol.removeOptional() is no longer an optional requirement
52+
cake: Protocol P3 has added inherited protocol P4
53+
cake: Protocol P3 has removed inherited protocol P2
54+
cake: Struct fixedLayoutStruct has removed conformance to P1
5555

5656
/* Protocol Requirement Change */
57-
cake1: AssociatedType AssociatedTypePro.T1 has removed default type Int
58-
cake2: AssociatedType RequiementChanges.addedTypeWithoutDefault has been added as a protocol requirement
59-
cake2: Func RequiementChanges.addedFunc() has been added as a protocol requirement
60-
cake2: Var RequiementChanges.addedVar has been added as a protocol requirement
61-
cake1: Accessor ClassWithOpenMember.property.Get() is no longer open for subclassing
57+
cake: AssociatedType AssociatedTypePro.T1 has removed default type Int
58+
cake: AssociatedType RequiementChanges.addedTypeWithoutDefault has been added as a protocol requirement
59+
cake: Func RequiementChanges.addedFunc() has been added as a protocol requirement
60+
cake: Var RequiementChanges.addedVar has been added as a protocol requirement
61+
cake: Accessor ClassWithOpenMember.property.Get() is no longer open for subclassing
6262

6363
/* Class Inheritance Change */
64-
cake1: Class C4 has changed its super class from OldType to NewType
65-
cake1: Class SubGenericClass has changed its super class from GenericClass<P1> to GenericClass<P2>
66-
cake1: Class SuperClassRemoval has removed its super class C3
67-
cake1: Func ClassWithOpenMember.bar() is no longer open for subclassing
68-
cake1: Func ClassWithOpenMember.foo() is no longer open for subclassing
69-
cake1: Var ClassWithOpenMember.property is no longer open for subclassing
64+
cake: Class C4 has changed its super class from OldType to NewType
65+
cake: Class SubGenericClass has changed its super class from GenericClass<P1> to GenericClass<P2>
66+
cake: Class SuperClassRemoval has removed its super class C3
67+
cake: Func ClassWithOpenMember.bar() is no longer open for subclassing
68+
cake: Func ClassWithOpenMember.foo() is no longer open for subclassing
69+
cake: Var ClassWithOpenMember.property is no longer open for subclassing

0 commit comments

Comments
 (0)