Commit Graph

6786 Commits

Author SHA1 Message Date
Jie Luo
43156775be
Merge 3.9.x 201908071359 to master (#6484)
* Add changelog for 3.9.x

* Revert "Make php message class final to avoid mocking (#6277)" (#6324)

This reverts commit 7f84a94366.
This is just temporary. Eventually, we still want to roll forward this
change. Some users are complaining they need more time to clean up their
code.

* Update extract_includes.bat.in

File io_win32.h is not in directory google\protobuf\stubs under directory google\protobuf\io

* Set oneof case in array constructor (#6351)

Forgot to set it previously.

* Update protobuf version (#6366)

* Drop building wheel for python 3.4 (#6406)

https://github.com/matthew-brett/multibuild/pull/240

* Fix binary compatibility in FieldCodec factory methods (#6380) (#6424)

* Fix binary compatibility in FieldCodec factory messages

* Make default value parameter for current factories required

* Route old methods through default value overloads

* Remove ExtensionRegistry.Add(params) overload

* Rename ExtensionRegistry.Add(IEnumerable<Extension>) overload to AddRange

* Edit naming of parameters in Extension classes

* * Fix add API warnings to docs for extension APIs
* Rename internal ExtensionSet.GetValue to TryGetValue

* Disable javadoc error (#6371)

* Disable javadoc error

Actual fixes of the javadoc will be followed up

* Remove duplicated configuration

* Update javadoc plugin version

* Updated Bazel test script to use most recent Bazel version (#6413) (#6433)

I'm not exactly sure why, but this fixes the failing Bazel presubmit
test. Using the most recent version seems like a good idea anyway so
that we can make sure we're compatible with any new Bazel changes.

* [bazel] Add fixes for --incompatible_load_{cc,java,proto}_rules_from_bzl

* No need to update version in generated code (#6471)

generate_descriptor will handle that

* Update protobuf version (#6472)
2019-08-09 13:21:18 -07:00
Paul Yang
56988bee34
No free when construct was not done (#6483)
* No free when construct was not done

This fix the segfault when some other error happens

* Add more tests

* Use Sub to avoid printing too much
2019-08-07 13:17:20 -07:00
Yannic Bonenberger
d2d6ff51a8 [bazel] Load python rules from @rules_python 2019-08-06 16:50:32 -07:00
Paul Beusterien
479ba8226b Override CocoaPods module to lowercase (#6464)
Fix #3218
2019-08-06 15:05:24 -04:00
Paul Yang
a450e13a95
Revert "Fixed JS parsing of default map values (#6394)" (#6468)
This reverts commit dcc8ffd9c6.
2019-08-02 15:04:31 -07:00
Paul Yang
0c4b607e98
Conformance packed (#6447)
* Add conformance tests for explicit packed/unpacked fields

* Fix typo

* Update failure lists

* Update failure list

* Use enum class to make enum scoped
2019-08-02 14:35:44 -07:00
Jie Luo
d1eeb852fc
compatibility test between last released and current for java python php (#6441)
* compatibility tests between last released and the current version
2019-07-31 17:49:26 -07:00
Gaël Delalleau
5db5c26ae4 Fix a Python extension crash in the descriptor's nested types container code (#6455) 2019-07-31 14:52:53 -07:00
Wang Kirin
f38b6ed041 add test case in cpp_bootstrap_unittest.cc 2019-07-30 07:41:26 -07:00
Yannic Bonenberger
bf0c69e130 [bazel] Add fixes for --incompatible_load_{cc,java,proto}_rules_from_bzl (Part 2)
This change adds the required loads to examples and zlib.
For full compatibility with --incompatible_load_{cc,java,proto}_rules_from_bzl,
we will need to roll gtest to a newer version.
2019-07-29 14:14:04 -07:00
Adam Cozzette
5b6238e486
Merge pull request #5044 from laszlocsomor/expand-wildcards
Windows: expand path names on command line
2019-07-29 14:07:43 -07:00
Laszlo Csomor
bee5538fda "enum class" instead of "enum" 2019-07-29 15:18:34 +02:00
Laszlo Csomor
ea61636cbc Merge branch 'master' into expand-wildcards 2019-07-29 15:16:10 +02:00
Andrei Shevtsov
1024cbea34 Fix ruby proto3 extension support (#6369) 2019-07-28 10:10:50 -07:00
Paul Yang
a9bb65643b
Add binary conformance test for default repeated fields (#6440)
* Add binary conformance test for default repeated fields

1) Both packed and unpacked encoding should be accepted for parsing.
2) Encode should follow the default way for the syntax.

* Uncomment test

* Remove is_primitive

* Add failed tests to failure lists.

* Add failed test to failure list

* Use binary format to specify expected value

Text format cannot distinguish whether repeated field is packed or not.

* Change method name from ToHexString to ToOctString

* Add failed test to failure list

* Add failed test to php's failure list

* Fix comments
2019-07-26 10:05:14 -07:00
Jie Luo
e399308ef0 Add csharp compatibility tests between last released and the current version (#6407)
* Add csharp compatibility tests for 3.7.0

* Add compatibility test between last major version with current for C#

* Update last version number

* compatibility tests between last released and the current version

* fix typo
2019-07-25 14:31:00 -07:00
Joe Bolinger
41e12344a1 Support hashes for struct initializers (#5716)
* support hashes for struct initalizers

* convert hash keys to string

* update tests

* add extra asserts
2019-07-25 11:17:51 -07:00
Lian Duan
dcc8ffd9c6 Fixed JS parsing of default map values (#6394) 2019-07-24 16:32:21 -07:00
Josh Humphries
cb58738de2 add test 2019-07-24 13:47:18 -07:00
Josh Humphries
f68b251f75 don't emit location for label unless label is present 2019-07-24 13:47:18 -07:00
Paul Yang
2849a79990
Add binary conformance test for message type. (#6435)
* Add binary conformance test for message type.

* Add test case for merge repeated scalar message field

* Add failed tests to failure list

* Add failed test to php's failure list

* Remove successful tests from php c's failure list
2019-07-24 12:26:40 -07:00
Yannic Bonenberger
ff21d0f877 Copy files to temp-dir for testing 2019-07-24 10:23:55 -07:00
Yannic Bonenberger
edbc27fb81 Print logs of failing tests 2019-07-24 10:23:55 -07:00
Yannic Bonenberger
27e85ab55d Address review comments 2019-07-24 10:23:55 -07:00
Yannic Bonenberger
4979489451 Add test to verify BUILD- and cmake-files are in sync with src/Makefile.am 2019-07-24 10:23:55 -07:00
Yannic Bonenberger
6e8991981a [bazel] Add fixes for --incompatible_load_{cc,java,proto}_rules_from_bzl 2019-07-24 10:10:22 -07:00
Paul Yang
455440fc47
Add binary conformance test for enum fields. (#6434)
* Add binary conformance test for enum fields.

* Add failed conformance test to js failure list
2019-07-23 15:07:26 -07:00
rmstar
2c76c2c413 Add podspec for C++ (#6404) 2019-07-23 13:51:21 -07:00
Paul Yang
29e4fadbfb
Add binary conformance test case for bytes field (#6428)
* Add binary conformance test case for bytes field

* Add failed conformance test to php's failure list
2019-07-23 12:42:30 -07:00
Joe Bolinger
180d3e3287 fix null terminated string (#6370) 2019-07-22 17:11:58 -07:00
Paul Yang
33af06edbb
Drop building wheel for python 3.4 (#6406) (#6426)
https://github.com/matthew-brett/multibuild/pull/240
2019-07-22 16:52:46 -07:00
Paul Yang
eef87dd138
Add conformance test for binary string (#6415)
* Add conformance test for binary string

* Add failing tests to php failure list
2019-07-22 16:52:31 -07:00
Paul Yang
d28cf02ee0 Drop building wheel for python 3.4 (#6406)
https://github.com/matthew-brett/multibuild/pull/240
2019-07-22 14:56:18 -07:00
Wang Kirin
1bbae02cff fix typo in io/printer.h 2019-07-22 13:41:14 -07:00
Sydney Acksman
9857d636fd Fix binary compatibility in FieldCodec factory methods (#6380)
* Fix binary compatibility in FieldCodec factory messages

* Make default value parameter for current factories required

* Route old methods through default value overloads
2019-07-19 16:25:00 -07:00
Leon Barrett
de5d071f44 Fix assignment between Python protobuf Structs (#6377)
Currently, if you access a ListValue from a Struct and attempted to
assign it to another Struct, you would get an exception:

   > s1 = spb.Struct()
   > s1['a'] = [1]
   > s2 = spb.Struct()
   > s2['a'] = s1['a']
   ValueError: Unexpected type

This fixes that case.
2019-07-19 15:47:52 -07:00
Paul Yang
7bff8393ca
Down Integrate to GitHub (#6414)
* Down integrate to GitHub

* Fix broken tests
2019-07-19 14:49:01 -07:00
Adam Cozzette
63d9c1fb95 Updated Bazel test script to use most recent Bazel version (#6413)
I'm not exactly sure why, but this fixes the failing Bazel presubmit
test. Using the most recent version seems like a good idea anyway so
that we can make sure we're compatible with any new Bazel changes.
2019-07-19 12:55:58 -07:00
Thomas Van Lenten
400d3888b9 Revert bad change to objc conformance test in #6199
Since true for objc is external, changes should always start on the github
side, so the fact that something got pushed out is a sign something was
broken in the process.
2019-07-19 10:14:53 -04:00
Laszlo Csomor
5e026abd05 Merge branch 'master' into expand-wildcards 2019-07-19 10:09:18 +02:00
Laszlo Csomor
a700fc7aeb Remove shortpath-related code from ExpandWildcards 2019-07-19 10:08:46 +02:00
Yannic Bonenberger
a03d332aca [bazel] Use strip_import_prefix for wkp instead of copying them 2019-07-18 13:59:40 -07:00
Laszlo Csomor
ef3df0e807 Use C++11 enum class 2019-07-18 13:14:56 +02:00
Laszlo Csomor
416872ef2c Merge branch 'master' into expand-wildcards 2019-07-18 12:11:06 +02:00
Adam Cozzette
582640ef31 Updated cmake path to io_win32.h (#6397)
Fixes #6382.
2019-07-17 15:38:57 -07:00
Adam Liddell
19ca196e4d Remove zlib copts flags when on Windows 2019-07-17 13:17:02 -07:00
Po-Chuan Hsieh
640b932cf8 Fix test on FreeBSD
google/protobuf/testing/zcgzip.cc:61:25: error: unknown type name 'STDOUT_FILENO'
  FileOutputStream fout(STDOUT_FILENO);
                        ^
google/protobuf/testing/zcgzip.cc:61:24: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]
  FileOutputStream fout(STDOUT_FILENO);
                       ^~~~~~~~~~~~~~~
google/protobuf/testing/zcgzip.cc:61:25: note: add a pair of parentheses to declare a variable
  FileOutputStream fout(STDOUT_FILENO);
                        ^
                        (
google/protobuf/testing/zcgzip.cc:75:20: error: use of undeclared identifier 'STDIN_FILENO'
    readlen = read(STDIN_FILENO, outptr, outlen);
                   ^
1 warning and 2 errors generated.
gmake[3]: *** [Makefile:4009: google/protobuf/testing/zcgzip.o] Error 1

google/protobuf/testing/zcgunzip.cc:62:23: error: unknown type name 'STDIN_FILENO'
  FileInputStream fin(STDIN_FILENO);
                      ^
google/protobuf/testing/zcgunzip.cc:62:22: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]
  FileInputStream fin(STDIN_FILENO);
                     ^~~~~~~~~~~~~~
google/protobuf/testing/zcgunzip.cc:62:23: note: add a pair of parentheses to declare a variable
  FileInputStream fin(STDIN_FILENO);
                      ^
                      (
google/protobuf/testing/zcgunzip.cc:74:23: error: use of undeclared identifier 'STDOUT_FILENO'
      int err = write(STDOUT_FILENO, inptr, inlen);
                      ^
1 warning and 2 errors generated.
gmake[3]: *** [Makefile:4009: google/protobuf/testing/zcgunzip.o] Error 1

Reference:	https://bugs.FreeBSD.org/bugzilla/show_bug.cgi?id=215346
		https://svnweb.FreeBSD.org/changeset/ports/428734
2019-07-17 13:02:54 -07:00
Seth Greenstein
744e799bda Change "python" to "python_headers" in comment (#6046)
Following the instructions as is does not work, the new_local_repository rule needs to be called "python_headers"
2019-07-15 16:40:57 -07:00
Adam Liddell
a74c43bbd9 Fix usage of six in //:protobuf_python rule and add import (#6310)
* Fix reference to six in //:protobuf_python rule

* Add six to protobuf_deps.bzl

* Use six archive directly as repo @six
2019-07-15 16:35:19 -07:00
Laszlo Csomor
ce180aa309 Rename expand_wildcards to correct style 2019-07-15 13:58:24 +02:00