Skip to content

Swift Build: Dynamic variant PIF targets are missing from the Aggretate project #8497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
pmattos opened this issue Apr 14, 2025 · 0 comments
Open
1 task done
Labels
bug swift build Changes impacting `swift build`

Comments

@pmattos
Copy link
Contributor

pmattos commented Apr 14, 2025

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

If we include such targets in the "Aggregate" project we hit a bunch of "Unknown multiple commands produce: ..." errors, such as:

error: Multiple commands produce '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage_lto.o'
error: Multiple commands produce '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage_dependency_info.dat'
error: Multiple commands produce '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage Swift Compilation Requirements Finished'
...

As the build artifacts from "PACKAGE-TARGET:Foo" conflicts with those from "PACKAGE-TARGET:Foo-dynamic".

This is extensively documented by this comment in PR #8454.

Swift Package Manager version/commit hash

Waiting for PR #8454 to be merged

Expected behaviour

No response

Actual behaviour

No response

Steps to reproduce

  1. Using macOS.
  2. Clone and check out the version of swift-package-manager from GitHub with Swift Build integration code.
  3. Pick a sample package with a .library product.
  4. Build it using Swift Build explicitly:
swift run swift-build --build-system swiftbuild --package-path /path/to/package-with-lib
  1. Open the generated .build/manifest.pif file.
  2. Note how the "ALL-INCLUDING-TESTS" target does not depend on any of the *-dynamic targets.

Swift Package Manager version/commit hash

NA

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

swift-driver version: 1.125.2 Apple Swift version 6.2 (swiftlang-6.2.0.5.56 clang-1700.3.5.51)
Target: arm64-apple-macosx15.0
Darwin Paulos-MacBook-Pro.local 24.5.0 Darwin Kernel Version 24.5.0: Sat Mar 29 11:59:10 PDT 2025; root:xnu_development-11417.120.87.0.3~5/DEVELOPMENT_ARM64_T6020 arm64
@pmattos pmattos added bug swift build Changes impacting `swift build` labels Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug swift build Changes impacting `swift build`
Projects
None yet
Development

No branches or pull requests

1 participant