Skip to content

Add explicit target dependency#3195

Merged
bnbarham merged 1 commit intoswiftlang:mainfrom
SimplyDanny:add-explicit-dependency
Dec 2, 2025
Merged

Add explicit target dependency#3195
bnbarham merged 1 commit intoswiftlang:mainfrom
SimplyDanny:add-explicit-dependency

Conversation

@SimplyDanny
Copy link
Copy Markdown
Contributor

This target is reported by --explicit-target-dependency-import-check.

This target is reported by `--explicit-target-dependency-import-check`.
Copy link
Copy Markdown
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. Thank you!

@ahoppen
Copy link
Copy Markdown
Member

ahoppen commented Nov 30, 2025

@swift-ci Please test

ahoppen added a commit to ahoppen/swift-syntax that referenced this pull request Nov 30, 2025
ahoppen added a commit to ahoppen/swift-syntax that referenced this pull request Nov 30, 2025
…ift-syntax

This should catch missing imports such as swiftlang#3195
@ahoppen
Copy link
Copy Markdown
Member

ahoppen commented Nov 30, 2025

Adding this as a CI check in #3196 to catch these issues in the future.

@bnbarham
Copy link
Copy Markdown
Contributor

bnbarham commented Dec 1, 2025

@swift-ci please test Windows platform

@bnbarham bnbarham merged commit d7cde2f into swiftlang:main Dec 2, 2025
36 checks passed
@SimplyDanny SimplyDanny deleted the add-explicit-dependency branch December 2, 2025 06:35
ahoppen added a commit to ahoppen/swift-syntax that referenced this pull request Dec 2, 2025
…ift-syntax

This should catch missing imports such as swiftlang#3195
ahoppen added a commit to ahoppen/swift-syntax that referenced this pull request Dec 4, 2025
…ift-syntax

This should catch missing imports such as swiftlang#3195
ahoppen added a commit to ahoppen/swift-syntax that referenced this pull request Dec 15, 2025
…ift-syntax

This should catch missing imports such as swiftlang#3195
@pyrtsa
Copy link
Copy Markdown

pyrtsa commented Mar 31, 2026

@ahoppen Apparently this PR didn't make it to the latest release 603.0.0, causing builds to still fail when setting --explicit-target-dependency-import-check=error:

$ git clone https://github.com/swiftlang/swift-testing.git && cd swift-testing
$ git checkout 6.3
$ swift build --explicit-target-dependency-import-check=error
[1/1] Planning build
error: Target SwiftWarningControl imports another target (SwiftDiagnostics) in the package without declaring it a dependency.
Building for debugging...
[1/1] Write swift-version--6988338F2F200930.txt
Build complete! (7.96s)

Any chance cherry-picking this fix to release/6.3 for inclusion in 603.0.1?

@SimplyDanny
Copy link
Copy Markdown
Contributor Author

Any chance cherry-picking this fix to release/6.3 for inclusion in 603.0.1?

Done in #3304.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants