Commit Graph

3772 Commits

Author SHA1 Message Date
chezRong
454dbf16fc added minified JSON formatting functionality with test 2016-07-01 10:08:16 +01:00
Feng Xiao
2fe0556c7a Fix windows build.
Change-Id: Ibf7d1df850f4b497303f9f617751be98327898ef
2016-06-30 14:29:05 -07:00
Adam Cozzette
69cc213c76 Updated failure_list_java.txt to remove tests that now pass 2016-06-30 10:28:10 -07:00
Adam Cozzette
b83af525db Fixed string formatting in text_format.py to be Python2.6-compatible
In Python 2.6 the positional argument specifiers are apparently required
to be explicitly specified:
http://stackoverflow.com/questions/10054122/valueerror-zero-length-field-name-in-format-python
2016-06-30 10:13:53 -07:00
Adam Cozzette
d64a2d9941 Integrated internal changes from Google
This includes all internal changes from around May 20 to now.
2016-06-29 15:38:03 -07:00
Thomas Van Lenten
6cfc19edde Xcode project cleanup/setup.
- Correct some cases sources were compiled into the static lib and the tests.
- Enable Xcodes code coverage support on the unittests.  We aren't complete on
  coverage, but having the data always there should make it easier to chip away
  at this going forward.
- Drop method in tests that isn't used, wire up a validator in another test.
2016-06-29 09:53:46 -04:00
Thomas Van Lenten
c18aa7795a Validate the tag numbers when parsing. (#1725)
There was a twist code path (that some times showed up due to what happened to
be in memory in failure cases), that would cast a bogus wire type into the
enum, and then fall through switch statements.

Resolve this by validating all wire types when parsing tags and throwing the
error at that point so it can't enter the system.

As added safety, stick in a few asserts for apis that get passed tags to ensure
they also are only seeing valid data.

Bonus: Tweak the parsing loop to skip some work when we get the end marker
(zero tag) instead of still looping through all the fields.
2016-06-29 09:51:13 -04:00
Thomas Van Lenten
e0016c5b6a Merge pull request #1720 from thomasvl/issue_1716
Fix GPBGetMessage{Repeated,Map}Field()
2016-06-28 08:29:19 -04:00
Lizan Zhou
31999a3f95 Add JsonParseOptions to ignore unknown fields
- add JsonParseOptions for JsonToBinaryString allow unknown fields
- rename current JsonOptions to JsonPrintOptions
2016-06-28 00:17:06 -07:00
detlevschwabe
dc0aeaa903 Adding conditional compiler symbol to support .NET 3.5 (#1713)
* Adding condition compiler symbol to support .NET 3.5
2016-06-28 06:31:42 +01:00
Thomas Van Lenten
fc4c617199 Fix GPBGetMessage{Repeated,Map}Field()
- Correct impl by using helpers the message wiring does.
- Add unittests.

Fixes https://github.com/google/protobuf/issues/1716
2016-06-27 20:46:26 -04:00
Thomas Van Lenten
7b5648ca98 Merge pull request #1719 from esteluk/patch-1
Fix Objective-C generator option readme typo
2016-06-27 20:17:49 -04:00
Nathan Wong
3be6110934 Fix Objective-C generator option typo
Looks like this was changed during #1683, but missed in the README :)
2016-06-27 22:56:34 +01:00
Thomas Van Lenten
2bcd43afe4 Merge pull request #1714 from dnkoutso/master
Get value from text format name in GPBEnumDescriptor
2016-06-26 21:09:40 -04:00
Dimitris Koutsogiorgas
37ca94f8ae Get value from text format name in GPBEnumDescriptor 2016-06-26 10:38:58 -07:00
Joshua Haberman
0ab78e19eb Merge pull request #1705 from haberman/revjsver
Updates to package.json: rev version, add WKT, and recateogrize dependencies
2016-06-23 15:14:49 -07:00
Josh Haberman
6a6f95d522 JS package.json: Added author and updated Closure Library version. 2016-06-23 15:08:15 -07:00
Jan Tattermusch
6f67be6f37 Merge pull request #1707 from jskeet/format-value
Expose JsonFormatter.WriteValue.
2016-06-23 11:32:54 -07:00
Jon Skeet
0421238cc1 Expose JsonFormatter.WriteValue.
This isn't useful to most users, but can be handy in advanced use cases,
as requested in #1465.
2016-06-23 12:31:10 +01:00
Josh Haberman
1dc62803e8 Moved all dependencies to devDependencies.
The runtime doesn't depend on anything, so these
packages should always have been in devDependencies.
2016-06-22 16:29:20 -07:00
Josh Haberman
48735cba77 Add "google" to package.json "files" for WKT. 2016-06-22 13:11:26 -07:00
Josh Haberman
c4b40a37dd Create patch release for JS to include WKT. 2016-06-22 13:08:50 -07:00
Luke Bakken
80694669e4 Modify csharp README since there are now two NuGet packages 2016-06-22 07:39:05 -07:00
Jon Skeet
a897ebb6a8 Merge pull request #1700 from jskeet/ordering
Remove ordering guarantees in the MapField documentation
2016-06-21 18:26:02 +01:00
Thomas Van Lenten
a230b5d209 Rename methods to avoid ObjC KVC collisions. (#1699)
Note: Breaking API change on the Dictionary classes.

The numeric value classes were using "Value" in the naming, but this silently
collided with the KVC category on NSObject; meaning KVC code could break up a
keypath and call these selectors with the wrong types leading to crashes (even
though the code all would compile cleanly).

- Rename the methods to use the "type" instead of literal "Value".
- Update all the impls and tests.
- Enable the warning that will catch issues like this in the future.

Fixes https://github.com/google/protobuf/issues/1616
2016-06-21 08:25:28 -04:00
Jon Skeet
e3f6e2b870 Remove ordering guarantees in the MapField documentation
This doesn't currently change the ordering in the implementation, but allows us to do so in the future.
We also need to change
https://developers.google.com/protocol-buffers/docs/reference/csharp-generated#singular
which states "Finally, unlike Dictionary<TKey, TValue>, MapField<TKey, TValue> preserves insertion order of entries."
(We can just remove that sentence, I think.)
2016-06-21 07:22:48 +01:00
Sergio Campamá
1a5333b8c1 Adds destination flag to xcodebuild to avoid possible flake errors (#1697)
Adds destination flag to xcodebuild to avoid possible flake errors
2016-06-20 13:44:38 -04:00
Feng Xiao
4f93098eb3 Merge pull request #1666 from yeswalrus/cmake-prerelease-examples
CMake Fix up prerelease version handling
2016-06-17 13:15:49 -07:00
Joshua Haberman
b7560df598 Merge pull request #1696 from haberman/jswkt
JS: import well-known types from google-protobuf package.
2016-06-17 11:14:25 -07:00
Thomas Van Lenten
8c20e55c57 Add new generation option for using proto sources from other frameworks.
- Better docs in the generator for the different options that can be passed
  during an invoke of protoc.
- Add named_framework_to_proto_path_mappings_path to pass the path to a file
  containing mappings of frameworks for different proto files.
- Update the generation to use the mapping to change the #import directives
  it creates.

Note: the changes in helpers is mostly moving code within the fine, and then
a small change to expose the parsing so a passed on class can consume the line.

Fixes https://github.com/google/protobuf/issues/1457
2016-06-17 10:31:05 -04:00
Josh Haberman
104723fccf Fix tests for CommonJS. 2016-06-16 18:40:07 -07:00
Feng Xiao
98bd6d753a Merge pull request #1692 from vjpai/friendless
Workaround for gcc-4.4 incompatibility
2016-06-16 16:19:42 -07:00
Josh Haberman
4308cc4d46 Added plugin.proto to well-known types for JS. 2016-06-16 16:05:47 -07:00
vjpai
6daf3d2c4a Address review comments on function name 2016-06-16 15:43:23 -07:00
Josh Haberman
0e27112c2b Bugfix: base the require logic on the file being required. 2016-06-16 14:45:42 -07:00
Josh Haberman
1337486755 JS: import well-known types from google-protobuf package. 2016-06-16 11:59:08 -07:00
Vijay Pai
37eaae2006 Remove a friend-class template that is only used for the
constructor, and instead create an _internal_only getter
that gets the needed information. This is a workaround for
a deficiency in gcc-4.4 that does not properly support
templated friend classes.
2016-06-15 20:42:52 -07:00
Feng Xiao
52598c646e Merge pull request #1658 from yeswalrus/cmake-fixup-module
Cleanup protobuf-module.cmake.in
2016-06-15 17:06:36 -07:00
Feng Xiao
a5e116aaf6 Merge pull request #1665 from yeswalrus/cmake-package-requirements
CMake package requirements
2016-06-15 17:05:55 -07:00
Thomas Van Lenten
f180ef6398 Merge pull request #1683 from thomasvl/third_party_framework
Add support for generation sources into a framework.
2016-06-15 11:39:21 -04:00
Thomas Van Lenten
a2a3399a6f Add support for generation sources into a framework.
- Add a protoc objc option (generate_for_named_framework) to set the name of
  the framework all generated sources will be in.
- Tweak some comments/naming to make it clear what is the Protobuf framework
  vs. the framework for generated code.
- Update the objc README to document the new generation option to protoc.

This is working towards https://github.com/google/protobuf/issues/1457.
2016-06-15 11:36:52 -04:00
Sergio Campamá
f0c1492ef6 Add the CocoaPods integration tests to Travis.
Also hotwires updating ruby as CocoaPods was crashing within a support library.

Fixes #1619
2016-06-14 14:26:01 -04:00
Sergio Campamá
71f4a9c6f3 Fixes Xcode 8 analyzer warning saying that it was missing a release in dealloc (#1678) 2016-06-14 09:28:22 -04:00
Feng Xiao
088c5c491e Merge pull request #1664 from bshaffer/patch-1
proper codeblock in README
2016-06-10 10:14:15 -07:00
Walter Gray
4150a91c14 make protobuf_MSVC_STATIC_RUNTIME a dependent option to reflect it's use. 2016-06-09 17:27:46 -07:00
Walter Gray
78b3498bf4 Save the relevant options used to create a package, allow users to reject packages based on them. 2016-06-09 17:27:46 -07:00
Walter Gray
5ebcfc1cfd Fix prerelease version matching to be more consistent with the find_package arguments. 2016-06-09 17:22:31 -07:00
Brent Shaffer
f8a969d50a proper codeblock in README 2016-06-09 10:36:21 -07:00
Feng Xiao
fba7976f5d Merge pull request #879 from mathstuf/support-equals-in-proto-path
protoc: support '=' in --proto_path arguments
2016-06-08 14:43:45 -07:00
Walter Gray
cadfbc8e2f Removed handling for ALIASED targets since they are unused. 2016-06-07 20:33:24 -07:00