protocolbuffers / protocolbuffers/protobuf
Accept trailing comma on field extension list.
Open
Nobody has claimed this yet.
enhancement
keep open
- Dominant language
- C++
- Stars
- 72k
- Forks
- 16.3k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 140
Description
Right now trailing commas on field extensions are considered to be a missing identifiers.
Re-produce as:
protoc \
<(echo 'syntax = "proto3";\npackage test;\nimport "google/protobuf/descriptor.proto";\nextend google.protobuf.FieldOptions {\n int32 a = 50000;\n int32 b = 50001;\n}\nmessage Test {\n int32 test = 1 [(a) = 1, (b) = 2,];\n}') \
--cpp_out $(mktemp -d) \
--proto_path /proc/self/fd/
(tested on 3.6.1)
Removing the comma at the end of (b) = 2, allows it to compile.
What language does this apply to?
Proto3 (presumably the same in proto2)
Describe the problem you are trying to solve.
I'd like to be able to supply trailing commas.
Describe the solution you'd like
Trailing commas are allowed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.