This will allow us to like to specific snippets of code in the
documentation. I plan to create a tutorial similar to the C# tutorial
https://developers.google.com/protocol-buffers/docs/csharptutorial
Since that tutorial has sections for populating a proto, parsing, and
serializing, I made a region for each of these for Go. To make the
populating sample more self-contained, I refactor the listing example
slightly.
This addresses issue #1008, by creating a JsonFormatter which is private and only different
to JsonFormatter.Default in terms of reference equality.
Other plausible designs:
- The same, but expose the diagnostic-only formatter
- Add something to settings to say "I don't have a type registry at all"
- Change the behaviour of JsonFormatter.Default (bad idea IMO, as we really *don't* want the result of this used as regular JSON to be parsed)
Note that just trying to find a separate fix to issue #933 and using that to override Any.ToString() differently wouldn't work for messages that *contain* an Any.
Generated code changes follow in the next commit.
- Let Xcode update the projects, schemes, and info.plists.
- Add workaround for shallow analyzer issues in current Xcode versions (deep analyze gets things correct).
- Tweak the Swift based tests to avoid warnings from Xcode 7's XCTest using optionals for autoenclosure results.
- No longer tag the ObjC iOS travis test as flaky, xctool seems to manage the simulator pretty well.
This is adapted from the branch of @xfxyjwf at:
494716a682
and should solve the protobuf compilation problem against nvcc.
Tested against nvcc 6.5 and 7.0.
This required a rework of the tokenizer to allow for a "replaying" tokenizer, basically in case the @type value comes after the data itself. This rework is nice in some ways (all the pushback and object depth logic in one place) but is a little fragile in terms of token push-back when using the replay tokenizer. It'll be fine for the scenario we need it for, but we should be careful...