Allow proto files to import descriptor.proto (#2995)
descriptor.proto uses proto2 syntax, which is not ready for external usage. However, some proto3 files import descriptor.proto and cannot be used. In this PR, all references (We cheated by only removing extensions, which is enough for now. User should avoid using messages defined in descriptor.proto as field type.) to content in descriptor.proto are removed from generated files. Those that import descriptor.proto can be used like other proto files.pull/3000/head
parent
4c57e8475f
commit
4523c9c233
8 changed files with 51 additions and 5 deletions
@ -0,0 +1,14 @@ |
||||
syntax = "proto3"; |
||||
|
||||
import "google/protobuf/descriptor.proto"; |
||||
|
||||
message TestImportDescriptorProto { |
||||
extend google.protobuf.MethodOptions { |
||||
int32 a = 72295727; |
||||
} |
||||
} |
||||
|
||||
extend google.protobuf.MethodOptions { |
||||
int32 a = 72295728; |
||||
} |
||||
|
Loading…
Reference in new issue