Skip to content

Commit b98d8ac

Browse files
authored
Merge pull request swiftlang#101 from apple/assertions
Configure XFAILs for Swift compiler with enabled assertions
2 parents 3ea5d10 + 9e76da6 commit b98d8ac

File tree

2 files changed

+174
-21
lines changed

2 files changed

+174
-21
lines changed

projects.json

+169-19
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,18 @@
145145
},
146146
{
147147
"action": "BuildSwiftPackage",
148-
"configuration": "release"
148+
"configuration": "release",
149+
"xfail": {
150+
"compatibility": {
151+
"3.1": {
152+
"branch": {
153+
"master": "https://bugs.swift.org/browse/SR-6333",
154+
"swift-4.0-branch": "https://bugs.swift.org/browse/SR-6333",
155+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6333"
156+
}
157+
}
158+
}
159+
}
149160
},
150161
{
151162
"action": "TestSwiftPackage"
@@ -771,28 +782,68 @@
771782
"project": "ReactiveExtensions.xcodeproj",
772783
"scheme": "ReactiveExtensions-iOS",
773784
"destination": "generic/platform=iOS",
774-
"configuration": "Release"
785+
"configuration": "Release",
786+
"xfail": {
787+
"compatibility": {
788+
"3.0": {
789+
"branch": {
790+
"master": "https://bugs.swift.org/browse/SR-6335",
791+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
792+
}
793+
}
794+
}
795+
}
775796
},
776797
{
777798
"action": "BuildXcodeProjectScheme",
778799
"project": "ReactiveExtensions.xcodeproj",
779800
"scheme": "ReactiveExtensions-TestHelpers-iOS",
780801
"destination": "generic/platform=iOS",
781-
"configuration": "Release"
802+
"configuration": "Release",
803+
"xfail": {
804+
"compatibility": {
805+
"3.0": {
806+
"branch": {
807+
"master": "https://bugs.swift.org/browse/SR-6335",
808+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
809+
}
810+
}
811+
}
812+
}
782813
},
783814
{
784815
"action": "BuildXcodeProjectScheme",
785816
"project": "ReactiveExtensions.xcodeproj",
786817
"scheme": "ReactiveExtensions-TestHelpers-tvOS",
787818
"destination": "generic/platform=tvOS",
788-
"configuration": "Release"
819+
"configuration": "Release",
820+
"xfail": {
821+
"compatibility": {
822+
"3.0": {
823+
"branch": {
824+
"master": "https://bugs.swift.org/browse/SR-6335",
825+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
826+
}
827+
}
828+
}
829+
}
789830
},
790831
{
791832
"action": "BuildXcodeProjectScheme",
792833
"project": "ReactiveExtensions.xcodeproj",
793834
"scheme": "ReactiveExtensions-tvOS",
794835
"destination": "generic/platform=tvOS",
795-
"configuration": "Release"
836+
"configuration": "Release",
837+
"xfail": {
838+
"compatibility": {
839+
"3.0": {
840+
"branch": {
841+
"master": "https://bugs.swift.org/browse/SR-6335",
842+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
843+
}
844+
}
845+
}
846+
}
796847
}
797848
]
798849
},
@@ -966,7 +1017,17 @@
9661017
"actions": [
9671018
{
9681019
"action": "BuildSwiftPackage",
969-
"configuration": "release"
1020+
"configuration": "release",
1021+
"xfail": {
1022+
"compatibility": {
1023+
"3.1": {
1024+
"branch": {
1025+
"master": "https://bugs.swift.org/browse/SR-6335",
1026+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
1027+
}
1028+
}
1029+
}
1030+
}
9701031
},
9711032
{
9721033
"action": "TestSwiftPackage"
@@ -991,7 +1052,16 @@
9911052
"actions": [
9921053
{
9931054
"action": "BuildSwiftPackage",
994-
"configuration": "release"
1055+
"configuration": "release",
1056+
"xfail": {
1057+
"compatibility": {
1058+
"3.1": {
1059+
"branch": {
1060+
"master": "https://bugs.swift.org/browse/SR-6334"
1061+
}
1062+
}
1063+
}
1064+
}
9951065
},
9961066
{
9971067
"action": "TestSwiftPackage"
@@ -1419,28 +1489,68 @@
14191489
"workspace": "ReactiveCocoa.xcworkspace",
14201490
"scheme": "ReactiveCocoa-macOS",
14211491
"destination": "generic/platform=macOS",
1422-
"configuration": "Release"
1492+
"configuration": "Release",
1493+
"xfail": {
1494+
"compatibility": {
1495+
"3.0": {
1496+
"branch": {
1497+
"master": "https://bugs.swift.org/browse/SR-6335",
1498+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
1499+
}
1500+
}
1501+
}
1502+
}
14231503
},
14241504
{
14251505
"action": "BuildXcodeWorkspaceScheme",
14261506
"workspace": "ReactiveCocoa.xcworkspace",
14271507
"scheme": "ReactiveCocoa-iOS",
14281508
"destination": "generic/platform=iOS",
1429-
"configuration": "Release"
1509+
"configuration": "Release",
1510+
"xfail": {
1511+
"compatibility": {
1512+
"3.0": {
1513+
"branch": {
1514+
"master": "https://bugs.swift.org/browse/SR-6335",
1515+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
1516+
}
1517+
}
1518+
}
1519+
}
14301520
},
14311521
{
14321522
"action": "BuildXcodeWorkspaceScheme",
14331523
"workspace": "ReactiveCocoa.xcworkspace",
14341524
"scheme": "ReactiveCocoa-tvOS",
14351525
"destination": "generic/platform=tvOS",
1436-
"configuration": "Release"
1526+
"configuration": "Release",
1527+
"xfail": {
1528+
"compatibility": {
1529+
"3.0": {
1530+
"branch": {
1531+
"master": "https://bugs.swift.org/browse/SR-6335",
1532+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
1533+
}
1534+
}
1535+
}
1536+
}
14371537
},
14381538
{
14391539
"action": "BuildXcodeWorkspaceScheme",
14401540
"workspace": "ReactiveCocoa.xcworkspace",
14411541
"scheme": "ReactiveCocoa-watchOS",
14421542
"destination": "generic/platform=watchOS",
1443-
"configuration": "Release"
1543+
"configuration": "Release",
1544+
"xfail": {
1545+
"compatibility": {
1546+
"3.0": {
1547+
"branch": {
1548+
"master": "https://bugs.swift.org/browse/SR-6335",
1549+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
1550+
}
1551+
}
1552+
}
1553+
}
14441554
}
14451555
]
14461556
},
@@ -1468,28 +1578,68 @@
14681578
"workspace": "ReactiveSwift.xcworkspace",
14691579
"scheme": "ReactiveSwift-macOS",
14701580
"destination": "generic/platform=macOS",
1471-
"configuration": "Release"
1581+
"configuration": "Release",
1582+
"xfail": {
1583+
"compatibility": {
1584+
"3.0": {
1585+
"branch": {
1586+
"master": "https://bugs.swift.org/browse/SR-6335",
1587+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
1588+
}
1589+
}
1590+
}
1591+
}
14721592
},
14731593
{
14741594
"action": "BuildXcodeWorkspaceScheme",
14751595
"workspace": "ReactiveSwift.xcworkspace",
14761596
"scheme": "ReactiveSwift-iOS",
14771597
"destination": "generic/platform=iOS",
1478-
"configuration": "Release"
1598+
"configuration": "Release",
1599+
"xfail": {
1600+
"compatibility": {
1601+
"3.0": {
1602+
"branch": {
1603+
"master": "https://bugs.swift.org/browse/SR-6335",
1604+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
1605+
}
1606+
}
1607+
}
1608+
}
14791609
},
14801610
{
14811611
"action": "BuildXcodeWorkspaceScheme",
14821612
"workspace": "ReactiveSwift.xcworkspace",
14831613
"scheme": "ReactiveSwift-tvOS",
14841614
"destination": "generic/platform=tvOS",
1485-
"configuration": "Release"
1615+
"configuration": "Release",
1616+
"xfail": {
1617+
"compatibility": {
1618+
"3.0": {
1619+
"branch": {
1620+
"master": "https://bugs.swift.org/browse/SR-6335",
1621+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
1622+
}
1623+
}
1624+
}
1625+
}
14861626
},
14871627
{
14881628
"action": "BuildXcodeWorkspaceScheme",
14891629
"workspace": "ReactiveSwift.xcworkspace",
14901630
"scheme": "ReactiveSwift-watchOS",
14911631
"destination": "generic/platform=watchOS",
1492-
"configuration": "Release"
1632+
"configuration": "Release",
1633+
"xfail": {
1634+
"compatibility": {
1635+
"3.0": {
1636+
"branch": {
1637+
"master": "https://bugs.swift.org/browse/SR-6335",
1638+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6335"
1639+
}
1640+
}
1641+
}
1642+
}
14931643
}
14941644
]
14951645
},
@@ -2045,19 +2195,19 @@
20452195
"master": "rdar://problem/35633455",
20462196
"swift-4.1-branch": "rdar://problem/35633455"
20472197
}
2048-
},
2198+
},
20492199
"3.1": {
20502200
"branch": {
20512201
"master": "rdar://problem/35633455",
20522202
"swift-4.1-branch": "rdar://problem/35633455"
20532203
}
2054-
},
2204+
},
20552205
"4.0": {
20562206
"branch": {
20572207
"master": "rdar://problem/35633455",
2058-
"swift-4.1-branch": "rdar://problem/35633455"
2208+
"swift-4.1-branch": "https://bugs.swift.org/browse/SR-6349"
20592209
}
2060-
}
2210+
}
20612211
}
20622212
}
20632213
},

run

+5-2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def parse_args():
5959
parser.add_argument("--assertions",
6060
help='Build Swift with asserts',
6161
action='store_true')
62+
parser.add_argument("--debug",
63+
help='Build Swift in debug mode',
64+
action='store_true')
6265
parser.add_argument("--test",
6366
help='Only run test actions',
6467
action='store_true')
@@ -174,7 +177,7 @@ def build_swift_toolchain(workspace, args):
174177
if platform.system() == 'Darwin':
175178
build_command = [
176179
os.path.join(workspace, 'swift/utils/build-script'),
177-
'--debug' if args.assertions else '--release',
180+
'--debug' if args.debug else '--release',
178181
'--assertions' if args.assertions else '--no-assertions',
179182
'--build-ninja',
180183
'--llbuild',
@@ -209,7 +212,7 @@ def build_swift_toolchain(workspace, args):
209212
elif platform.system() == 'Linux':
210213
build_command = [
211214
os.path.join(workspace, 'swift/utils/build-script'),
212-
'--debug' if args.assertions else '--release',
215+
'--debug' if args.debug else '--release',
213216
'--assertions' if args.assertions else '--no-assertions',
214217
'--build-ninja',
215218
'--llbuild',

0 commit comments

Comments
 (0)