Skip to content

SwiftPM should only build direct dependencies of a test target as @testable  #7718

Open
@rauhul

Description

@rauhul

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

Given graph A -> B -> BTests. BTests should not be able to testable import A. See the attached repro project. repro.zip

The issue with the current behavior is the following graph causes a huge amount of code to be rebuilt with no value: swift-syntax -> MMIOMacros -> MMIOMacrosTests

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugswift testChanges impacting `swift test` tool

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions