Closed SocialTermite closed 4 years ago
https://github.com/SocialTermite/Magnificent-Sun - In this repo and commit Another refactoring + unit tests (4d821f8) you can reproduce this error
@SocialTermite were you able to find a solution for this or not yet? I'm having the exact same issue as you described.
Are you using a Static Library in both these scenarios? Did you attempt linking as dynamic library in CocoaPods ?
I have the same issue and the same environment. RxSwift frameworks are built as dynamic libs. Except my error message is failed to demangle superclass of DistinctUntilChangedSink from mangled name '7RxSwift4SinkCyxG'
Any workarounds?
Here's a working example with Carthage with both RxTest an RxBlocking. Can you attempt adding your test to it and see how it's working for you. No issues that I can see:
@SocialTermite any chance your pods are statically linked while your test targets are dynamically linked? I had similar crash, and it got fixed once I dynamically link the pods.
My solution to this problem is to only add it to one library. If I added it to 2 libraries or 1 library and the app, I'll get the crash. Also be sure to check transitive dependencies of other SwiftPM packages all libs that uses RxSwift should be linked to only 1 dynamic library.
This issue is about Carthage. For SPM specific there is a known bug with transitive dependencies, but they haven't fixed it yet: https://bugs.swift.org/browse/SR-12303
I switched to carthage and it works now.
For my case, I have the same error because I didn't include use_frameworks! in my pod file
Short description of the issue:
When I run my unit tests "failed to demangle superclass of MergeSink from mangled name" error appear with crash. It can be other than MergeSink class.
-all_load
tried.Expected outcome:
Work without crash
What actually happens:
When I start unit tests in my main project RxSwift always crash with errors:
failed to demangle superclass of FlatMapSink from mangled name '\^AE
\^B'`, name of the class may be different In small test project error also appears.See call stack .
Self contained code example that reproduces the issue: (1)
(2) in this case not always error above appear but also crash
RxSwift/RxCocoa/RxBlocking/RxTest version/commit
RxSwift (5.0.1) RxBlocking (5.0.1)
Platform/Environment
How easy is to reproduce? (chances of successful reproduce after running the self contained code)
Xcode version:
Installation method: I've tried carthage also.
I have multiple versions of Xcode installed:
Level of RxSwift knowledge: