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 1.1.7 preparations #4149

Closed
akarnokd opened this issue Jun 30, 2016 · 5 comments
Closed

Release 1.1.7 preparations #4149

akarnokd opened this issue Jun 30, 2016 · 5 comments

Comments

@akarnokd
Copy link
Member

akarnokd commented Jun 30, 2016

Version 1.1.7 - July 10, 2016 (Maven)

This release has several documentation fixes (AsyncSubject, doOnEach, cache, scan, reduce, backpressure descriptions) and internal cleanups based on tool feedback (code-coverage and PMD).

Warning: behavior change in the time-bound replay() operator: the aging of the values continues after the termination of the source and thus late subscribers no longer get old data. For example, a given just(1).replay(1, TimeUnit.MINUTE) a subscriber subscribing after 2 minutes won't get 1 but only onCompleted.

Warning: behavior change in timestamp() and timeInterval() (no arguments) operators: they now take timing information from the computation scheduler instead of the immediate scheduler. This change now allows hooking these operators' time source.

Warning: the parameter order of Completable.subscribe(onError, onComplete) has been changed to Completable.subscribe(onComplete, onError) to better match the callback order in the other base reactive classes, namely the most significant signal comes first (Observer.onNext, SingleSubscriber.onSuccess, and now CompletableSubscriber.onCompleted).

The new RxJavaHooks API

PR #4007 introduced a new way of hooking into the lifecycle of the base reactive types (Observable, Single, Completable) and the Schedulers. The original RxJavaPlugins' design was too much focused on class-initialization time hooking and didn't properly allow hooking up different behavior after that. There is a reset() available on it but sometimes that doesn't work as expected.

The new class rx.plugins.RxJavaHooks allows changing the hooks at runtime, allowing tests to temporarily hook onto an internal behavior and then un-hook once the test completed.

RxJavaHooks.setOnObservableCreate(s -> {
   System.out.println("Observable created");
   return s;
});

Observable.just(1).subscribe(System.out::println);

RxJavaHooks.reset();
// or
RxJavaHooks.setOnObservableCreate(null);

It is now also possible to override what Schedulers the Schedulers.computation(), .io() and .newThread() returns without the need to fiddle with Schedulers' own reset behavior:

RxJavaHooks.setOnComputationScheduler(current -> Schedulers.immediate());

Observable.just(1).subscribeOn(Schedulers.computation())
.subscribe(v -> System.out.println(Thread.currentThread()));

By default, all RxJavaHooks delegate to the original RxJavaPlugins callbacks so if you have hooks the old way, they still work. RxJavaHooks.reset() resets to this delegation and RxJavaHooks.clear() clears all hooks (i.e., everything becomes a pass-through hook).

API enhancements

  • Pull 3966: Add multi-other withLatestFrom operators.
  • Pull 3720: Add vararg of Subscriptions to composite subscription.
  • Pull 4034: distinctUntilChanged with direct value comparator - alternative.
  • Pull 4036: Added zip function with Observable array.
  • Pull 4020: Add AsyncCompletableSubscriber that exposes unsubscribe().
  • Pull 4011: Deprecate TestObserver, enhance TestSubscriber a bit.
  • Pull 4007: new hook management proposal
  • Pull 3931: add groupBy overload with evictingMapFactory
  • Pull 4140: Change Completable.subscribe(onError, onComplete) to (onComplete, onError)
  • Pull 4154: Ability to create custom schedulers with behavior based on composing operators.

API deprecations

  • Pull 4011: Deprecate TestObserver, enhance TestSubscriber a bit.
  • Pull 4007: new hook management proposal (deprecates some RxJavaPlugins methods).

Performance enhancements

  • Pull 4097: update map() and filter() to implement OnSubscribe directly.
  • Pull 4176: Optimize collect, reduce and takeLast(1)

Bugfixes

  • Pull 4027: fix Completable.onErrorComplete(Func1) not relaying function crash.
  • Pull 4051: fix ReplaySubject anomaly around caughtUp by disabling that optimization.
@artem-zinnatullin
Copy link
Contributor

👍

@stevegury
Copy link
Member

👍

1 similar comment
@zsxwing
Copy link
Member

zsxwing commented Jul 1, 2016

👍

@akarnokd
Copy link
Member Author

akarnokd commented Jul 8, 2016

@zsxwing If I remember correctly, you did regenerate the javadoc for the web the last time. When the release happens, could you do it again?

@akarnokd
Copy link
Member Author

akarnokd commented Jul 9, 2016

Closing via #4184.

@akarnokd akarnokd closed this as completed Jul 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants