Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2515)

Issue 2679: Protocol Buffers : Printing embedded messages in unknown messages

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 9 months ago by dilip.antony.joseph
Modified:
14 years, 9 months ago
Reviewers:
kenton
Base URL:
http://protobuf.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Heuristically detect and print embedded messages within messages whose .proto file is unknown. Patch attached. The PrintUnknownFields() in this patch attempts to display embedded messages, by default. In some cases, it wrongly displays fields intended to be regular strings as embedded messages. Maybe we should have a flag to indicate whether we want to attempt sub-message detection? Another option is to first print the embedded message value as a regular length-delimited string and then expand it on the next line, explicitly indicating that the expansion is a guess. I am not sure which option is better. I can submit an updated patch if we decide on any of the options above. Dilip

Patch Set 1 #

Patch Set 2 : Heuristically print messages with unknown .proto (revised) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+207 lines, -3 lines) Patch
src/google/protobuf/text_format.h View 1 3 chunks +10 lines, -0 lines 0 comments Download
src/google/protobuf/text_format.cc View 1 4 chunks +48 lines, -3 lines 0 comments Download
src/google/protobuf/text_format_unittest.cc View 1 1 chunk +104 lines, -0 lines 0 comments Download
src/google/protobuf/unittest.proto View 1 chunk +10 lines, -0 lines 0 comments Download
src/google/protobuf/unknown_field_set.h View 1 chunk +8 lines, -0 lines 0 comments Download
src/google/protobuf/unknown_field_set.cc View 2 chunks +27 lines, -0 lines 0 comments Download

Messages

Total messages: 5
dilip.antony.joseph
I am not sure if I need to "Publish + Mail Draft Comments" to make ...
15 years, 9 months ago (2008-07-30 20:13:07 UTC) #1
kenton
I would like for this feature to be on by default, since I think it ...
15 years, 9 months ago (2008-07-30 23:36:50 UTC) #2
dilip.antony.joseph
On 2008/07/30 23:36:50, kenton wrote: > I would like for this feature to be on ...
15 years, 9 months ago (2008-08-01 05:11:19 UTC) #3
dilip.antony.joseph
replied to your comments inline http://codereview.appspot.com/2679/diff/1/4 File src/google/protobuf/text_format.cc (right): http://codereview.appspot.com/2679/diff/1/4#newcode752 Line 752: /* static */ ...
15 years, 9 months ago (2008-08-01 05:11:43 UTC) #4
dilip.antony.joseph
15 years, 9 months ago (2008-08-04 23:20:47 UTC) #5
Heuristically print messages with unknown .proto (revised)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b