Skip to content

swift test --explicit-target-dependency-import-check error runs builds and executes tests even after discovering import error #9431

@ahoppen

Description

@ahoppen

For example, look at the Build / Test phase of https://github.com/swiftlang/swift-syntax/actions/runs/19796166265/job/56716763515?pr=3196.

--explicit-target-dependency-import-check error discovers the following error and prints it right at the start of the log:

error: Target SwiftWarningControl imports another target (SwiftDiagnostics) in the package without declaring it a dependency.

But then it continues to build the project and even execute the tests, which flushes the error all the way to the top of the log, making it hard to spot. I would propose that --explicit-target-dependency-import-check error should stop the build / test execution after discovering an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions