Skip to content

Commit 39d781a

Browse files
committed
[ci] Enforce Swift strict concurrency during testing
1 parent c62ddd8 commit 39d781a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

script/tool/lib/src/native_test_command.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,10 @@ this command.
564564
extraFlags: <String>[
565565
if (testTarget != null) '-only-testing:$testTarget',
566566
...extraFlags,
567-
if (!_xcodeWarningsExceptions.contains(plugin.directory.basename))
567+
if (!_xcodeWarningsExceptions.contains(plugin.directory.basename)) ...<String>[
568568
'GCC_TREAT_WARNINGS_AS_ERRORS=YES',
569+
r'OTHER_SWIFT_FLAGS=$(inherited) -strict-concurrency=complete',
570+
],
569571
],
570572
);
571573

script/tool/test/native_test_command_test.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,10 @@ void main() {
177177
'Debug',
178178
if (destination != null) ...<String>['-destination', destination],
179179
...extraFlags,
180-
if (treatWarningsAsErrors) 'GCC_TREAT_WARNINGS_AS_ERRORS=YES',
180+
if (treatWarningsAsErrors) ...<String>[
181+
'GCC_TREAT_WARNINGS_AS_ERRORS=YES',
182+
r'OTHER_SWIFT_FLAGS=$(inherited) -strict-concurrency=complete',
183+
],
181184
], package.path);
182185
}
183186

0 commit comments

Comments
 (0)