Skip to content
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

[SR-15836] Platform Conditionals Don't Apply To Binary Frameworks #4351

Closed
swift-ci opened this issue Feb 8, 2022 · 1 comment
Closed

[SR-15836] Platform Conditionals Don't Apply To Binary Frameworks #4351

swift-ci opened this issue Feb 8, 2022 · 1 comment
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Feb 8, 2022

Previous ID SR-15836
Radar None
Original Reporter brianmichel (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

Xcode Version: 13.2.1 (13C100)

macOS Version: 12.2 Beta (21D5025f)

Swift Version: swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)

Swift Tools Version: 5.5

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: e6abd67669234948227721b2e8fd18e3

duplicates:

  • SR-15196 Binary target required for compilation despite being a conditional dependency

Issue Description:

When attempting to use a platform conditional with a binary framework the conditional doesn't seem to actually apply. There is also an active thread in the forums calling attention to the issue https://forums.swift.org/t/adding-platform-specific-dependency-to-multi-platform-swift-package/49645/7

Steps To Reproduce

1. Clone https://github.com/brianmichel/Marconio/tree/feature/modularize-everything

2. Switch scheme to "AppDelegate"

3. Select any iOS simulator or device from the target device list

4. Build

Expected Result

I expect the library to build as the Sparkle dependency is marked as conditional to macOS.

Actual Result

The library does not build correctly as it seems that there needs to be an iOS version of the framework.

I've also attached the build log from the command line from running the following command, please let me know if there's something else I should be running, but from what I can tell the command line build is completing successfully.

swift build --target AppDelegate -v \
 -Xswiftc "-sdk" \
 -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" \
 -Xswiftc "-target" \
 -Xswiftc "x86_64-apple-ios15.0-simulator"
@swift-ci
Copy link
Contributor Author

swift-ci commented Feb 8, 2022

Comment by Brian Michel (JIRA)

This ticket can be closed as duplicate of SR-15196.

I've found a workaround in breaking apart the different platforms for the targets that I need for the time being. The branch in the description will not contain a broken Package.swift file anymore. Please look at the sample project in the linked Jira ticket.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant