emqx / CocoaMQTT

MQTT 5.0 client library for iOS and macOS written in Swift
https://www.emqx.com/en
Other
1.58k stars 413 forks source link

Xcode fails to compile a project that also uses the original CocoaAsyncSocket package through SPM #493

Closed opera-ddrechny closed 1 year ago

opera-ddrechny commented 1 year ago

I use CocoaMQTT and Telegraph in the same project, both installed through SPM. Telegraph uses CocoaAsyncSocket as a dependency, while CocoaMQTT uses a fork – MqttCocoaAsyncSocket. Xcode 14.1 fails to compile the project with the following error:

16. *** DESERIALIZATION FAILURE ***
module 'Telegraph' with full misc version '5.7.1(5.7.1)/Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)'
top-level value not found
Cross-reference to module 'CocoaAsyncSocket'
... GCDAsyncSocketDelegate
Notes:
* There is a matching 'GCDAsyncSocketDelegate' in module 'MqttCocoaAsyncSocket'. If this is imported from clang, please make sure the header is part of a single clang module.