RxSwiftCommunity / RxSwiftExt

A collection of Rx operators & tools not found in the core RxSwift distribution
MIT License
1.33k stars 213 forks source link

Simpify filterMap implementation, add throws to transform closure signature #214

Closed M0rtyMerr closed 5 years ago

freak4pc commented 5 years ago

I'm not 100% sure we can make the closure throwing. It breaks backwards compatibility ... we might want to leave it as is until we bump a major version.

M0rtyMerr commented 5 years ago

I trust your experience, so if u think we have to leave - let's leave. But user could use .filterMap throwing version without changing his code. If you aware that someone will want downgrade RxSwiftExt version from throwing to non-throwing version - I can add throwing version as overload with later deprecation if original one(non-throwing). What do you think? :)

freak4pc commented 5 years ago

I think it will conflict, can you try? (having a secondary overload with only a throw difference).

M0rtyMerr commented 5 years ago

@freak4pc no conflict. Just pushed overload

freak4pc commented 5 years ago

Thought about it some more - let's not do an overload, just add the throws property.

M0rtyMerr commented 5 years ago

Sure, removed overload, change filterMap documentation

M0rtyMerr commented 5 years ago

@freak4pc I added removal of flatMapSync here, cause it related to filterMap implementation

freak4pc commented 5 years ago

I don't think it's necessarily related - can we remove flatMapSync in a separate PR? I mainly want the commits & PRs to be atomic so people can track down the changes backwards.

M0rtyMerr commented 5 years ago

@freak4pc ok, reverted, will open separate PR

freak4pc commented 5 years ago

I'd want @jdisho to confirm he's OK with this as well, as long as he's reviewing here :)