Closed 1amageek closed 3 years ago
Ugh, these duplicate symbols are going to be extremely difficult to solve.
It's not currently possible for NIO's existing name-spacing strategy to namespace those symbols as they are not directly called, but instead produced by the C++ runtime. The result is that swift-nio-ssl
and boringSSL-SwiftPM
are fundamentally conflicting: they cannot currently co-exist in the same package.
On Apple platforms this could be solved by placing a dynamic library boundary in the way. On Linux if we could control symbol visibility the same solution would work there (though it's moot given that the Firebase iOS SDK is an iOS SDK). A long-term solution is going to be harder.
The ideal solution would be for there to be a clang feature that would automatically namespace these symbols. That's...quite a lot of work! I'll chat to the boringssl folks and see if we can come up with an alternative solution.
@Lukasa Thanks for the reply. I appreciate your response.
See apple/swift-nio-ssl#269 for a proposed solution.
[REQUIRED] Step 1: Describe your environment
Swift Package Manager
[REQUIRED] Step 2: Describe the problem
When I use grpc-swift and Firestore with SwiftPackageManager, I get the following error.
Steps to reproduce:
let package = Package( name: "SampleProject", platforms: [.iOS(.v10), .macOS(.v10_12), .tvOS(.v10), .watchOS(.v6)], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "SampleProject", targets: ["SampleProject"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: / package url /, from: "1.0.0"), .package(name: "grpc-swift", url: "git@github.com:grpc/grpc-swift.git", .upToNextMajor(from: "1.0.0")), .package(name: "Firebase", url: "git@github.com:firebase/firebase-ios-sdk.git", .upToNextMajor(from: "7.5.0"))
)
import FirebaseFirestore import GRPC
struct SampleProject { var text = "Hello, World!" }