Skip to content

Commit a779a16

Browse files
authored
Merge pull request #18811 from nkcsgexi/api-digester-match-kind
swift-api-digester: detect type to type alias change up-front to remove bogus diagnostics.
2 parents b31bd99 + 492a73c commit a779a16

File tree

3 files changed

+165
-64
lines changed

3 files changed

+165
-64
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// REQUIRES: OS=macosx
22
// RUN: %empty-directory(%t.tmp)
33
// mkdir %t.tmp/module-cache && mkdir %t.tmp/dummy.sdk
4-
// RUN: %api-digester -dump-sdk -module Swift -o %t.tmp/current-stdlib.json -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk -swift-version 3
4+
// RUN: %api-digester -dump-sdk -module Swift -o %t.tmp/current-stdlib.json -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk
55
// RUN: %api-digester -diagnose-sdk -input-paths %S/stdlib-stable.json -input-paths %t.tmp/current-stdlib.json >> %t.tmp/changes.txt
66
// RUN: %clang -E -P -x c %S/source-stability.swift.expected -o - | sed '/^\s*$/d' > %t.tmp/source-stability.swift.expected
77
// RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed '/^\s*$/d' > %t.tmp/changes.txt.tmp
88
// RUN: diff -u %t.tmp/source-stability.swift.expected %t.tmp/changes.txt.tmp
99

10-
// REQUIRES: rdar_43425867
Lines changed: 81 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,83 @@
1-
/* FIXME: Bogus */
2-
TypeAlias DictionaryIterator.Element has been removed
3-
TypeAlias SetIterator.Element has been removed
4-
Var DictionaryIterator.customMirror has been removed
5-
Var SetIterator.customMirror has been removed
6-
Func DictionaryIterator.next() has been removed
7-
Func SetIterator.next() has been removed
8-
9-
/* Renamed Decls (FIXME: Targets are Dictionary.Iterator & Set.Iterator) */
10-
Struct DictionaryIterator has been renamed to Struct Iterator
11-
Struct SetIterator has been renamed to Struct Iterator
12-
13-
/* FIXME: Bogus */
1+
2+
/* Generic Signature Changes */
3+
4+
/* RawRepresentable Changes */
5+
6+
/* Removed Decls */
7+
TypeAlias AbsoluteValuable has been removed
8+
TypeAlias BitwiseOperations has been removed (deprecated)
9+
TypeAlias IntMax has been removed
10+
TypeAlias Integer has been removed
11+
TypeAlias IntegerArithmetic has been removed
12+
TypeAlias SignedNumber has been removed
13+
TypeAlias StringProtocol.UTF16Index has been removed (deprecated)
14+
TypeAlias StringProtocol.UTF8Index has been removed (deprecated)
15+
TypeAlias StringProtocol.UnicodeScalarIndex has been removed (deprecated)
16+
TypeAlias UIntMax has been removed
17+
Var FixedWidthInteger.allZeros has been removed (deprecated)
18+
Constructor Int.init(truncatingBitPattern:) has been removed
19+
Constructor Int16.init(truncatingBitPattern:) has been removed
20+
Constructor Int32.init(truncatingBitPattern:) has been removed
21+
Constructor Int8.init(truncatingBitPattern:) has been removed
22+
Constructor String.init(_:obsoletedInSwift4:) has been removed
23+
Constructor UInt.init(truncatingBitPattern:) has been removed
24+
Constructor UInt16.init(truncatingBitPattern:) has been removed
25+
Constructor UInt32.init(truncatingBitPattern:) has been removed
26+
Constructor UInt8.init(truncatingBitPattern:) has been removed
27+
Func BinaryInteger.toIntMax() has been removed
28+
Func FixedWidthInteger.addWithOverflow(_:_:) has been removed
29+
Func FixedWidthInteger.divideWithOverflow(_:_:) has been removed
30+
Func FixedWidthInteger.multiplyWithOverflow(_:_:) has been removed
31+
Func FixedWidthInteger.remainderWithOverflow(_:_:) has been removed
32+
Func FixedWidthInteger.subtractWithOverflow(_:_:) has been removed
33+
Func FloatingPoint.abs(_:) has been removed (deprecated)
34+
Func FloatingPoint.add(_:) has been removed
35+
Func FloatingPoint.adding(_:) has been removed
36+
Func FloatingPoint.divide(by:) has been removed
37+
Func FloatingPoint.divided(by:) has been removed
38+
Func FloatingPoint.multiplied(by:) has been removed
39+
Func FloatingPoint.multiply(by:) has been removed
40+
Func FloatingPoint.negated() has been removed
41+
Func FloatingPoint.subtract(_:) has been removed
42+
Func FloatingPoint.subtracting(_:) has been removed
43+
Func Int.toUIntMax() has been removed
44+
Func Int16.toUIntMax() has been removed
45+
Func Int32.toUIntMax() has been removed
46+
Func Int64.toUIntMax() has been removed
47+
Func Int8.toUIntMax() has been removed
48+
Func Sequence.flatMap(_:) has been removed
49+
Func SignedNumeric.abs(_:) has been removed
50+
Func String.UTF16View.distance(from:to:) has been removed
51+
Func String.UTF16View.index(_:offsetBy:) has been removed
52+
Func String.UTF16View.index(after:) has been removed
53+
Func String.UTF8View.distance(from:to:) has been removed
54+
Func String.UTF8View.index(_:offsetBy:) has been removed
55+
Func String.UTF8View.index(after:) has been removed
56+
Func String.UnicodeScalarView.distance(from:to:) has been removed
57+
Func String.UnicodeScalarView.index(_:offsetBy:) has been removed
58+
Func String.UnicodeScalarView.index(after:) has been removed
59+
Func String.UnicodeScalarView.popFirst() has been removed (deprecated)
60+
Func String.popFirst() has been removed (deprecated)
61+
Func UInt.toIntMax() has been removed
62+
Func UInt16.toIntMax() has been removed
63+
Func UInt32.toIntMax() has been removed
64+
Func UInt64.toIntMax() has been removed
65+
Func UInt8.toIntMax() has been removed
66+
Func UnsignedInteger.toUIntMax() has been removed
67+
68+
/* Moved Decls */
69+
70+
/* Renamed Decls */
71+
Func Dictionary.filter(_:obsoletedInSwift4:) has been renamed to Func Dictionary.filter(_:)
72+
Func Set.filter(_:obsoletedInSwift4:) has been renamed to Func Set.filter(_:)
73+
74+
/* Type Changes */
75+
Var Dictionary.keys has declared type change from LazyMapCollection<[Key : Value], Key> to Dictionary<Key, Value>.Keys
76+
Var Dictionary.values has declared type change from LazyMapCollection<[Key : Value], Value> to Dictionary<Key, Value>.Values
77+
Constructor String.init(_:) has return type change from String? to String
78+
Func Dictionary.filter(_:obsoletedInSwift4:) has return type change from [Dictionary<Key, Value>.Element] to [Dictionary<Key, Value>.Key : Dictionary<Key, Value>.Value]
1479
Func Dictionary.makeIterator() has return type change from DictionaryIterator<Dictionary<Key, Value>.Key, Dictionary<Key, Value>.Value> to Dictionary<Key, Value>.Iterator
80+
Func Set.filter(_:obsoletedInSwift4:) has return type change from [Set<Element>.Element] to Set<Element>
1581
Func Set.makeIterator() has return type change from SetIterator<Element> to Set<Element>.Iterator
82+
83+
/* Decl Attribute changes */

0 commit comments

Comments
 (0)