-
Notifications
You must be signed in to change notification settings - Fork 167
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
kotlin protos #266
kotlin protos #266
Conversation
How to add an item to repeated field?
val request = linkRequest {
profile = Profile.PROFILE_RO
this.person = person
addresses += address
} val request = linkRequest {
profile = Profile.PROFILE_RO
this.person = person
addresses.add(address)
} |
Resolved above issue. This is a good point to document
|
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.
Talked offline, but I think we need to update the gRPC hello world to include the proto dependency as well.
I'd also like to see a note somewhere like "The kotlin grpc library is stand-alone and does not depend on the proto-kotlin library, but they are best used together" or something along those lines.
examples/android/src/main/kotlin/io/grpc/examples/helloworld/MainActivity.kt
Show resolved
Hide resolved
c0d1b97
to
0a9dc03
Compare
I updated the compiler docs with the Kotlin Protos stuff: Hopefully that resolves the questions around this and clarifies that you can use both the gRPC Kotlin compiler and the Proto Kotlin compiler together (as we do in these examples) but you don't have to. |
Am I correct to assume that this doesn't support proto-lite? The gRPC macro takes in a |
Today there isn't much difference with the Kotlin lite protos but you can use them: The Java protos are pretty different though. And you do need to set the lite deps when using the lite protos: |
The question was about the Bazel integration, sorry I wasn't clear, I didn't look closely at what this PR was adding (just noted it added the Bazel |
Ah, yeah I'm not sure on the Bazel side. Maybe @aragos has some info on that. |
I just tried a fairly simple patch locally which seems to be working just fine - I'll send a PR very soon. |
PR opened, #350 |
Hi @jamesward - if I do something like this:
Should the resulting .jar file contain the classes that allow me to actually instantiate an instance of HelloRequest and HelloReply? Or, do I need to rely on the java classes for that? |
I'm not seeing the example HelloRequest and HelloReply files that I would expect:
|
No description provided.