Uncompilable code generated for repeated groups
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the proto2 repeated-group example and inspect the generated Go field alongside the MarshalToSizedBufferVT, SizeVT, and UnmarshalVT entry points shown in the report. Trace how repeated groups are handled and verify that generated output treats them as a list of messages and compiles.
Written by the indexing model from the issue text.
Description
Groups are deprecated feature, but still available for use in proto2.
Following proto leads to uncompilable output:
syntax = "proto2";
message MyMessage {
repeated group Group = 1 {
optional int32 i32 = 1;
}
}
Generated message contains slice of struct generated for group:
Group []*MyMessage_Group `protobuf:"group,1,rep,name=Group,json=group" json:"group,omitempty"`
VtProto generates code as it's just a message, not a slice:
size, err := m.Group.MarshalToSizedBufferVT(dAtA[:i])
l = m.Group.SizeVT()
m.Group.UnmarshalVT(dAtA[groupStart:maybeGroupEnd])
Expected behaviour: to handle it as list of messages.
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
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.
More from planetscale/vtprotobuf
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
planetscale/vtprotobuf#167 ·
-
Difficulty 5/5 Over a week Newbie friendliness 5/100
planetscale/vtprotobuf#165 · 1 comment · 11 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
planetscale/vtprotobuf#164 · 7 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
planetscale/vtprotobuf#162 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
planetscale/vtprotobuf#160 ·
All issues in planetscale/vtprotobuf
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100