You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AutoDispose's primary API is now via static autoDisposable() methods on the AutoDispose class. The previous to() based APIs are now completely deprecated, and will be removed in AutoDispose 1.0.
This has been sort of the long-standing ideal API for AutoDispose for awhile, but wasn't possible until the introduction of the new as() operator in RxJava. As this operator is still not marked as stable (and won't until RxJava 2.2.0), AutoDispose will not be updated to 1.0 until then.
The main difference is that you no longer have to specify the type indirection, and the returned converter is applicable for all 5 RxJava types. In use, it looks like this:
There are three overloads for autoDisposable(), for each of the three scope types (Maybe, ScopeProvider, and LifecycleScopeProvider).
The Kotlin bindings have also been updated to match semantics, with the autoDisposeWith extension functions being deprecated in favor of analogous autoDisposable. These are WARNING level in this release, and will become ERROR in AutoDispose 0.6.0, before finally being removed in 1.0. They also provide replaceWith options (compatible with Kotlin's deprecation quickfixes).
autoDisposable reads best when statically imported (so you can do .as(autoDisposable(...)), which you can safely do if you're using Java 8.
TODO Provide structural replaces.
Fixed a lot of concurrency edge cases and performance improvements after review from David Karnok (#138 and #130)
David Karnok (@akarnokd, RxJava project lead) did an audit of the current codebase and gave extensive feedback in #130. #138 implements that feedback. This handled a lot of concurrency gotchas and edge cases we were missing before. See the issue and PR for full details.
Plugin for controlling whether or not to fill in stacktraces (#124)
AutoDisposePlugins has a new API to control whether or not lifecycle exception stacktraces are filled in. What this means is that if you opt out, the exceptions thrown in LifecycleScopeProvider boundary issues will no longer have a stacktrace (getStacktrace() will return an empty array) and only carry the type name and message. This can be useful to gain some performance if you track stacktracing via other means.
ScopeProvider has a static instance of an "unbound" provider directly in the interface now for reuse. This obviates the need for TestScopeProvider#unbound(), which has been removed. Usage is simple:
delegateObserver() APIs on AutoDisposing observers have been promoted to stable. Considering they are useful for subscribeWith(), we can just keep it observer-based and keep the library more flexible long-term (Final touchups for 0.5.0 release #144)
WIP notes for changelog when we release, which should be soooooonish
New converter-based API for use with as() (#141)
AutoDispose's primary API is now via static
autoDisposable()
methods on theAutoDispose
class. The previousto()
based APIs are now completely deprecated, and will be removed in AutoDispose 1.0.This has been sort of the long-standing ideal API for AutoDispose for awhile, but wasn't possible until the introduction of the new
as()
operator in RxJava. As this operator is still not marked as stable (and won't until RxJava 2.2.0), AutoDispose will not be updated to 1.0 until then.The main difference is that you no longer have to specify the type indirection, and the returned converter is applicable for all 5 RxJava types. In use, it looks like this:
There are three overloads for
autoDisposable()
, for each of the three scope types (Maybe
,ScopeProvider
, andLifecycleScopeProvider
).The Kotlin bindings have also been updated to match semantics, with the
autoDisposeWith
extension functions being deprecated in favor of analogousautoDisposable
. These areWARNING
level in this release, and will becomeERROR
in AutoDispose 0.6.0, before finally being removed in 1.0. They also providereplaceWith
options (compatible with Kotlin's deprecation quickfixes).autoDisposable
reads best when statically imported (so you can do.as(autoDisposable(...))
, which you can safely do if you're using Java 8.TODO Provide structural replaces.
Fixed a lot of concurrency edge cases and performance improvements after review from David Karnok (#138 and #130)
David Karnok (@akarnokd, RxJava project lead) did an audit of the current codebase and gave extensive feedback in #130. #138 implements that feedback. This handled a lot of concurrency gotchas and edge cases we were missing before. See the issue and PR for full details.
Plugin for controlling whether or not to fill in stacktraces (#124)
AutoDisposePlugins
has a new API to control whether or not lifecycle exception stacktraces are filled in. What this means is that if you opt out, the exceptions thrown inLifecycleScopeProvider
boundary issues will no longer have a stacktrace (getStacktrace()
will return an empty array) and only carry the type name and message. This can be useful to gain some performance if you track stacktracing via other means.UNBOUND shorthand (#125)
ScopeProvider
has a static instance of an "unbound" provider directly in the interface now for reuse. This obviates the need forTestScopeProvider#unbound()
, which has been removed. Usage is simple:Misc
as()
) (Implement new as-based API #141)subscribeBy
example extension in the sample app displaying how you can add extension functions to the*SubscribeProxy
classes. (Add subscribeBy extensions for proxy classes. #127)delegateObserver()
APIs onAutoDisposing
observers have been promoted to stable. Considering they are useful forsubscribeWith()
, we can just keep it observer-based and keep the library more flexible long-term (Final touchups for 0.5.0 release #144)Thanks to the following contributors! @charlesdurham @ajalt @tbsandee @akarnokd
The text was updated successfully, but these errors were encountered: