oniksan / godobuf

A Google Protobuf implementation for Godot / GDScript
BSD 3-Clause "New" or "Revised" License
248 stars 34 forks source link

Refactor + fix bugs in repeated field code generation #25

Closed conradhappeliv closed 2 years ago

conradhappeliv commented 2 years ago

This should only have two major changes in generated code:

Diffs of generated repeated scalar code: image

And an example of a generated repeated message code (ModeState is a message defined elsewhere): image

oniksan commented 2 years ago

It breaks backwards compatibility, so I won't merge it.

If you want, you can write code that supports both (old and new) methods of setting repeated fields: In addition to this, you need: