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

1.x: Base interface types #4420

Closed
JakeWharton opened this issue Aug 24, 2016 · 6 comments
Closed

1.x: Base interface types #4420

JakeWharton opened this issue Aug 24, 2016 · 6 comments

Comments

@JakeWharton
Copy link
Contributor

JakeWharton commented Aug 24, 2016

Before Single and Completable progress to stable, I'd like to address the interface naming inconsistency in a similar fashion to what #4044 did for 2.x.

Here's the current state:

screen shot 2016-08-24 at 1 30 57 pm

It's very clear that there's a lack of normalization. I'd like to take the same approach as we did in 2.x and move to prefixes and top-level types. I'd like to normalize the names of the nested classes and make the subscribers top-level types. We can @Deprecate the existing types and make them extend from these new top-level types to make migration easier, deleting these @Deprecated types whenever these APIs turn stable. 👍 👎 ?

Additionally, there's a problem with CompletableSubscriber in that it's an interface instead of an abstract class that also implements Subscription (as both Subscriber and SingleSubscriber do). I would like to correct this. 👍 👎 ?

@akarnokd
Copy link
Member

  1. Kind of disruptive at this point, plus @Deprecated never get removed from the main versions (since it was promised)

  2. It's a modern design just like in 2.x but you can introduce the ResourceCompletable similar to 2.x ResourceSubscriber.

@JakeWharton
Copy link
Contributor Author

Er, sorry I meant to change that paragraph before hitting create. I want to propose non-prefixed inner types similar to what Observable has except for the Subscribers which will be top-level.

This will only change non-stable APIs so they could just be renamed.

I was suggesting @Deprecating these non-stable old interfaces so that it didn't immediately break people upgrading. Then eventually you could delete those interfaces since they were never stable in the first place. We also could just rename them though and not bother.

The changes would look like this:

screen shot 2016-08-24 at 3 51 00 pm

@akarnokd
Copy link
Member

Let's see a PR so the diff is more telling about the consequences.

@akarnokd
Copy link
Member

Can we do more about this or can this be closed?

@akarnokd akarnokd added the 1.x label Nov 12, 2016
@JakeWharton
Copy link
Contributor Author

I think we're now at a good enough place with 1.x here. Any more changes would only be disruptive for the sake of being disruptive.

@akarnokd
Copy link
Member

Great!

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

2 participants