嘿,我想在 intellij idea 插件中設(shè)置 protobuf 作為其他 protobuf 服務(wù)器(用 golang 編寫)的客戶端。這將是我使用 grpc 的第一個(gè) java 方法。我嘗試使用 kotlin 類生成器,但我的成功程度甚至不如這種方法。我的目標(biāo)是: 最好的情況:插件將允許將 proto 編譯為 kt 文件 非常好的情況:插件將 java 文件輸出到 src/main/proto現(xiàn)有代碼結(jié)構(gòu):└───src ├───main │ ├───kotlin │ │ └───pl │ │ └───dominikw │ │ ├───configuration │ │ ├───model │ │ ├───service │ │ │ └───impl │ │ └───ui │ ├───proto │ └───resources │ ├───icons │ └───META-INF └───test ├───kotlin └───resources并且錯(cuò)誤代碼如下: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貢獻(xiàn)2019條經(jīng)驗(yàn) 獲得超9個(gè)贊
您的錯(cuò)誤信息是:
...Input is shadowed in the --proto_path by "C:/Users/XXX/IdeaProjects/Windchill-Intellij-Plugin/src/main/proto/service.proto".
proto 文件夾中的 .proto 文件有一些無(wú)效的定義。
添加回答
舉報(bào)
0/150
提交
取消