bufbuild / buf

The best way of working with Protocol Buffers.

Home Page:https://buf.build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

buf formatter dropping type when prefixed with url

jacobbuf opened this issue · comments

believe this .proto file is valid:
################################################################
syntax = "proto2";
import "google/protobuf/descriptor.proto";
import "google/protobuf/any.proto";
package connectrpc.v1;
message Bar {
optional double bar = 1 [default = 1];
}
message Foo {
optional google.protobuf.Any bar = 1;
}
extend google.protobuf.FieldOptions {
optional Foo baz = 50000;
}
message Baz {
optional double bar = 1 [(baz) = {
bar: <[type.googleapis.com/connectrpc.v1.Bar]: <bar: 1>>
}];
}
################################################################
Note the text "/connectrpc.v1.Bar" near the end of the file.
The Buf protocol file formatter drops that text.