Commit Graph

5904 Commits

Author SHA1 Message Date
Feng Xiao
6e7eeb3431
Merge pull request #4677 from xfxyjwf/bazel
Remove jruby from kokoro tests
2018-05-24 17:50:30 -07:00
Feng Xiao
8175c6e444
Merge pull request #4659 from calder/bazel-python-namespace-fix
Declare 'google' namespace when importing Python protobuf via Bazel
2018-05-24 16:35:16 -07:00
Feng Xiao
35bd9fd05e Remove jruby badge from our README.md. 2018-05-24 16:33:51 -07:00
Feng Xiao
38a794c02f Delete jruby kokoro tests. 2018-05-24 16:32:20 -07:00
Feng Xiao
f65f16a734
Merge pull request #4674 from xfxyjwf/bazel
Add kokoro configs for bazel build.
2018-05-24 16:10:41 -07:00
Adam Cozzette
c8440a35a1 Updated generate_changelog.py
I removed references to javanano, since that implementation no longer
exists. While I was at it I found a couple places where it looked like
the wrong directory was used by mistake and I fixed them.
2018-05-24 15:59:16 -07:00
Feng Xiao
ffc8b35c83 Add kokoro configs for bazel build. 2018-05-24 14:02:48 -07:00
Paul Yang
00d32539c6 Fix array constructor in c extension for compatibility (#4667)
In old generated code, the constructor of message doesn't provide a
default null to parent's constructor. Previously, in c extesnion, this
case was not handled.
2018-05-24 13:39:41 -07:00
Brent Shaffer
6737954661 PHP namespaces for nested messages and enums (#4536)
* uses namespaces for nested messages and enums

* fixes namespaces for PHP dist

* fixes namespace for Descriptors, adds Cardinality and Kind

* fixes nested namespaces for reserved words and adds tests

* adds tests and generator fix for php class prefixes

* fixes escaping of protobuf packages, enum comments, misc others

* nice refactor of generated code

* adds class files for backwards compatibility

* simplifies code with templates

* adds compatibility files to makefile

* cleanup of generator and fixes nested namespace bug

* regenerates proto types

* remove internal BC classes

* adds deprecated warning, adds methods back

* simplifies if statement

* fixes dist files

* addresses review comments

* adds back TYPE_URL_PREFIX constant

* adds @deprecated to old nested class files

* skips tests which require a separate process when protobuf.so is enabled

* Adds tests for legacy nested classes that do not require separate processes to test

* uses legacy names for GPBUtil message check

* adds block for IDE @deprecated message

* Namespace for nested message/enum in c extension

* Remove unused code
2018-05-24 13:39:41 -07:00
Bo Yang
839f71e305 Implement array constructor in php c extension. 2018-05-24 13:39:41 -07:00
Brent Shaffer
f1911f37f8 PHP array constructors for protobuf messages (#4530)
* PHP array constructors for protobuf messages

* removes Descriptor from error message

* allows mergeFrom to accept an array

* only use initWithDescriptor if instanceof MapEntry

* adds doc comments

* removes ability for constructors to take arrays for submessages

* Revert "allows mergeFrom to accept an array"

This reverts commit b7b72182d5.

* makes mergeFromArray protected and fixes mergeFrom whitespace

* Separates merging from JSON and merging from PHP array

* removes well-known types and json keys from array construction

* Addresses PR review comments

* cleans up tests

* fixes exception messages
2018-05-24 13:39:41 -07:00
Adam Cozzette
449e532b08
Merge pull request #4673 from acozzette/memory-leak-fix
Make sure to delete temporary maps used by FileDescriptorTables
2018-05-24 13:23:59 -07:00
Adam Cozzette
daf039b8cd Make sure to delete temporary maps used by FileDescriptorTables
I ran the tcmalloc heap checker in draconian mode, and it reported some
heap allocations that were still reachable when protobuf-test exited. To
fix that, I updated FileDescriptorTables to make sure its temporary
heap-allocated maps are deleted when it is destroyed.
2018-05-24 12:39:25 -07:00
Feng Xiao
b625aabbe7
Merge pull request #4669 from jtattermusch/fix_bazel_build_syntax
Fix syntax error in BUILD file
2018-05-24 10:36:06 -07:00
Jan Tattermusch
ccc56a3c1e fix syntax error in BUILD file 2018-05-24 09:51:53 -07:00
Calder Coalson
142cbe0d57 Declare 'google' namespace when importing Python protobuf via Bazel.
`python/google/__init__.py` declares the top-level 'google' namespace so that
`google.protobuf` can be imported alongside other Google Python modules like
`google.auth`.

This works well when installing protobuf via Pip, but the Bazel `//:python_srcs`
rule doesn't include this file in its `srcs`. Bazel implicitly creates an empty
`google/__init__.py`, which does *not* set up a namespace. The result is that
consuming Python protobuf via Bazel breaks all other Google Python libraries.

This fixes #4658.
2018-05-22 20:19:28 -07:00
Feng Xiao
ce57cccef9
Merge pull request #4663 from TeBoring/ruby-distcheck
Add missing ruby/tests/test_ruby_package.proto
2018-05-22 12:59:53 -07:00
Mizux
7306f549bf CMake OSX rpath management (#4620)
* CMake: Add comment for CMP0048

* CMake: osx use @rpath/ as target's install name (CMP0042)

On MacoS library should use @rpath/ as prefix path instead of absolute build path
e.g. otool -L libprotobuf.dylib
libprotobuf.dylib:
  @rpath/libprotobuf.dylib (...)
  ...

* CMake: add rpath to target for LINUX and APPLE
2018-05-22 12:52:07 -07:00
Yilun Chong
d39a73f203
Merge pull request #4660 from BSBandme/fix_kokoro_benchmark_build
Fix python benchmark build
2018-05-22 12:27:58 -07:00
Feng Xiao
e2c21e513c
Merge pull request #3984 from laszlocsomor/wildcard
Windows: expand wildcard arguments
2018-05-22 12:27:23 -07:00
Bo Yang
090fe398ef Add missing ruby/tests/test_ruby_package.proto 2018-05-22 09:53:03 -07:00
Erik Benoist
a8e2359329 Allows the json marshaller to be passed json marshal options (#4252) 2018-05-22 08:14:04 -07:00
Laszlo Csomor
5517168fa9 Windows: expand wildcard arguments
Fixes https://github.com/google/protobuf/issues/3957
2018-05-22 08:57:57 +02:00
Yilun Chong
d69fd037f8 Fix python benchmark build 2018-05-21 18:59:39 -07:00
Peter Marton
e479adf394 fix(js_generator): check for proto 2018-05-21 16:00:54 -07:00
Yilun Chong
dd2dc0f14f
Merge pull request #4634 from BSBandme/fix_kokoro_benchmark_build
Fix java benchmark bug, fix python lib cache
2018-05-21 15:16:26 -07:00
Yilun Chong
98e097233f Fix java benchmark bug, fix python library_path 2018-05-21 14:56:56 -07:00
Ittai Zeidman
4fcb36c51c remove PACKAGE_NAME and REPOSITORY_NAME deprecated usage (#4650) 2018-05-21 13:48:10 -07:00
Adam Cozzette
2ee7c4555f
Merge pull request #4644 from acozzette/php-timestamp
Updated PHP generated code for timestamp.proto
2018-05-18 09:41:58 -07:00
Paul Yang
9ccc3e536c
Adopt ruby_package in ruby generated code. (#4627)
* Adopt ruby_package in ruby generated code.

* Add test for ruby_package
2018-05-17 17:11:06 -07:00
Adam Cozzette
6ecc87666d Updated PHP generated code for timestamp.proto 2018-05-17 14:36:03 -07:00
Adam Cozzette
ee6d23a4ac Merge branch '3.5.x' into merge-3-5-x 2018-05-17 14:30:12 -07:00
NickFengIBM
036947f630 re-write int128 long division to avoid license impact from stackoverflow references (#4633)
* rewrite int128 long divison to avoid stackoverflow hit

Protobuf was showing Stackoverflow hits in the code base, primarily code written to calculate long division. This code was copied from a stackoverflow post, which means it would be licensed under CC BY-SA 3.0. Due to this license, IBM Legal did not want to include this OSS in our products and advised us to re-write this particular piece of code to avoid the license restriction. We have re-written the code for our own distribution, and are willing to merge it into the main code base for others who want to avoid the stackoverflow license issues to benefit as well.
2018-05-17 12:55:55 -07:00
Feng Xiao
fb33d88ed1
Merge pull request #4619 from ccvca/cmake_protobuf_generate_changes
cmake: protobuf_generate fix GENERATE_EXTENSIONS, fix DEPENDS, add PROTOC_OUT_DIR
2018-05-17 10:17:57 -07:00
Adam Cozzette
ee1c0eb34e
Merge pull request #4631 from banshee/fix_4615
Fix 4615
2018-05-16 13:19:25 -07:00
James Moore
c92b4e11d3 Don't look for sched_yield on Android.
The problem is that sched_yield is available on the target, but configure.ac is asking to build
a host binary using the AC_SEARCH_LIBS macro.  It can't configure for Android, since sched_yield isn't
available on the host.
2018-05-16 12:08:04 -07:00
Adam Cozzette
e232038e06
Merge pull request #4624 from eughermann/hash-ub-fix
Fix undefined behavior in hash function.
2018-05-15 16:33:01 -07:00
Jisi Liu
15cde292ce
Merge pull request #4625 from liujisi/3.6.x
Update version number to 3.6.0
2018-05-15 15:20:51 -07:00
Feng Xiao
6ab3196dae
Merge pull request #4632 from chronoxor/master
Fix issue with version.rc
2018-05-15 14:26:02 -07:00
Ivan Shynkarenka
291d9a0ab0 Fix issue with version.rc 2018-05-15 23:19:58 +03:00
Feng Xiao
5932547a6f
Merge pull request #4574 from jozefizso/patch-1
Fix appveyor documentation
2018-05-15 11:25:22 -07:00
Jozef Izso
8835f5d2f1 Fix appveyor documentation 2018-05-15 13:38:14 +02:00
Christian von Arnim
411018e3fb
cmake: Fix DEPENDS of add_custom_command in protobuf_generate 2018-05-15 09:06:54 +02:00
Robert Hancock
29ad3002cb Declare some generated C++ methods as static #4602
This avoids compile warnings when compiling generated code with the
-Wmissing-declarations option.
2018-05-14 17:17:27 -06:00
Yilun Chong
b83b8e3d44
Merge pull request #4623 from BSBandme/fix_kokoro_benchmark_build
Fix python install, cat java error log for kokoro build
2018-05-14 16:14:04 -07:00
Paul Yang
3d9e99b7e0
Adopt php_metadata_namespace in php code generator (#4622)
* Adopt php_metadata_namespace in php code generator

The php_metadata_namespace is corresponded to the relative directory of
the metadata file. e.g., previously, the metadata file of foo.proto was
GPBMetadata/Foo.php. If the php_metadata_namespace is "Metadata\\Bar",
the metadata file will be Metadata/Bar/Foo.php.

* Handle empty php_metadata_namespace
2018-05-14 16:08:47 -07:00
Jisi Liu
45eb28b588 Update version number to 3.6.0 2018-05-14 16:06:22 -07:00
Eugene Hermann
72d18e3faa
Remove undefined behavior from the hash function.
Signed integer overflow creates undefined behavior that may lead to unpredictable fails on different platforms.
One known example of the hardware where this code did fail is Apple A6 (32-bit Apple Swift CPU)

16777619, 16777499 - two prime numbers that typically used to get better dispersion.
2018-05-14 15:37:18 -07:00
Feng Xiao
ac34bf8f59
Merge pull request #4579 from jozefizso/dev/3380_version_info
Include version information in Windows binaries #3380
2018-05-14 13:47:28 -07:00
Cameron Taggart
394866c002 enable source link for csharp (#4179) 2018-05-14 13:46:03 -07:00