generated from cloudwego/.github
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
C-bugThis is a bug-report. Bug-fix PRs use `C-enhancement` instead.This is a bug-report. Bug-fix PRs use `C-enhancement` instead.
Description
Describe the bug
To Reproduce
- model.proto :
syntax = "proto3";
package svc;
option go_package = "svc/model";
message Model {
// 这里定义一个嵌套的 message
message SubModel {
int64 id = 1;
}
int64 id = 1;
string name = 2;
}
- req.proto
syntax = "proto3";
package svc; // 这里 proto 的 package 与 model.proto 相同
option go_package = "svc/req"; // 这里 go 的package 与 model.proto 不同
import "model.proto"; // 这里引入 model
message Req {
Model md = 1; // 这个引用,在 go 代码中能正确加上 model package
Model.SubModel = 2; // 这个引用,没有加 model package 导致编译错误
}
使用 kitex 生成 fastapi
kitex -I ${PBPATH} ./req.proto
生成的 fastapi 代码中,Model 类型的引用缺少 go package
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugThis is a bug-report. Bug-fix PRs use `C-enhancement` instead.This is a bug-report. Bug-fix PRs use `C-enhancement` instead.
