Repository navigation
Summary
ReactiveUI.Primitives 9.0.0 is a major version because the SubscribeSafe operator changes. A lone delegate passed to SubscribeSafe is now the onNext handler, as in System.Reactive.
Why it changed
SubscribeSafehad error-only overloads,SubscribeSafe(onError)andSubscribeSafe(onError, onCompleted), and no onNext-only overload.- So
source.SubscribeSafe(x => Use(x))compiled and bound the lambda as the error handler. - Every value, including the initial one, was silently dropped.
What to change
| 8.x | 9.0 |
|---|---|
source.SubscribeSafe(ex => Log(ex)) |
source.SubscribeSafeErrors(ex => Log(ex)) |
source.SubscribeSafe(ex => Log(ex), () => Done()) |
source.SubscribeSafeErrors(ex => Log(ex), () => Done()) |
source.SubscribeSafe(x => Use(x)) ran Use only on error |
runs Use for every value |
- With a lone onNext handler and no error handler, a source error is rethrown with its original stack.
- The
(onNext, onError)and(onNext, onError, onCompleted)overloads are unchanged. - If you passed one lambda to
SubscribeSafeto handle errors, you now get a compile error, or the lambda receives values. Rename the call toSubscribeSafeErrors.
🗞️ What's Changed
💥 Breaking Changes
- 56523df fix!: make a lone SubscribeSafe delegate the onNext handler (#231) @glennawatson
📦 Dependencies
🔗 Full Changelog: v8.4.0...v9.0.0
🙌 Contributions
💖 Thanks to all the contributors: @glennawatson
🤖 Automated services that contributed: renovate[bot]