Skip to content

Commit 76213d8

Browse files
committed
Pass -explicit-target-dependency-import-check error when building swift-syntax
This should catch missing imports such as swiftlang#3195
1 parent 44ece85 commit 76213d8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.github/workflows/pull_request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
2020
with:
2121
enable_wasm_sdk_build: true
22+
linux_build_command: "swift test --explicit-target-dependency-import-check error"
23+
windows_build_command: "Invoke-Program swift test --explicit-target-dependency-import-check error"
2224
soundness:
2325
name: Soundness
2426
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main

SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/common/SwiftPMBuilder.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ struct SwiftPMBuilder {
9292
if warningsAsErrors {
9393
args += ["-Xswiftc", "-warnings-as-errors"]
9494
}
95+
args += ["--explicit-target-dependency-import-check", "error"]
9596

9697
if release {
9798
args += ["--configuration", "release"]

0 commit comments

Comments
 (0)