Skip to content

PackageCommandSwiftBuildTest.testCommandPluginCompilationError does not raise a compilation error #8977

@bkhouri

Description

@bkhouri

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 PackageCommandSwiftBuildTest.testCommandPluginCompilationError does as swift build --build-system swiftbuild against a package that has a Command Plugin, which has a compilation error.

However, the test does not throw an error when using the SwiftBuild backend, but it does when using the native build system.

Expected behavior

Building the sample project using the SwiftBuild build system either fails in a similar manner as the Native build system.

Actual behavior

No error is thrown.

Steps to reproduce

  1. Clone the repository
  2. Run the following and expect a non-zero return code
    swift run swift-build  --build-system swiftbuild --package-path Fixtures/Miscellaneous/Plugins/CommandPluginUnsuccessful                         
    

Swift Package Manager version/commit hash

5c57a39a3cecc865dfdecbbfae0f62cc13780e00

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

Observed on MacOS and linux

❯ uname -a
Darwin BKs-Work-M1Pro-MacBook-Pro-3.local 25.0.0 Darwin Kernel Version 25.0.0: Sat Jul 12 00:30:16 PDT 2025; root:xnu_development-12377.0.154.0.2~25/DEVELOPMENT_ARM64_T6000 arm64

and

build-user@a73e2eb7c3de:/source$ uname -a
Linux a73e2eb7c3de 6.1.68 #1 SMP Fri Nov 22 18:05:17 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugswift buildChanges impacting `swift build`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions