Replies: 2 comments 6 replies
-
I think right now that all the group bytes would be in the message SearchResponse {
repeated group Result = 1 {
optional string url = 1;
optional string title = 2;
repeated string snippets = 3;
}
} and message SearchResponse {
message Result {
optional string url = 1;
optional string title = 2;
repeated string snippets = 3;
}
repeated Result result = 1;
} If yes, Wire could maybe parse groups as in the first case but transform them into nested types like the second one; that'd take care of everything. That'd be simple although hacky. |
Beta Was this translation helpful? Give feedback.
-
I’m reluctant to add this feature. Would you consider supporting groups in a private fork? That way we avoid the burden of maintaining this feature indefinitely for what is likely a single user. |
Beta Was this translation helpful? Give feedback.
-
As the README clearly states, Wire currently does not support protobuf groups (in fact it comes with support for skipping groups in the deserializer and can parse groups from
.proto
files, but it doesn't actually allow to use groups).I was wondering if you would accept a PR to add group support in one of these variants:
or
.proto
file to replace the group with a submessage). This is great when having legacy systems that emit groups or have files that have groups, but you plan to migrate those to use submessages, as you can parse the old serialization and the new serialization into the same structure.<tag>:SGROUP <message> <tag>:EGROUP
instead of<tag>:LEN:<len>:<message>
). This is needed if you still need legacy systems to be able to read your messages. Using the submessage code syntax allows to first migrate all systems to the new code (that can parse both serializations), while still emitting groups, and then switch off the group serialization once all systems are upgraded to be able to read submessage serialization.The latter approach has the disadvantage that it would not allow to take
.proto
files that have groups as is, but the advantage that it is probably less code to maintain (as for the largest part, it's all just the same messages, only with changes to parsing and serializing code) and that it makes it reasonably easy to migrate to submessages in production systems.Beta Was this translation helpful? Give feedback.
All reactions