Li2CO3
Li2CO3
@nnothing1 感谢~
1. 我试了下你的 IDL,并没有遇到这个问题 2. 不过话说回来,现在 fastpb 存在一个这样的问题:https://github.com/cloudwego/fastpb/issues/17 所以就算 any 别名一致了,目前也用不了,这个问题我们后续会看看怎么解决 现在你可以先添加一个 -no-fast-api ,这个命令会不生成 fastpb 的代码,使用原生 pb,就能避免编译失败的问题了。
$ protoc --version libprotoc 3.19.4 $ protoc-gen-go --version protoc-gen-go v1.31.0 我本地版本是这样。另外用不到 gen-go-grpc
ok,我也装一下试试(或者你发下报错) 但我建议你可以先降低下版本,比如到我这个。我不是很确定高版本有哪些 diff 以及 kitex tool 对这些 diff 有没有兼容
哦,any.Any 不支持这个,就是我之前说的 https://github.com/cloudwego/fastpb/issues/17。所以就先用 -no-fast-api 来解决吧
不太行。hertz 模板提供的渲染参数(对应你这里MethodInfo说的是HttpMethod类型),他里面只记录了 struct 的名字,没有记录进一步的结构体和细节,所以拿不到 ``` type HttpMethod struct { Name string HTTPMethod string Comment string RequestTypeName string RequestTypePackage string RequestTypeRawName string ReturnTypeName string ReturnTypePackage string ReturnTypeRawName string Path string Serializer...
pb.go 的桩结构体,其实是 hertztool 调用 protoc 生成的,hertztool 并不感知 struct 的字段细节这些 ast,所以模板的渲染字段就只有文档里列的那些,没有具体的结构体内容,所以现在做不到