Navigation Menu

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-14752] Receiving runtime warnings about duplicated dependencies while trying to integrate framework with @_implementationOnly imports #4414

Open
swift-ci opened this issue Jun 9, 2021 · 1 comment
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Jun 9, 2021

Previous ID SR-14752
Radar rdar://problem/79408491
Original Reporter nominalista (JIRA User)
Type Bug

Attachment: Download

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

md5: 9c3ff78d447f1a6573893220d6293642

Issue Description:

Let's consider two projects:
MyFramework - which is a binary framework that has dependency on A (e.g. Alamofire).
MyApp - which is an app that has dependency on MyFramework and also on A (e.g. Alamofire).

MyFramework uses Swift Package Manager to add A as a dependency and it uses `@_implementationOnly` imports for A. Now we build this framework as a XCFramework and we add it as a dependency to MyApp. During runtime we receive following warnings about A:

`Class XXX is implemented in both X and Y. One of the two will be used. Which one is undefined.`

I assume that SPM should be statically linking A into MyFramework and there shouldn't be any warnings during runtime. Please see the attachments to reproduce this issue. MyFramework project contains a build script that was used to generate XCFramework.

@typesanitizer
Copy link

@swift-ci create

@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
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

3 participants