Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release notes for 0.5.0 #129

Closed
ZacSweers opened this issue Nov 10, 2017 · 2 comments
Closed

Release notes for 0.5.0 #129

ZacSweers opened this issue Nov 10, 2017 · 2 comments

Comments

@ZacSweers
Copy link
Collaborator

ZacSweers commented Nov 10, 2017

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 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:

Flowable.just(1)
    .as(autoDisposable(scope))
    .subscribe()

Observable.just(1)
    .as(autoDisposable(scope))
    .subscribe()

Maybe.just(1)
    .as(autoDisposable(scope))
    .subscribe()

Single.just(1)
    .as(autoDisposable(scope))
    .subscribe()

Completable.complete()
    .as(autoDisposable(scope))
    .subscribe()

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.

UNBOUND shorthand (#125)

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:

Observable.just(1)
    .as(autoDisposable(ScopeProvider.UNBOUND))
    .subscribe()

Misc

Thanks to the following contributors! @charlesdurham @ajalt @tbsandee @akarnokd

@ZacSweers
Copy link
Collaborator Author

ZacSweers commented Nov 11, 2017

I'm going to cut this release tonight, and eye 0.5.1 to be based on feedback from #130

Just waiting on that now.

@ZacSweers
Copy link
Collaborator Author

Released!

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

No branches or pull requests

1 participant