Skip to content

Commit 837ca6b

Browse files
authored
3.x: Adjust infrastructure version markers (#6421)
* 3.x: Adjust infrastructure version markers * Do not update the /javadoc yet. * Update "RxJava 2" to "RxJava 3"
1 parent 9a74adf commit 837ca6b

9 files changed

+86
-1363
lines changed

.github/ISSUE_TEMPLATE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Thanks for using RxJava but before you post an issue, please consider the following points:
22

3-
- [ ] Please include the library version number, including the minor and patch version, in the issue text. In addition, if you'd include the major version in the title (such as `2.x`) that would be great.
3+
- [ ] Please include the library version number, including the minor and patch version, in the issue text. In addition, if you'd include the major version in the title (such as `3.x`) that would be great.
44

55
- [ ] If you think you found a bug, please include a code sample that reproduces the problem. Dumping a stacktrace is usually not enough for us.
66

7-
- [ ] RxJava has more than 150 operators, we recommend searching the [javadoc](http://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Observable.html) for keywords of what you try to accomplish.
7+
- [ ] RxJava has more than 150 operators, we recommend searching the [javadoc](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/Observable.html) for keywords of what you try to accomplish.
88

99
- [ ] If you have a question/issue about a library/technology built on top of RxJava (such as Retrofit, RxNetty, etc.), please consider asking a question on StackOverflow first (then maybe on their issue list).
1010

CHANGES.md

+2-1,292
Large diffs are not rendered by default.

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Contributing to RxJava 2.x
1+
# Contributing to RxJava 3.x
22

3-
If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request targeting the branch `2.x`.
3+
If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request targeting the branch `3.x`.
44

55
When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible.
66

77
## License
88

9-
By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/ReactiveX/RxJava/blob/2.x/LICENSE
9+
By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/ReactiveX/RxJava/blob/3.x/LICENSE
1010

1111
All files are released with the Apache 2.0 license.
1212

DESIGN.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## RxJava v2 Design
1+
## RxJava v3 Design
22

3-
This document explains the terminology, principles, contracts, and other aspects of the design of RxJava v2.
3+
This document explains the terminology, principles, contracts, and other aspects of the design of RxJava v3.
44
Its intended audience is the implementers of the library.
55

66
### Terminology & Definitions
@@ -41,7 +41,7 @@ Examples:
4141
- `Observable` (RxJS, Rx.Net, RxJava v1.x without backpressure, RxJava v2).
4242
- Callbacks (the producer calls the function at its convenience).
4343
- IRQ, mouse events, IO interrupts.
44-
- 2.x `Flowable` (with `request(n)` credit always granted faster or in larger quantity than producer).
44+
- 3.x `Flowable` (with `request(n)` credit always granted faster or in larger quantity than producer).
4545
- Reactive Streams `Publisher` (with `request(n)` credit always granted faster or in larger quantity than producer).
4646
- Java 9 `Flow.Publisher` (with `request(n)` credit always granted faster than or in larger quantity than producer).
4747

@@ -53,8 +53,8 @@ Consumer is in charge. Producer has to do whatever it needs to keep up.
5353
Examples:
5454

5555
- `Iterable`.
56-
- 2.x/1.x `Observable` (without concurrency, producer and consumer on the same thread).
57-
- 2.x `Flowable` (without concurrency, producer and consumer on the same thread).
56+
- 3.x/1.x `Observable` (without concurrency, producer and consumer on the same thread).
57+
- 3.x `Flowable` (without concurrency, producer and consumer on the same thread).
5858
- Reactive Streams `Publisher` (without concurrency, producer and consumer on the same thread).
5959
- Java 9 `Flow.Publisher` (without concurrency, producer and consumer on the same thread).
6060

@@ -67,13 +67,13 @@ Examples:
6767

6868
- `Future` & `Promise`.
6969
- `Single` (lazy `Future`).
70-
- 2.x `Flowable`.
70+
- 3.x `Flowable`.
7171
- Reactive Streams `Publisher`.
7272
- Java 9 `Flow.Publisher`.
7373
- 1.x `Observable` (with backpressure).
7474
- `AsyncEnumerable`/`AsyncIterable`.
7575

76-
There is an overhead (performance and mental) for achieving this, which is why we also have the 2.x `Observable` without backpressure.
76+
There is an overhead (performance and mental) for achieving this, which is why we also have the 3.x `Observable` without backpressure.
7777

7878

7979
##### Flow Control
@@ -325,7 +325,7 @@ In the addition of the previous rules, an operator for `Flowable`:
325325

326326
### Creation
327327

328-
Unlike RxJava 1.x, 2.x base classes are to be abstract, stateless and generally no longer wrap an `onSubscribe` callback - this saves allocation in assembly time without limiting the expressiveness. Operator methods and standard factories still live as final on the base classes.
328+
Unlike RxJava 1.x, 3.x base classes are to be abstract, stateless and generally no longer wrap an `onSubscribe` callback - this saves allocation in assembly time without limiting the expressiveness. Operator methods and standard factories still live as final on the base classes.
329329

330330
Instead of the indirection of an `onSubscribe` and `lift`, operators are to be implemented by extending the base classes. For example, the `map`
331331
operator will look like this:
@@ -489,11 +489,11 @@ The final `subscribe` will *not* invoke `cancel`/`dispose` after receiving an `o
489489

490490
### JVM target and source compatibility
491491

492-
The 2.x version will target JDK6+ to let Android users consume the new version of RxJava.
492+
The 3.x version will target JDK6+ to let Android users consume the new version of RxJava.
493493

494494
### Future work
495495

496-
This section contains current design work which needs more discussion and elaboration before it is merged into this document as a stated goal for 2.x.
496+
This section contains current design work which needs more discussion and elaboration before it is merged into this document as a stated goal for 3.x.
497497

498498
#### Custom Observable, Single, Completable, or Flowable
499499

@@ -586,7 +586,7 @@ interface QueueSubscription<T> implements Queue<T>, Subscription {
586586

587587
For performance, the mode is an integer bitflags setup, called early during subscription time, and allows negotiating the fusion mode. Usually, producers can do only one mode and consumers can do both mode. Because fused, intermediate operators attach logic (which is many times user-callback) to the exit point of the queue interface (poll()), it may change the computation location of those callbacks in an unwanted way. The flag `BOUNDARY` is added by consumers indicating that they will consume the queue over an async boundary. Intermediate operators, such as `map` and `filter` then can reject the fusion in such sequences.
588588

589-
Since RxJava 2.x is still JDK 6 compatible, the `QueueSubscription` can't itself default unnecessary methods and implementations are required to throw `UnsupportedOperationException` for `Queue` methods other than the following:
589+
Since RxJava 3.x is still JDK 6 compatible, the `QueueSubscription` can't itself default unnecessary methods and implementations are required to throw `UnsupportedOperationException` for `Queue` methods other than the following:
590590

591591
- `poll()`.
592592
- `isEmpty()`.

README.md

+38-33
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
# RxJava: Reactive Extensions for the JVM
22

3-
<a href='https://travis-ci.org/ReactiveX/RxJava/builds'><img src='https://travis-ci.org/ReactiveX/RxJava.svg?branch=2.x'></a>
4-
[![codecov.io](http://codecov.io/github/ReactiveX/RxJava/coverage.svg?branch=2.x)](https://codecov.io/gh/ReactiveX/RxJava/branch/2.x)
5-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.reactivex.rxjava2/rxjava/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.reactivex.rxjava2/rxjava)
3+
<a href='https://travis-ci.org/ReactiveX/RxJava/builds'><img src='https://travis-ci.org/ReactiveX/RxJava.svg?branch=3.x'></a>
4+
[![codecov.io](http://codecov.io/github/ReactiveX/RxJava/coverage.svg?branch=3.x)](https://codecov.io/gh/ReactiveX/RxJava/branch/3.x)
5+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.reactivex.rxjava3/rxjava/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.reactivex.rxjava3/rxjava)
66

77
RxJava is a Java VM implementation of [Reactive Extensions](http://reactivex.io): a library for composing asynchronous and event-based programs by using observable sequences.
88

99
It extends the [observer pattern](http://en.wikipedia.org/wiki/Observer_pattern) to support sequences of data/events and adds operators that allow you to compose sequences together declaratively while abstracting away concerns about things like low-level threading, synchronization, thread-safety and concurrent data structures.
1010

11-
#### Version 2.x ([Javadoc](http://reactivex.io/RxJava/2.x/javadoc/))
11+
#### Version 3.x ([Javadoc](http://reactivex.io/RxJava/3.x/javadoc/))
1212

1313
- single dependency: [Reactive-Streams](https://github.com/reactive-streams/reactive-streams-jvm)
1414
- continued support for Java 6+ & [Android](https://github.com/ReactiveX/RxAndroid) 2.3+
15-
- performance gains through design changes learned through the 1.x cycle and through [Reactive-Streams-Commons](https://github.com/reactor/reactive-streams-commons) research project.
15+
- fixed API mistakes and many limits of RxJava 2
16+
- intended to be a replacement for RxJava 2 with relatively few binary incompatible changes
1617
- Java 8 lambda-friendly API
17-
- non-opinionated about source of concurrency (threads, pools, event loops, fibers, actors, etc)
18+
- non-opinionated about source of concurrency (threads, pools, event loops, fibers, actors, etc.)
1819
- async or synchronous execution
1920
- virtual time and schedulers for parameterized concurrency
21+
- test and diagnostic support via test schedulers, test consumers and plugin hooks
2022

21-
Version 2.x and 1.x will live side-by-side for several years. They will have different group ids (`io.reactivex.rxjava2` vs `io.reactivex`) and namespaces (`io.reactivex` vs `rx`).
23+
Learn more about RxJava in general on the <a href="https://github.com/ReactiveX/RxJava/wiki">Wiki Home</a>.
2224

23-
See the differences between version 1.x and 2.x in the wiki article [What's different in 2.0](https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0). Learn more about RxJava in general on the <a href="https://github.com/ReactiveX/RxJava/wiki">Wiki Home</a>.
25+
#### Version 2.x
26+
27+
The [2.x version](https://github.com/ReactiveX/RxJava/tree/2.x) will be supported with bugfixes and important documentation updates till
28+
**December 31, 2020**. No new features will be added to 2.x.
2429

2530
#### Version 1.x
2631

@@ -30,13 +35,13 @@ The [1.x version](https://github.com/ReactiveX/RxJava/tree/1.x) is end-of-life a
3035

3136
### Setting up the dependency
3237

33-
The first step is to include RxJava 2 into your project, for example, as a Gradle compile dependency:
38+
The first step is to include RxJava 3 into your project, for example, as a Gradle compile dependency:
3439

3540
```groovy
36-
implementation "io.reactivex.rxjava2:rxjava:2.x.y"
41+
implementation "io.reactivex.rxjava3:rxjava:3.x.y"
3742
```
3843

39-
(Please replace `x` and `y` with the latest version numbers: [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.reactivex.rxjava2/rxjava/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.reactivex.rxjava2/rxjava)
44+
(Please replace `x` and `y` with the latest version numbers: [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.reactivex.rxjava3/rxjava/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.reactivex.rxjava3/rxjava)
4045
)
4146

4247
### Hello World
@@ -70,13 +75,13 @@ Flowable.just("Hello world")
7075

7176
### Base classes
7277

73-
RxJava 2 features several base classes you can discover operators on:
78+
RxJava 3 features several base classes you can discover operators on:
7479

75-
- [`io.reactivex.Flowable`](http://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html): 0..N flows, supporting Reactive-Streams and backpressure
76-
- [`io.reactivex.Observable`](http://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Observable.html): 0..N flows, no backpressure,
77-
- [`io.reactivex.Single`](http://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Single.html): a flow of exactly 1 item or an error,
78-
- [`io.reactivex.Completable`](http://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Completable.html): a flow without items but only a completion or error signal,
79-
- [`io.reactivex.Maybe`](http://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Maybe.html): a flow with no items, exactly one item or an error.
80+
- [`io.reactivex.Flowable`](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/Flowable.html): 0..N flows, supporting Reactive-Streams and backpressure
81+
- [`io.reactivex.Observable`](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/Observable.html): 0..N flows, no backpressure,
82+
- [`io.reactivex.Single`](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/Single.html): a flow of exactly 1 item or an error,
83+
- [`io.reactivex.Completable`](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/Completable.html): a flow without items but only a completion or error signal,
84+
- [`io.reactivex.Maybe`](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/Maybe.html): a flow with no items, exactly one item or an error.
8085

8186
### Some terminology
8287

@@ -193,7 +198,7 @@ Typically, you can move computations or blocking IO to some other thread via `su
193198

194199
### Schedulers
195200

196-
RxJava operators don't work with `Thread`s or `ExecutorService`s directly but with so called `Scheduler`s that abstract away sources of concurrency behind a uniform API. RxJava 2 features several standard schedulers accessible via `Schedulers` utility class.
201+
RxJava operators don't work with `Thread`s or `ExecutorService`s directly but with so called `Scheduler`s that abstract away sources of concurrency behind a uniform API. RxJava 3 features several standard schedulers accessible via `Schedulers` utility class.
197202

198203
- `Schedulers.computation()`: Run computation intensive work on a fixed number of dedicated threads in the background. Most asynchronous operator use this as their default `Scheduler`.
199204
- `Schedulers.io()`: Run I/O-like or blocking operations on a dynamically changing set of threads.
@@ -468,7 +473,7 @@ Flowable<T> concatArrayEagerDelayError(Publisher<? extends T>... sources);
468473

469474
#### Base class vs base type
470475

471-
The base classes can be considered heavy due to the sheer number of static and instance methods on them. RxJava 2's design was heavily influenced by the [Reactive Streams](https://github.com/reactive-streams/reactive-streams-jvm#reactive-streams) specification, therefore, the library features a class and an interface per each reactive type:
476+
The base classes can be considered heavy due to the sheer number of static and instance methods on them. RxJava 3's design was heavily influenced by the [Reactive Streams](https://github.com/reactive-streams/reactive-streams-jvm#reactive-streams) specification, therefore, the library features a class and an interface per each reactive type:
472477

473478
| Type | Class | Interface | Consumer |
474479
|------|-------|-----------|----------|
@@ -496,11 +501,11 @@ For further details, consult the [wiki](https://github.com/ReactiveX/RxJava/wiki
496501

497502
## Versioning
498503

499-
Version 2.x is now considered stable and final. Version 1.x will be supported for several years along with 2.x. Enhancements and bugfixes will be synchronized between the two in a timely manner.
504+
Version 3.x is in development. Bugfixes will be applied to both 2.x and 3.x branches, but new features will only be added to 3.x.
500505

501-
Minor 2.x increments (such as 2.1, 2.2, etc) will occur when non-trivial new functionality is added or significant enhancements or bug fixes occur that may have behavioral changes that may affect some edge cases (such as dependence on behavior resulting from a bug). An example of an enhancement that would classify as this is adding reactive pull backpressure support to an operator that previously did not support it. This should be backwards compatible but does behave differently.
506+
Minor 3.x increments (such as 3.1, 3.2, etc) will occur when non-trivial new functionality is added or significant enhancements or bug fixes occur that may have behavioral changes that may affect some edge cases (such as dependence on behavior resulting from a bug). An example of an enhancement that would classify as this is adding reactive pull backpressure support to an operator that previously did not support it. This should be backwards compatible but does behave differently.
502507

503-
Patch 2.x.y increments (such as 2.0.0 -> 2.0.1, 2.3.1 -> 2.3.2, etc) will occur for bug fixes and trivial functionality (like adding a method overload). New functionality marked with an [`@Beta`][beta source link] or [`@Experimental`][experimental source link] annotation can also be added in patch releases to allow rapid exploration and iteration of unstable new functionality.
508+
Patch 3.x.y increments (such as 3.0.0 -> 3.0.1, 3.3.1 -> 3.3.2, etc) will occur for bug fixes and trivial functionality (like adding a method overload). New functionality marked with an [`@Beta`][beta source link] or [`@Experimental`][experimental source link] annotation can also be added in patch releases to allow rapid exploration and iteration of unstable new functionality.
504509

505510
#### @Beta
506511

@@ -521,44 +526,44 @@ All code inside the `io.reactivex.internal.*` packages is considered private API
521526
## Full Documentation
522527

523528
- [Wiki](https://github.com/ReactiveX/RxJava/wiki)
524-
- [Javadoc](http://reactivex.io/RxJava/2.x/javadoc/)
525-
- [Latest snaphot Javadoc](http://reactivex.io/RxJava/2.x/javadoc/snapshot/)
526-
- Javadoc of a specific [release version](https://github.com/ReactiveX/RxJava/tags): `http://reactivex.io/RxJava/2.x/javadoc/2.x.y/`
529+
- [Javadoc](http://reactivex.io/RxJava/3.x/javadoc/)
530+
- [Latest snaphot Javadoc](http://reactivex.io/RxJava/3.x/javadoc/snapshot/)
531+
- Javadoc of a specific [release version](https://github.com/ReactiveX/RxJava/tags): `http://reactivex.io/RxJava/3.x/javadoc/3.x.y/`
527532

528533
## Binaries
529534

530-
Binaries and dependency information for Maven, Ivy, Gradle and others can be found at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Cio.reactivex.rxjava2).
535+
Binaries and dependency information for Maven, Ivy, Gradle and others can be found at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Cio.reactivex.rxjava3).
531536

532537
Example for Gradle:
533538

534539
```groovy
535-
compile 'io.reactivex.rxjava2:rxjava:x.y.z'
540+
compile 'io.reactivex.rxjava3:rxjava:x.y.z'
536541
```
537542

538543
and for Maven:
539544

540545
```xml
541546
<dependency>
542-
<groupId>io.reactivex.rxjava2</groupId>
547+
<groupId>io.reactivex.rxjava3</groupId>
543548
<artifactId>rxjava</artifactId>
544549
<version>x.y.z</version>
545550
</dependency>
546551
```
547552
and for Ivy:
548553

549554
```xml
550-
<dependency org="io.reactivex.rxjava2" name="rxjava" rev="x.y.z" />
555+
<dependency org="io.reactivex.rxjava3" name="rxjava" rev="x.y.z" />
551556
```
552557

553-
Snapshots are available via https://oss.jfrog.org/libs-snapshot/io/reactivex/rxjava2/rxjava/
558+
Snapshots are available via https://oss.jfrog.org/libs-snapshot/io/reactivex/rxjava3/rxjava/
554559

555560
```groovy
556561
repositories {
557562
maven { url 'https://oss.jfrog.org/libs-snapshot' }
558563
}
559564
560565
dependencies {
561-
compile 'io.reactivex.rxjava2:rxjava:2.2.0-SNAPSHOT'
566+
compile 'io.reactivex.rxjava3:rxjava:3.0.0-SNAPSHOT'
562567
}
563568
```
564569

@@ -595,5 +600,5 @@ For bugs, questions and discussions please use the [Github Issues](https://githu
595600
See the License for the specific language governing permissions and
596601
limitations under the License.
597602

598-
[beta source link]: https://github.com/ReactiveX/RxJava/blob/2.x/src/main/java/io/reactivex/annotations/Beta.java
599-
[experimental source link]: https://github.com/ReactiveX/RxJava/blob/2.x/src/main/java/io/reactivex/annotations/Experimental.java
603+
[beta source link]: https://github.com/ReactiveX/RxJava/blob/3.x/src/main/java/io/reactivex/annotations/Beta.java
604+
[experimental source link]: https://github.com/ReactiveX/RxJava/blob/3.x/src/main/java/io/reactivex/annotations/Experimental.java

0 commit comments

Comments
 (0)