Commit Graph

2986 Commits

Author SHA1 Message Date
Jan Tattermusch
25c045a180 Merge pull request #942 from jskeet/json-exception
Created a new exception for JSON failures.
2015-11-05 08:57:57 -08:00
Paul Yang
a030cc750c Merge pull request #943 from thomasvl/conformance
Update the Mac build script to include the conformance tests
2015-11-05 06:11:12 -08:00
Jon Skeet
0fb39c4afe Created a new exception for JSON failures.
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.
2015-11-05 10:40:22 +00:00
Thomas Van Lenten
f0411ec974 Update the Mac build script to include the conformance tests
- Kick off the conformance tests
- Add missing ignore for something generated by a build on the conformance directory.
2015-11-04 15:14:54 -05:00
Jon Skeet
3d257a9dc1 Add recursion limit handling to JSON parsing.
Fixes issue #932.
2015-11-04 11:30:22 +00:00
Jon Skeet
6a94273549 Move the creation of the "fields by JSON name" dictionary to the descriptor. 2015-11-04 09:09:14 +00:00
Jon Skeet
b6a32e909b Merge pull request #923 from jskeet/json-parsing
Implement JSON parsing in C#.
2015-11-03 22:39:08 -08:00
Feng Xiao
55ad57a235 Merge pull request #936 from andrewharp/patch-1
Build protoc for host platform to enable cross-compilation.
2015-11-03 15:22:12 -08:00
Feng Xiao
0cf6198cf1 Merge pull request #939 from dougkwan/master
Add support for POWER Linux
2015-11-03 15:21:30 -08:00
Doug Kwan
2a50e67c78 Add support for POWER Linux 2015-11-03 14:49:42 -08:00
Andrew Harp
38f131fd8c Build protoc for host platform to enable cross-compilation.
This is necessary to run protoc on the host as a dependency for Android BUILD targets with Bazel.
2015-11-03 16:39:32 -05:00
Jon Skeet
fb2488225f Implement JSON parsing in C#.
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.
2015-11-03 19:05:11 +00:00
Jisi Liu
aa3675415e Merge pull request #930 from pherl/bazel_test
add warning notes for cc|py_proto_library rules.
2015-11-02 15:02:39 -08:00
Feng Xiao
ec9f45b106 Merge pull request #931 from xfxyjwf/fix_compile
Fix compilation errors when built internally.
2015-11-02 14:10:36 -08:00
Feng Xiao
9659ea9e56 Fix compilation errors when built internally.
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
2015-11-02 12:39:27 -08:00
Jisi Liu
d4bef7d41b add warning notes for cc|py_proto_library rules.
To mention that the interface may change or be removed when bazel has
support it natively.
2015-11-02 12:24:32 -08:00
Jan Tattermusch
59635c13d9 Merge pull request #929 from jskeet/unsafe-internal
Make BytesString.Unsafe internal (which it should have been all along)
2015-11-02 04:49:34 -08:00
Jon Skeet
885406abcf Make BytesString.Unsafe internal (which it should have been all along) 2015-11-02 09:59:06 +00:00
Feng Xiao
8eebad1082 Merge pull request #924 from bbarenblat/master
Correct spelling
2015-10-31 09:41:36 -07:00
Benjamin Barenblat
a2ce9cb9ea Correct spelling 2015-10-30 14:05:24 -04:00
Jan Tattermusch
46f8a79826 Merge pull request #905 from jskeet/wrapper-clear
Fix clearing wrapper type fields with reflection.
2015-10-30 07:33:39 -07:00
Jon Skeet
f5a0a7feeb Fix clearing wrapper type fields with reflection.
The nullable value type fields already worked, but the use of the CLR property concealed the difference between string and StringWrapper fields.
2015-10-30 09:37:01 +00:00
Feng Xiao
a74e912a8b Merge pull request #922 from randomascii/master
Get VS 2015 to use const int definitions
2015-10-29 14:53:17 -07:00
Bruce Dawson
86ba70ec41 Get VS 2015 to use const int definitions
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.
2015-10-29 13:04:18 -07:00
Joshua Haberman
86f6f53db3 Merge pull request #861 from haberman/pywarnings
Removed all warnings from the Python/C++ build
2015-10-28 18:08:44 -07:00
Josh Haberman
c3ca920509 Pass $CC environment variable through tox. 2015-10-28 17:07:02 -07:00
Josh Haberman
d8814ed59e Special-case Clang-only warning flags to Clang. 2015-10-28 17:07:02 -07:00
Josh Haberman
30cbd4c561 Disable some more warnings to be warnings-free. 2015-10-28 17:05:47 -07:00
Josh Haberman
70ffefa551 Fixed compile errors after rebase. 2015-10-28 17:05:47 -07:00
Josh Haberman
00700b7219 Removed all warnings from the Python/C++ build.
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
2015-10-28 17:05:47 -07:00
Jisi Liu
12fb61b292 Merge pull request #915 from pherl/master
add default_runtime attribute to cc|py rules.
2015-10-27 15:57:02 -07:00
Jisi Liu
be92ffbf74 add default_runtime attribute to cc|py rules.
This adds implicit dependencies to the coressponding runtime libraries.
2015-10-27 15:11:38 -07:00
Jan Tattermusch
d4569d1f5e Merge pull request #908 from jskeet/oneof-equality
Use oneof case in equality tests
2015-10-24 11:41:00 -07:00
Jon Skeet
55313c9c5d Generated code for previous commit (oneof case contributing to hash code and equality). 2015-10-24 06:46:02 +01:00
Jon Skeet
964627ece0 Include the oneof-case in equality and hash code generated code.
The included C# test will fail until the regenerated code is used, which is in the next commit.
2015-10-24 06:45:20 +01:00
Jisi Liu
dfae9e36c7 Merge pull request #904 from matthew-wu/master
Change the #include for any.h to use angle brackets instead of quotes
2015-10-23 10:13:34 -07:00
Matthew Wu
187cfc5700 Change the #include for any.h to use angle brackets instead of quotes, to be consistent with other protobuf library includes. 2015-10-22 16:09:56 -07:00
Jisi Liu
1abf297fb9 Merge pull request #903 from pherl/bazel_test
Enable python bazel tests and explicit list python dependencies.
2015-10-22 14:00:02 -07:00
Jisi Liu
e1f60f5043 Update comments. 2015-10-22 13:55:37 -07:00
Jisi Liu
b657cb4b91 fix six package path.
--strip_prefix doesn't seem to work.
2015-10-22 13:44:15 -07:00
Jisi Liu
fbc51b7018 Add six as an external dep. 2015-10-22 13:38:17 -07:00
Jisi Liu
68e13f40f4 Enable python tests with testdata. 2015-10-22 11:13:14 -07:00
Jisi Liu
b152d7feb9 Merge pull request #901 from pherl/bazel_test
Add runfiles to make the protobuf_test pass.
2015-10-21 11:21:28 -07:00
Jisi Liu
598480df11 Add runfiles to make the protobuf_test pass. 2015-10-21 11:19:16 -07:00
Jisi Liu
343f93fc9e Merge pull request #900 from pherl/rename
Rename python and java bazel rules.
2015-10-21 10:58:36 -07:00
Jisi Liu
96da4edde0 Merge pull request #899 from pherl/cc_bazel
Use && for internal_copied_filegroup.
2015-10-21 10:57:47 -07:00
Jisi Liu
166e9bbb84 Rename python and java bazel rules. 2015-10-21 10:56:38 -07:00
Jisi Liu
6ddcae225c Use && for internal_copied_filegroup.
So that the rule fails if one or more files cannot be copied.
2015-10-21 10:48:33 -07:00
Jisi Liu
66e3a6d0b7 Merge pull request #867 from pherl/master
Python bazel support
2015-10-21 10:43:00 -07:00
Jisi Liu
8f54026ded avoid name duplication. 2015-10-20 16:21:41 -07:00