Skip to content

Commit 386e324

Browse files
committed
ci: Disable explicit target dependency import checks for swift versions before Swift 6, due to associated false positive errors. See FB14859516.
1 parent a9691e9 commit 386e324

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/pull_request.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,24 @@ jobs:
1717
name: Unit tests
1818
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
1919
with:
20-
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
21-
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
20+
21+
# NOTE: Aug 5, 2025. We've determined SPM has bugs for `condition: .when(platforms: [.somePlatform])`
22+
# that incorrectly ignore the condition and import anyways for unintended platforms.
23+
#
24+
# See https://github.com/apple/swift-distributed-tracing/actions/runs/16578688393/job/46920025183?pr=174
25+
# for an example of the resulting build failure.
26+
#
27+
# This is documented as a bug in Swift 5.10, resolved in Swift 6.
28+
# See FB14859516.
29+
# See also https://forums.swift.org/t/do-swiftpm-conditional-target-dependencies-work/74047
30+
#
31+
# Given this, the explicit target dependency check is disabled for Swift versions before Swift 6.
32+
33+
# Intentionally disabled:
34+
#
35+
# linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
36+
# linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
37+
2238
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
2339
linux_6_1_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
2440
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"

0 commit comments

Comments
 (0)