Skip to content

Commit d75d0e3

Browse files
authored
Ensure the .whenEmbedded() build setting condition evaluates to false when building for non-Embedded without a fallback condition (#1081)
This fixes an unintended side effect from #1043 where the `SWT_NO_LEGACY_TEST_DISCOVERY` compilation conditional was being applied when building for non-Embedded. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent 78506a5 commit d75d0e3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Package.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,9 @@ extension BuildSettingCondition {
239239
if let nonEmbeddedCondition = nonEmbeddedCondition() {
240240
nonEmbeddedCondition
241241
} else {
242-
// The caller did not supply a fallback.
243-
.when(platforms: [])
242+
// The caller did not supply a fallback. Specify a non-existent platform
243+
// to ensure this condition never matches.
244+
.when(platforms: [.custom("DoesNotExist")])
244245
}
245246
} else {
246247
// Enable unconditionally because the target is Embedded Swift.

0 commit comments

Comments
 (0)