Skip to content

Missing compatibility for plugins that don't declare any outputs in swiftbuild #8794

Open
@cmcgee1024

Description

@cmcgee1024

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

The native build system has a compatibility mode for when the swift tools is < 5.11 so that it emits a warning, and doesn't run the plugin, which matches the behaviour in older toolchains. With the swiftbuild build system, the plugin is always run in spite of the swift tools version, even if it has no outputs.

There is a test case PluginTests.testBuildToolWithoutOutputs that reproduces this scenario and can be used to test the correct behaviour.

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

No response

Swift Package Manager version/commit hash

No response

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

No response

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