-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
1.x: Deprecate Observable.create() #4253
1.x: Deprecate Observable.create() #4253
Conversation
Don't. Makes all legitimate uses now show up as warnings, including all RxJava! |
But we have to. It's too dangerous and people keep using it in tutorials for beginners!
Pretty sure most of them don't support backpressure -> |
Current coverage is 84.24% (diff: 100%)@@ 1.x #4253 diff @@
==========================================
Files 266 266
Lines 17446 17446
Methods 0 0
Messages 0 0
Branches 2657 2657
==========================================
- Hits 14715 14698 -17
- Misses 1870 1883 +13
- Partials 861 865 +4
|
If so should not SyncOnSubscribe & AsyncOnSubscribe be mentioned too? |
We can suppress them in RxJava! Sometimes to save someone you love you need to sacrifice something 🚢 |
You may not care about the impact but I have to. This change is too radical; a small deprecation now amplified to 400+ warnings and would need to suppress several hundred places - all legitimate (operators) or acceptable uses (unit tests for corner cases). 👎 |
I better suppress 400+ warnings than let one user to misuse I understand that you care about library 👍, but I care about users in this PR! Only in open source projects with shitty GitHub search I found about 6k+ usages of Recently we had to handle backpressure with |
Still you don't just deprecate something and leave the fallout to other maintainer(s). Instead of just deprecating
|
That sounds better to me, I was thinking about package private method inside Does it sound good to you @akarnokd?
Up to @akarnokd. |
Just making it package-private does not work. We have accesses from other packages that require the create feature. It means we'd have to dump them into the main |
So, after discussing that in Twitter looks like our steps could be:
Regarding hiding it, I think If that sounds good to you, I'll close this pr and start working on things from list. |
That sounds good. |
Deprecating Re |
Finally we have
Observable.fromAsync()
and it's time to prevent users from usingObservable.create()
.