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

annotation error from generated proto files #499

Open
zabakala opened this issue Dec 22, 2023 · 1 comment
Open

annotation error from generated proto files #499

zabakala opened this issue Dec 22, 2023 · 1 comment

Comments

@zabakala
Copy link

Hi. Would you be able to assist me in the following error inside IntelliJ? Anytime I generate kotlin files from the proto ones I end up with an erroneous generated code.

My build.gradle.ts:

protobuf {
    protoc{
        artifact = "com.google.protobuf:protoc:3.25.1"
    }
    plugins {
        create("grpc") {
            artifact = "io.grpc:protoc-gen-grpc-java:1.60.0"
        }
        create("grpckt") {
            artifact = "io.grpc:protoc-gen-grpc-kotlin:1.4.1:jdk8@jar"
        }
    }
    generateProtoTasks {
        all().forEach {
            it.plugins {
                create("grpc")
                create("grpckt")
            }
            it.builtins {
                create("kotlin")
            }
        }
    }
}

The proto source file:

syntax = "proto3";

package com.heu.malheu.service;

option java_outer_classname = "CustomerProto";
option java_multiple_files = true;

service Customer {
  rpc getByEmail(ByEmailRequest) returns (byEmailReply) {}
}

message ByEmailRequest {
  string name = 1;
}

message byEmailReply {
  string message = 1;
}

...and the result:

annotationerror

@jamesward
Copy link
Collaborator

For the examples in this repo, I'm not able to reproduce that:
image

Can you create a reproducer for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants