Comments (13)
Any update on fixing this issue? Still unable to add the library via SPM whether using the main
branch or commit SHA or release tag. I either see the error where Xcode says it can’t find the repo or it runs into the “abseil” conflict when I have Firebase-ios dependency.
from nearby.
@bourdakos1 at Monzo we're trying to migrate from the Nearby Messages SDK to this new one and we're hitting the abseil
conflict too. we're using Tuist as a wrapper on SPM to manage our dependencies and the error we get is:
Swift/x86_64-apple-macos.swiftinterface:13577: Fatal error: Duplicate values for key: 'abseil'
Looks like it could be an issue with how the package is defined. Maybe it needs to have a transitive dependency on Firebase and/or abseil
from nearby.
{
"pins" : [
{
"identity" : "abseil-cpp-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/abseil-cpp-binary.git",
"state" : {
"revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c",
"version" : "1.2022062300.0"
}
},
{
"identity" : "appauth-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/openid/AppAuth-iOS.git",
"state" : {
"revision" : "71cde449f13d453227e687458144bde372d30fc7",
"version" : "1.6.2"
}
},
{
"identity" : "brightfutures",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Thomvis/BrightFutures.git",
"state" : {
"revision" : "fa66fa183dce7196d431244d0215748cd14c5758",
"version" : "8.2.0"
}
},
{
"identity" : "bugfendersdk-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/bugfender/BugfenderSDK-iOS",
"state" : {
"revision" : "d15edbcd5b3bd8d1ab0c0e3511cc30776a5aad52",
"version" : "1.12.1"
}
},
{
"identity" : "erik",
"kind" : "remoteSourceControl",
"location" : "https://github.com/phimage/Erik.git",
"state" : {
"revision" : "109a130e9cdb00789a43a7a625293eeb12d22989",
"version" : "5.1.0"
}
},
{
"identity" : "facebook-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/facebook/facebook-ios-sdk",
"state" : {
"revision" : "d001a0509c7051f8e16a0e9646cbde00e2f83ec1",
"version" : "16.1.2"
}
},
{
"identity" : "filekit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/nvzqz/FileKit.git",
"state" : {
"revision" : "9006d2888025fbe893c3c396327b2fe45a8c177b",
"version" : "6.1.0"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk",
"state" : {
"revision" : "e700a8f40c87c31cab7984875fcc1225d96b25bf",
"version" : "10.11.0"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "62e3a0c09a75e2637f5300d46f05a59313f1c286",
"version" : "10.11.0"
}
},
{
"identity" : "googledatatransport",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleDataTransport.git",
"state" : {
"revision" : "98a00258d4518b7521253a70b7f70bb76d2120fe",
"version" : "9.2.4"
}
},
{
"identity" : "googlesignin-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleSignIn-iOS",
"state" : {
"revision" : "7932d33686c1dc4d7df7a919aae47361d1cdfda4",
"version" : "7.0.0"
}
},
{
"identity" : "googleutilities",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git",
"state" : {
"revision" : "58d03d22beae762eaddbd30cb5a61af90d4b309f",
"version" : "7.11.3"
}
},
{
"identity" : "grpc-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/grpc-binary.git",
"state" : {
"revision" : "f1b366129d1125be7db83247e003fc333104b569",
"version" : "1.50.2"
}
},
{
"identity" : "gtm-session-fetcher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : {
"revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd",
"version" : "3.1.1"
}
},
{
"identity" : "gtmappauth",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GTMAppAuth.git",
"state" : {
"revision" : "cee3c709307912d040bd1e06ca919875a92339c6",
"version" : "2.0.0"
}
},
{
"identity" : "hero",
"kind" : "remoteSourceControl",
"location" : "https://github.com/HeroTransitions/Hero",
"state" : {
"revision" : "66a554b21116fccf61b3aa2205a86f6b0cdc9766",
"version" : "1.6.2"
}
},
{
"identity" : "iqkeyboardmanager",
"kind" : "remoteSourceControl",
"location" : "https://github.com/hackiftekhar/IQKeyboardManager",
"state" : {
"revision" : "ea08e08958890043019d248065fe3d825f338087",
"version" : "6.5.12"
}
},
{
"identity" : "kanna",
"kind" : "remoteSourceControl",
"location" : "https://github.com/tid-kijyun/Kanna.git",
"state" : {
"revision" : "f9e4922223dd0d3dfbf02ca70812cf5531fc0593",
"version" : "5.2.7"
}
},
{
"identity" : "keychainaccess",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kishikawakatsumi/KeychainAccess",
"state" : {
"revision" : "84e546727d66f1adc5439debad16270d0fdd04e7",
"version" : "4.2.2"
}
},
{
"identity" : "leveldb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/leveldb.git",
"state" : {
"revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
"version" : "1.22.2"
}
},
{
"identity" : "mkringprogressview",
"kind" : "remoteSourceControl",
"location" : "https://github.com/maxkonovalov/MKRingProgressView",
"state" : {
"revision" : "660888aab1d2ab0ed7eb9eb53caec12af4955fa7",
"version" : "2.3.0"
}
},
{
"identity" : "nanopb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/nanopb.git",
"state" : {
"revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
"version" : "2.30909.0"
}
},
{
"identity" : "nuke",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kean/Nuke",
"state" : {
"revision" : "f67266f176af4add9f7a7020486826d82d562473",
"version" : "12.1.2"
}
},
{
"identity" : "oauthswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/OAuthSwift/OAuthSwift",
"state" : {
"revision" : "d85964b96dbce94df961f28b996187c835089903",
"version" : "2.2.0"
}
},
{
"identity" : "promises",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/promises.git",
"state" : {
"revision" : "ec957ccddbcc710ccc64c9dcbd4c7006fcf8b73a",
"version" : "2.2.0"
}
},
{
"identity" : "rxdatasources",
"kind" : "remoteSourceControl",
"location" : "https://github.com/RxSwiftCommunity/RxDataSources",
"state" : {
"revision" : "90c29b48b628479097fe775ed1966d75ac374518",
"version" : "5.0.2"
}
},
{
"identity" : "rxswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ReactiveX/RxSwift",
"state" : {
"revision" : "9dcaa4b333db437b0fbfaf453fad29069044a8b4",
"version" : "6.6.0"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "f25867a208f459d3c5a06935dceb9083b11cd539",
"version" : "1.22.0"
}
},
{
"identity" : "swifter",
"kind" : "remoteSourceControl",
"location" : "https://github.com/httpswift/swifter.git",
"state" : {
"revision" : "9483a5d459b45c3ffd059f7b55f9638e268632fd",
"version" : "1.5.0"
}
},
{
"identity" : "swiftyuserdefaults",
"kind" : "remoteSourceControl",
"location" : "https://github.com/sunshinejr/SwiftyUserDefaults",
"state" : {
"revision" : "f66bcd04088582c8fbb5cb8554d577e303bae396",
"version" : "5.3.0"
}
},
{
"identity" : "thirdpartymailer",
"kind" : "remoteSourceControl",
"location" : "https://github.com/vtourraine/ThirdPartyMailer",
"state" : {
"revision" : "44c1cfaa6969963f22691aa67f88a69e3b6d651f",
"version" : "2.1.0"
}
}
],
"version" : 2
}
from nearby.
Our SPM package is not versioned. You can either check out main branch or a commit hash
from nearby.
I have now tried to check out the main branch and commit 504ab8a without success.
I get the following error:
"© multiple products named 'abseil' in: 'abseil-cpp-binary', 'abseil-cpp-binary', 'abseil-cpp-swiftpm'"
My project is using Firebase as well, that also includes abseil.
from nearby.
Hmm I'm guessing it's because we are using a fork of the abseil that firebase is using. Do you mind sharing which packages specifically you are using so I can try and reproduce the issue?
from nearby.
I'm having issues adding the firebase-ios-sdk
I keep getting stuck at this screen:
from nearby.
I didn't have any issues adding Firebase to the project. Maybe first add Firebase and then the nearby library.
from nearby.
This may be tricky to resolve. I tried aliasing our C++17 fork of abseil and it fixed the multiple targets named 'abseil'
build error, but if the FirebaseFirestore
product is used, it will result in duplicate symbol linker errors. Using the actual https://github.com/firebase/abseil-cpp-SwiftPM.git
package also doesn't work, because firebase-ios-sdk
actually uses the https://github.com/google/abseil-cpp-binary.git
package by default. Using https://github.com/google/abseil-cpp-binary.git
fixes the multiple targets named 'abseil'
build error, but we can't use the binary, because we build Nearby Connections from source and the abseil binary doesn't have useable headers :/
I'll try building using FIREBASE_SOURCE_FIRESTORE=1
with the https://github.com/firebase/abseil-cpp-SwiftPM.git
package. However, we'll need to make our build compatible with C++14 which may take some time.
If that doesn't work, we could try doing a binary distribution of Nearby Connections.
from nearby.
So, any update on this then? @bourdakos1
from nearby.
I was able to make a bit of progress this weekend. Dynamic linking one of the libraries resolved the duplicate symbol linker errors I was seeing, which was the biggest blocker.
However, any shared dependencies still need to have unique product names and unique repo names. SPM doesn't disambiguate with repos with org names so firebase/abseil-cpp-SwiftPM
and bourdakos1/abseil-cpp-SwiftPM
is a considered a conflict. There aren't any repo name conflicts with Firebase by default, because Firebase uses the binary version of abseil (abseil-cpp-binary
). However, if you build using FIREBASE_SOURCE_FIRESTORE=1
or using an older version of Firebase, you will run into this issue.
As of a few days ago, Firebase updated it's gRPC dependency in a way that it now conflicts with Nearby's use of BoringSSL-GRPC
. This is almost identical to the abseil issue, but in this case we are using the actual Firebase SPM package instead of a fork. The reason for the conflict is due to Firebase using a binary by default, instead of https://github.com/firebase/boringssl-SwiftPM.git. Using the binary version of borinssl or using FIREBASE_SOURCE_FIRESTORE=1
should fix the issue, but not ideal since we'd be locking developers into either building Firebase with the binaries or from source and could easily break in the future.
Going forward, to avoid conflicts with Firebase, I think we'll need to:
Create forks (with unique names) of all the Firebase SPM package repos.Rename all the products in packages to have a more guaranteed unique name (i.e.abseil
->NearbyAbseil
).(We could try usingmoduleAliases
, but I don't think they work with C++ packages)
- UPDATE:
moduleAliases
does seem to work, so we shouldn't need to create extra forks with renaming. - Expose
NearbyConnections
andNearbyConnectionsDynamic
to give developers the option to dynamically link nearby if they are running into duplicate symbol issues.
Alternatively, we could discuss with Firebase on a product name scheme that causes less collisions with source vs binary builds. In theory, postfixing binary products with something like -binary
would resolve the boringssl issue (and abseil, but we already require a fork and would need unique name anyway).
from nearby.
@jose-pay @ugommirikwe @championofblocks Can you try using:
- url:
https://github.com/bourdakos1/nearby.git
- branch:
firebase-testing
And use the NearbyConnectionsDynamic
target?
If that works, I'll submit #2386
from nearby.
Closing, feel free to re-open if the issue persists.
from nearby.
Related Issues (20)
- Wifi Direct for cross platform transferring? HOT 9
- Failed to start discovery with Google Play services 23.34.14 HOT 30
- Memory usage continues to increase when receiving Payload
- Connection upgrade failure on Lenovo Tab M10 leads to constant disconnection HOT 3
- Unsafe dependency error while building an Xcode flutter project HOT 2
- Nearby networking really unstable with a large number of devices
- Nearby share source code HOT 1
- iOS NearbyConnections doesn't work with React Native HOT 7
- Reversing and Attacking Google Nearby HOT 2
- Need the help to activate my Fast Pair project
- Changes in NearbyShare as a result of merging with QuickShare HOT 1
- Device discovering itself after calling stopAdvertising HOT 1
- Entry point for using Connections API in a Windows app HOT 1
- Not able to find "webrtc/api/peer_connection_interface.h" HOT 1
- OnePlus Nord doesn't have any endpoint id, discarding. HOT 23
- Clarification on ultrasonic support HOT 2
- [Nearby Connections] error occurred when trying to send a file containing Non-ASCII values HOT 3
- Issue = invalid custom path 'third_party/protobuf/src' for target 'protobuf' HOT 2
- Fast Initiation - Windows to Android without Google Files app HOT 2
- BLE RSSI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nearby.