Skip to content

Conversation

@yuzushioh
Copy link
Member

@freak4pc After I updated RxSwift version to ~> 3.3.0, I came across this Error below that two of the symbols existed in RxSwift 3.0 are missing from 3.3.0. Apps crash when launching. There were apparently some breaking changes in RxSwift, even though it was a minor update. (I'm not sure this issue should be reported to Action or RxSwift)

dyld: lazy symbol binding failed: Symbol not found: __TIFE7RxSwiftPS_14ObservableType2doFT6onNextGSqFzwx1ET__7onErrorGSqFzPs5Error_T__11onCompletedGSqFzT_T__11onSubscribeGSqFT_T__9onDisposeGSqFT_T___GCS_10ObservablewxS1__A_
  Referenced from: /Users/yuzushioh/Library/Developer/CoreSimulator/Devices/0A21E317-EC22-42DB-BFEE-FCA12FC64084/data/Containers/Bundle/Application/30C85070-03A8-40EE-9F36-96221E753330/MyApp.app/Frameworks/Action.framework/Action
  
Expected in: /Users/yuzushioh/Library/Developer/CoreSimulator/Devices/0A21E317-EC22-42DB-BFEE-FCA12FC64084/data/Containers/Bundle/Application/30C85070-03A8-40EE-9F36-96221E753330/MyApp.app/Frameworks/RxSwift.framework/RxSwift

dyld: Symbol not found: __TIFE7RxSwiftPS_14ObservableType2doFT6onNextGSqFzwx1ET__7onErrorGSqFzPs5Error_T__11onCompletedGSqFzT_T__11onSubscribeGSqFT_T__9onDisposeGSqFT_T___GCS_10ObservablewxS1__A_
  Referenced from: /Users/yuzushioh/Library/Developer/CoreSimulator/Devices/0A21E317-EC22-42DB-BFEE-FCA12FC64084/data/Containers/Bundle/Application/30C85070-03A8-40EE-9F36-96221E753330/MyApp.app/Frameworks/Action.framework/Action

  Expected in: /Users/yuzushioh/Library/Developer/CoreSimulator/Devices/0A21E317-EC22-42DB-BFEE-FCA12FC64084/data/Containers/Bundle/Application/30C85070-03A8-40EE-9F36-96221E753330/MyApp.app/Frameworks/RxSwift.framework/RxSwift

Because all the Action users will have the same issue when they update RxSwift to 3.3.0, I think Changing to ~> 3.3.0 would probably be great.

@freak4pc
Copy link
Member

I think you're missing something. The last actual code change on this library was in January from the commit log I'm seeing which is way before 3.3.0 so I hardly believe that is the minimal version. I'll try taking a look but sometimes the missing symbols issue is related to stuff like build cache and derived data so you might want to try and clear those in the meanwhile.

@yuzushioh
Copy link
Member Author

I cleaned all the build cache and derived data and then tried to build it but the same error still occurred.

I looked deeper at those errors and found something which might be the cause. In latest RxSwift release, those errors below occur because of the added parameter to the method do in ObservableType. Parameter onSubscribed was added in the latest release. This change was made between release 3.2.0 and the latest release.

Before (release 3.2.0)

func `do`(onNext: ((E) throws -> Void)? = nil, onError: ((Swift.Error) throws -> Void)? = nil, onCompleted: (() throws -> Void)? = nil, onSubscribe: (() -> ())? = nil, onDispose: (() -> ())? = nil)
        -> Observable<E>

After (release 3.3.0)

 func `do`(onNext: ((E) throws -> Void)? = nil, onError: ((Swift.Error) throws -> Void)? = nil, onCompleted: (() throws -> Void)? = nil, onSubscribe: (() -> ())? = nil, onSubscribed: (() -> ())? = nil, onDispose: (() -> ())? = nil)
        -> Observable<E>

This is kind of huge breaking change for RxSwift and Action users and it is sure that users with RxSwift ~> 3.3.0 will not be able to use the current released one, so I think it would be a good idea to release this change as Action 3.0.0 instead of 2.3.0 so that users with RxSwift ~> 3.0 can use the Action ~> 2.3.0 and ones with RxSwift ~> 3.3.0 can use the Action ~> 3.0.0

If you find any other reasons causing those errors or something, please let me know. Thank you!

@freak4pc
Copy link
Member

Again I'm not 100% sure why that would be breaking since it's an optional argument and would just be skipped. Let me do a quick test later to make sure, but even if that's the change, we should limit to minimum 3.2.0 and not 3.3.0 (the lower the better)

@yuzushioh
Copy link
Member Author

Yes! Thanks for doing the test! I agree with you about that onSubscribed would be skipped because it's optional. This is just my guess but those errors are occurring not when calling it but when finding the method itself in the binary. I will wait for your replay👌🏻

@ashfurrow
Copy link
Member

Hmm, interesting. Agreed, let's test this. I don't have time this week but ping me if I can be of help.

@lamson-dev
Copy link

I'm running into this issue as well. I have to manually set Carthage dependency to use RxSwift 3.2 for Action to work properly...

@yuzushioh
Copy link
Member Author

@Lamson I forked Action and updated RxSwift. yuzushioh#2

@ashfurrow
Copy link
Member

Cool, @yuzushioh can you update this PR? OR should it be merged now? I'll leave the decision up to you!

@yuzushioh
Copy link
Member Author

Hi @ashfurrow
I am merging this PR and releasing it as 2.3.0. I already updated Readme installation section👍

@yuzushioh yuzushioh merged commit 24b40d3 into RxSwiftCommunity:master Apr 15, 2017
@yuzushioh yuzushioh deleted the fix-missing-symbols-issue branch April 15, 2017 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants