-
Notifications
You must be signed in to change notification settings - Fork 719
protoc generated file breaks code #2886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The generated protobuf files gives you the information about the used software versions. Lines 22 to 26 in 3a8f4fb
tools/grpc/genproto.sh is outdated. Can you send a pull request to update it? |
@floatingstatic Thanks for the quick fix! I still see the problem at my end and it seems like I am doing something wrong. Would really appreciate if you can take a look. I am working with gobgp-3.24.0 and generating from the vanilla attribute.proto is breaking things for me. The versions suggested for 3.24.0 are:
My env versions seem to be the same but I am seeing weird generated attribute.pb.go (generated file are the same with v25.6). I have added a sample of generated file below. ` /* It is generated from these files: It has these top-level messages: import proto "github.com/golang/protobuf/proto" // Reference imports to suppress errors if they are not otherwise used. type LsOspfRouteType int32 const ( var LsOspfRouteType_name = map[int32]string{ func (x LsOspfRouteType) String() string { // Based om RFC 7752, Table 1. const ( var LsNLRIType_name = map[int32]string{ func (x LsNLRIType) String() string { type LsProtocolID int32 const ( var LsProtocolID_name = map[int32]string{ func (x LsProtocolID) String() string { type SRv6Behavior int32 const ( var SRv6Behavior_name = map[int32]string{ func (x SRv6Behavior) String() string { type ENLPType int32 const ( var ENLPType_name = map[int32]string{ func (x ENLPType) String() string { type AsSegment_Type int32 const ( |
@usama6naseer try downloading I would also suggest seeing if you can try genproto.sh from the branch I opened a PR for (see above) |
@usama6naseer following up on this. Did installing the correct version of |
@floatingstatic yes, I can confirm that I was able to fix the issues with newer scripts (though I had to specific the |
I am working on adding color-only steering to GoBGP ColorExtended (Flag field). I plan to make a pull request to merge with upstream, once done.
However, when I try to generate attribute.pb.go, using /tools/grpc/genproto.sh, the generated file is way different than original one (added below). I have also added env info below.
I even tried re-generating from the vanilla attribute.go (i.e., without any modifications) and the output is much different from the ground-truth attribute.pb.go.
`
[gobgp-3.24.0]$ protoc --version
libprotoc 3.19.1
[gobgp-3.24.0]$ go version
go version go1.21.1 linux/amd64
`
The text was updated successfully, but these errors were encountered: