返回顶部
首页 > 资讯 > 精选 >cosmos-sdk/proto/bank/v1beta1/query.proto 文件编译时错误
  • 565
分享到

cosmos-sdk/proto/bank/v1beta1/query.proto 文件编译时错误

编译错误 2024-02-09 09:02:24 565人浏览 泡泡鱼
摘要

PHP小编西瓜在使用cosmos-sdk/proto/bank/v1beta1/query.proto 文件编译时遇到了错误。这个文件是cosmos-sdk中的一部分,用于查询银行相关

PHP小编西瓜在使用cosmos-sdk/proto/bank/v1beta1/query.proto 文件编译时遇到了错误。这个文件是cosmos-sdk中的一部分,用于查询银行相关的信息。错误的出现可能是因为文件本身存在问题或者编译器的配置有误。解决这个问题需要仔细检查文件内容和编译器的设置,确保它们符合要求。同时,可以寻求社区或开发者的帮助,以便更快地解决这个编译错误。

问题内容

安装协议并保存 cosmos-sdk/proto/bank/v1beta1/query.proto 文件后,此文件显示很多错误,为了确认错误,我运行了此命令 protoc --Go_out=。查询.proto

这是问题详细信息:

saiful@saiful-Inspiron-3542:~/Desktop/TestCosmos/cosmos-sdk/proto/cosmos/bank/v1beta1$ protoc --go_out=. query.proto
cosmos/base/query/v1beta1/pagination.proto: File not found.
gogoproto/gogo.proto: File not found.
google/api/annotations.proto: File not found.
cosmos/base/v1beta1/coin.proto: File not found.
cosmos/bank/v1beta1/bank.proto: File not found.
cosmos_proto/cosmos.proto: File not found.
cosmos/query/v1/query.proto: File not found.
amino/amino.proto: File not found.
query.proto:4:1: Import "cosmos/base/query/v1beta1/pagination.proto" was not found or had errors.
query.proto:5:1: Import "gogoproto/gogo.proto" was not found or had errors.
query.proto:6:1: Import "google/api/annotations.proto" was not found or had errors.
query.proto:7:1: Import "cosmos/base/v1beta1/coin.proto" was not found or had errors.
query.proto:8:1: Import "cosmos/bank/v1beta1/bank.proto" was not found or had errors.
query.proto:9:1: Import "cosmos_proto/cosmos.proto" was not found or had errors.
query.proto:10:1: Import "cosmos/query/v1/query.proto" was not found or had errors.
query.proto:11:1: Import "amino/amino.proto" was not found or had errors.
query.proto:135:3: "cosmos.base.v1beta1.Coin" is not defined.
query.proto:147:3: "cosmos.base.query.v1beta1.PageRequest" is not defined.
query.proto:159:12: "cosmos.base.v1beta1.Coin" is not defined.
query.proto:167:3: "cosmos.base.query.v1beta1.PageResponse" is not defined.
query.proto:182:3: "cosmos.base.query.v1beta1.PageRequest" is not defined.
query.proto:191:12: "cosmos.base.v1beta1.Coin" is not defined.
query.proto:199:3: "cosmos.base.query.v1beta1.PageResponse" is not defined.
query.proto:223:3: "cosmos.base.v1beta1.Coin" is not defined.
query.proto:235:3: "cosmos.base.query.v1beta1.PageRequest" is not defined.
query.proto:242:12: "cosmos.base.v1beta1.Coin" is not defined.
query.proto:252:3: "cosmos.base.query.v1beta1.PageResponse" is not defined.
query.proto:264:3: "cosmos.base.v1beta1.Coin" is not defined.
query.proto:273:3: "Params" is not defined.
query.proto:279:3: "cosmos.base.query.v1beta1.PageRequest" is not defined.
query.proto:286:12: "Metadata" is not defined.
query.proto:289:3: "cosmos.base.query.v1beta1.PageResponse" is not defined.
query.proto:302:3: "Metadata" is not defined.
query.proto:313:3: "cosmos.base.query.v1beta1.PageRequest" is not defined.
query.proto:326:3: "cosmos.base.v1beta1.Coin" is not defined.
query.proto:336:3: "cosmos.base.query.v1beta1.PageResponse" is not defined.
query.proto:347:3: "cosmos.base.query.v1beta1.PageRequest" is not defined.
query.proto:354:12: "SendEnabled" is not defined.
query.proto:357:3: "cosmos.base.query.v1beta1.PageResponse" is not defined.

我已经安装了协议版本 3.21.12,每个导入的路径文件都放置在正确的位置,但仍然出现错误。我也尝试过不同的 cosmos-sdk 版本,但问题对我来说仍然相同。 我的期望是运行命令后(protoc --go_out =.query.proto) 在 cosmos-sdk/proto/bank/v1beta1 路径中,它应该可以自由运行错误

解决方法

我在官方 cosmos sdk GitHub 存储库上遇到了与同一问题相关的问题。 cosmos sdk 团队的两位核心工程师建议我使用“buf”而不是“protoc”来解决我的错误。我听从了他们的建议并成功解决了问题。

这是链接:

https://github.com/cosmos/cosmos-sdk/issues/16897  (closed)

以上就是cosmos-sdk/proto/bank/v1beta1/query.proto 文件编译时错误的详细内容,更多请关注编程网其它相关文章!

--结束END--

本文标题: cosmos-sdk/proto/bank/v1beta1/query.proto 文件编译时错误

本文链接: https://lsjlt.com/news/562375.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作