On Thu, Jan 14, 2016 at 4:27 PM, Peter Kasting <pkas...@chromium.org> wrote:On Thu, Jan 14, 2016 at 4:25 PM, Mathieu Perreault <ma...@chromium.org> wrote:Hi,We are moving to use protocol buffers instead of XML for one of our client/server interactions in Chrome (yes!). While certainly more efficient, it seems like the optimize_for = LITE_RUNTIME; option we use in Chrome's proto files gives us a MessageLite subclass which has no way of outputting a human-readable format (DebugString and using TextFormat only seem to work for Message).
The team is using human-readable debug output quite a bit so I'd like to keep supporting it, any ideas?Is life any better with an up-to-date version of protobufs and/or proto3? I know some changes have been made to the lite runtime there.If so, then the right answer is probably to upgrade our protobufs library, which we want to do anyway. I can help with the expertise if someone can help with the putting-the-time-in.I'm not sure about proto3, but I don't think there's any way to preserve debug output using MessageLite with the current code.
If the goal is to have debug output available for local debugging, it's possible that we could generate a full Message in Debug builds, and MessageLite in Release builds.
On Thu, Jan 14, 2016 at 5:37 PM, Ilya Sherman <ishe...@chromium.org> wrote:On Thu, Jan 14, 2016 at 4:27 PM, Peter Kasting <pkas...@chromium.org> wrote:On Thu, Jan 14, 2016 at 4:25 PM, Mathieu Perreault <ma...@chromium.org> wrote:Hi,We are moving to use protocol buffers instead of XML for one of our client/server interactions in Chrome (yes!). While certainly more efficient, it seems like the optimize_for = LITE_RUNTIME; option we use in Chrome's proto files gives us a MessageLite subclass which has no way of outputting a human-readable format (DebugString and using TextFormat only seem to work for Message).
The team is using human-readable debug output quite a bit so I'd like to keep supporting it, any ideas?Is life any better with an up-to-date version of protobufs and/or proto3? I know some changes have been made to the lite runtime there.If so, then the right answer is probably to upgrade our protobufs library, which we want to do anyway. I can help with the expertise if someone can help with the putting-the-time-in.I'm not sure about proto3, but I don't think there's any way to preserve debug output using MessageLite with the current code.Does "current code" mean "the current trunk version of proto2" distinct from what's in the Chromium tree? That's what I was asking about, since the current Chromium import is years out of date.
If the goal is to have debug output available for local debugging, it's possible that we could generate a full Message in Debug builds, and MessageLite in Release builds.That might need significant changes to how our protobuf buildfiles are set up, as we go to some length to not use the full version of protobufs in them.
PK
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.