Skip to content

Adding NonisolatedNonsendingByDefault to one target appears to apply it to all targets #9293

@grynspan

Description

@grynspan

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

I added .enableUpcomingFeature("NonisolatedNonsendingByDefault") to one of Swift Testing's test targets and it appears to have caused the others to be built with the feature enabled (which broke them as they weren't prepared for the change.)

Expected behavior

.enableUpcomingFeature("NonisolatedNonsendingByDefault") affects only to the target it is applied to.

Actual behavior

.enableUpcomingFeature("NonisolatedNonsendingByDefault") appears to affect other test targets, if not all other targets.

Steps to reproduce

  1. git clone [email protected]:swiftlang/swift-testing.git
  2. git checkout jgrynspan/swiftpm-applies-nonisolated-nonsending-to-too-much
  3. swift test --filter Exit

(All tests should pass.)

Swift Package Manager version/commit hash

Apple fork

Swift & OS version (output of swift --version ; uname -a)

Apple fork

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions