亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Protobuf配置Intellij Idea Plugin Gradle-kotlin-dsl

Protobuf配置Intellij Idea Plugin Gradle-kotlin-dsl

慕容3067478 2023-08-04 15:20:47
嘿,我想在 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 文件有一些無效的定義。


查看完整回答
反對 回復 2023-08-04
  • 1 回答
  • 0 關注
  • 392 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號