Instead of having a Proto nested namespace to avoid conflicts between the descriptor-holding static class and message classes, just append "Reflection" to the name.
Generated code changes (and corresponding manual changes) in following commit.
This is only thrown directly by JsonTokenizer, but surfaces from JsonParser as well. I've added doc comments to hopefully make everything clear.
The exception is actually thrown by the reader within JsonTokenizer, in anticipation of keeping track of the location within the document, but that change is not within this PR.
This includes all the well-known types except Any.
Some aspects are likely to require further work when the details of the JSON parsing expectations are hammered out in more detail. Some of these have "ignored" tests already.
Note that the choice *not* to use Json.NET was made for two reasons:
- Going from 0 dependencies to 1 dependency is a big hit, and there's not much benefit here
- Json.NET parses more leniently than we'd want; accommodating that would be nearly as much work as writing the tokenizer
This only really affects the JsonTokenizer, which could be replaced by Json.NET. The JsonParser code would be about the same length with Json.NET... but I wouldn't be as confident in it.
1. mathlimits.h must be included before the inclusion of cmath (which
gtest/gtest.h seems to include).
2. hash function for StringPiece doesn't work.
Change-Id: I358a25d941a25b10b39fe76780eda41557699811
VC++ up to VS 2015 RTM does not require explicit storage allocation for
static const integers declared in classes. VS 2015 Update 1 requires
these storage definitions in some cases. It's unclear exactly what
cases - simple tests work with and without the explicit storage
allocation.
Many previous versions of VC++ have theoretically *allowed* a
definition to supply storage, but tests on VC++ 2013 show that this
doesn't actually work correctly - it leads to duplicate definition
errors in Chromium. So, the change is scoped to VS 2015 only.
This change also updates the generated files to match the new generator.
TL;DR - this change is necessary in order for Chromium to build with
VS 2015 Update 1.
Also made the Travis build ensure that no warnings
are present.
These builds were previously spewing many warnings,
which was hiding warnings for important things like
accidentally using C++11-only features.
Change-Id: I56caeee9db48bc78756a3e8d7c14874630627037