Skip to content

Commit 50362a5

Browse files
committed
test/abi-checker: run stdlib ABI stability test only when assertions are enabled
We started to diagnose new APIs such as the missing of @available attributes. This diverges the expected change lists for builds with/without assertions enabled because some stdlib symbols are included only when asserts are enabled. We start to require asserts here to make sure the test doesn't fail on no-assertion settings.
1 parent 31b46ee commit 50362a5

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

test/api-digester/Outputs/stability-stdlib-abi.swift.expected

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,35 @@ Constructor __SwiftNativeNSData.init(coder:) is a new API without @available att
99
Constructor __SwiftNativeNSDictionary.init(coder:) is a new API without @available attribute
1010
Constructor __SwiftNativeNSSet.init(coder:) is a new API without @available attribute
1111

12+
// Should be fine, only included in stdlib when assertion is enabled.
13+
Func _collectReferencesInsideObject(_:) is a new API without @available attribute
14+
1215
Func _cos(_:) has been removed
1316
Func _exp(_:) has been removed
1417
Func _exp2(_:) has been removed
18+
19+
// Should be fine, only included in stdlib when assertion is enabled.
20+
Func _loadDestroyTLSCounter() is a new API without @available attribute
21+
1522
Func _log(_:) has been removed
1623
Func _log10(_:) has been removed
1724
Func _log2(_:) has been removed
25+
26+
// Should be fine, only included in stdlib when assertion is enabled.
27+
Func _measureRuntimeFunctionCountersDiffs(objects:_:) is a new API without @available attribute
28+
1829
Func _nearbyint(_:) has been removed
1930
Func _rint(_:) has been removed
2031
Func _sin(_:) has been removed
32+
33+
// Should be fine, only included in stdlib when assertion is enabled.
34+
Protocol _RuntimeFunctionCountersStats is a new API without @available attribute
35+
36+
// Should be fine, only included in stdlib when assertion is enabled.
37+
Struct _GlobalRuntimeFunctionCountersState is a new API without @available attribute
38+
39+
// Should be fine, only included in stdlib when assertion is enabled.
40+
Struct _ObjectRuntimeFunctionCountersState is a new API without @available attribute
41+
42+
// Should be fine, only included in stdlib when assertion is enabled.
43+
Struct _RuntimeFunctionCounters is a new API without @available attribute

test/api-digester/stability-stdlib-abi.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// REQUIRES: OS=macosx
2+
// REQUIRES: asserts
23
// RUN: %empty-directory(%t.tmp)
34
// mkdir %t.tmp/module-cache && mkdir %t.tmp/dummy.sdk
45
// 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 -abi -avoid-location

0 commit comments

Comments
 (0)