嘿,我想在 intellij idea 插件中设置 protobuf 作为其他 protobuf 服务器(用 golang 编写)的客户端。这将是我使用 grpc 的第一个 java 方法。我尝试使用 kotlin 类生成器,但我的成功程度甚至不如这种方法。我的目标是: 最好的情况:插件将允许将 proto 编译为 kt 文件 非常好的情况:插件将 java 文件输出到 src/main/proto现有代码结构:└───src ├───main │ ├───kotlin │ │ └───pl │ │ └───dominikw │ │ ├───configuration │ │ ├───model │ │ ├───service │ │ │ └───impl │ │ └───ui │ ├───proto │ └───resources │ ├───icons │ └───META-INF └───test ├───kotlin └───resources并且错误代码如下:7:17:20 PM: Executing task 'generateProto'...> Task :extractIncludeProto UP-TO-DATE> Task :extractProto UP-TO-DATE> Task :generateProto FAILEDFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':generateProto'.> protoc: stdout: . stderr: C:\Users\XXX\IdeaProjects\Windchill-Intellij-Plugin\build\extracted-protos\main\service.proto: Input is shadowed in the --proto_path by "C:/Users/XXX/IdeaProjects/Windchill-Intellij-Plugin/src/main/proto/service.proto". Either use the latter file as your input or reorder the --proto_path so that the former file's location comes first.* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.* Get more help at https://help.gradle.orgBUILD FAILED in 0s3 actionable tasks: 1 executed, 2 up-to-date7:17:20 PM: Task execution finished 'generateProto'.
1 回答
慕少森
TA贡献2019条经验 获得超9个赞
您的错误信息是:
...Input is shadowed in the --proto_path by "C:/Users/XXX/IdeaProjects/Windchill-Intellij-Plugin/src/main/proto/service.proto".
proto 文件夹中的 .proto 文件有一些无效的定义。
添加回答
举报
0/150
提交
取消