Skip to content

Regression: Binary artifacts in C++ targets break the build planning phase. #8055

@furby-tm

Description

@furby-tm

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

Important

This is only a regression in the development main branch, not in the official release. In the following I refer to the main branch of SwiftPM, the swift-build executable built with swift build -c release by the alias swiftpmdev.

Running swift build (debug or release) can no longer resolve binary artifacts in package dependencies, with an error message like the following:

error: InternalError(description: "Internal error. Please file a bug at https://github.com/swiftlang/swift-package-manager/issues with this info. unknown module: <ResolvedModule: Python, binary>")

Tip

This can only be reproduced within C++ targets within SwiftPM Package manifests, Swift targets remain unaffected.

Expected behavior

Running swift build (debug or release) should have no problems resolving binary artifacts in package dependencies, as all versions of Swift 5.9 - Swift 6.0 did not experience this issue.

$ git clone git@github.com:wabiverse/SwiftPMBinaryTargetRegression.git
$ cd SwiftPMBinaryTargetRegression

$ swift build
Building for debugging...

Actual behavior

Running swift build (debug or release) now has problems resolving binary artifacts in C++ package dependencies, as of Swift 6.1.0-dev.

$ git clone git@github.com:wabiverse/SwiftPMBinaryTargetRegression.git
$ cd SwiftPMBinaryTargetRegression

$ swiftpmdev build
error: InternalError(description: "Internal error. Please file a bug at https://github.com/swiftlang/swift-package-manager/issues with this info. unknown module: <ResolvedModule: Python, binary>")

Steps to reproduce

  1. Run the following in your terminal against the main branch of SwiftPM:

    git clone git@github.com:wabiverse/SwiftPMBinaryTargetRegression.git
    cd SwiftPMBinaryTargetRegression
    
    swiftpmdev build
  2. Notice the error when resolving binary artifacts.

    error: InternalError(description: "Internal error. Please file a bug at https://github.com/swiftlang/swift-package-manager/issues with this info. unknown module: <ResolvedModule: Python, binary>")

Compare this with the release version of SwiftPM:

  1. Run the following in your terminal against the Swift Release of SwiftPM:

    git clone git@github.com:wabiverse/SwiftPMBinaryTargetRegression.git
    cd SwiftPMBinaryTargetRegression
    
    swift build
  2. Notice there is no error when resolving binary artifacts.

Swift Package Manager version/commit hash

Swift Package Manager - Swift 6.1.0-dev/4095b90

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

swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx15.0
Darwin wabitwo.local 24.0.0 Darwin Kernel Version 24.0.0: Mon Aug 12 21:29:00 PDT 2024; root:xnu-11215.1.10~5/RELEASE_ARM64_T6000 arm64

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions