-
Notifications
You must be signed in to change notification settings - Fork 578
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
Allow GrpcClient to be implemented on all platforms #2677
Conversation
46c314a
to
5cf9587
Compare
Jesse is telling me we could create the option at the OkHttp level. We'll pair next week and see how it goes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
public synthetic fun <init> (Lokhttp3/Call$Factory;Lokhttp3/HttpUrl;JLkotlin/jvm/internal/DefaultConstructorMarker;)V | ||
public final fun create (Lkotlin/reflect/KClass;)Lcom/squareup/wire/Service; | ||
public final fun newBuilder ()Lcom/squareup/wire/GrpcClient$Builder; | ||
public fun <init> ()V |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public fun <init> ()V | |
public fun <init> ()V | |
public final fun create (Lkotlin/reflect/KClass;)Lcom/squareup/wire/Service; | |
public final fun newBuilder ()Lcom/squareup/wire/GrpcClient$Builder;``` |
public final class com/squareup/wire/GrpcClientKt { | ||
public static final fun create (Lcom/squareup/wire/GrpcClient;Lkotlin/reflect/KClass;)Lcom/squareup/wire/Service; | ||
public static final fun newBuilder (Lcom/squareup/wire/GrpcClient;)Lcom/squareup/wire/GrpcClient$Builder; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn’t be a public API.
public final class com/squareup/wire/GrpcClientKt { | |
public static final fun create (Lcom/squareup/wire/GrpcClient;Lkotlin/reflect/KClass;)Lcom/squareup/wire/Service; | |
public static final fun newBuilder (Lcom/squareup/wire/GrpcClient;)Lcom/squareup/wire/GrpcClient$Builder; | |
} |
5cf9587
to
5ee8d73
Compare
Including JVM or common
5ee8d73
to
82e565a
Compare
Updated the code! |
Including JVM or common. Following up on #2505 and we didn't quite do that.
Obviously breaking some APIs. Most common breaking change for client users is around having now to import
newCall
orcreate
for they became extension functions.I am not really sure it's the right way.
Goals are to let anybody implement their own GrpcClient on common, jvm, js, native. Right now, that's only possible for js and native. With this PR, I think all would be cool.
Fixes #2484
cc @iTaysonLab @RaphaelJenni