Commit Graph

5643 Commits

Author SHA1 Message Date
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
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
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
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
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
Feng Xiao
4600f789a2
Merge pull request #4587 from chronoxor/master
Appveyor MinGW build
2018-05-14 13:44:29 -07:00
Feng Xiao
6dda83dc8c
Merge pull request #4611 from anuraaga/remove-string-move
[Java] Remove unsafe no-copy String allocation since it's not useful in rece…
2018-05-14 13:41:03 -07:00
Warren Falk
e7eeb7004b fix index out of range error in C# generation using msvc (#1329) 2018-05-14 13:39:26 -07:00
Yilun Chong
c3566c6861 Fix python install, cat java error log for kokoro build 2018-05-14 12:00:21 -07:00
Christian von Arnim
b9c0c5f526
cmake: Add parameter PROTOC_OUT_DIR to protobuf_generate 2018-05-14 09:22:34 +02:00
Christian von Arnim
e8ae76fbde
cmake: Use GENERATE_EXTENSIONS parameter in protobuf_generate 2018-05-14 09:22:08 +02:00
Paul Yang
b61dd9d9a2
Add file option php_metadata_namespace and ruby_package (#4609) 2018-05-11 13:57:06 -07:00
Feng Xiao
2213c1c1f6
Merge pull request #4538 from Mizux/patch-2
Add .proto files to extract_includes.bat
2018-05-10 22:44:47 -07:00
Anuraag Agrawal
92ac1ed6a5 Remove unsafe no-copy String allocation since it's not useful in recent Java versions. 2018-05-11 14:27:31 +09:00
Paul Yang
7377d81ca4
Throw error if user want to access message properties (#4603)
* Throw error if user want to access message properties

* Fix typo
2018-05-10 10:52:39 -07:00
Paul Yang
5f7334f5f3
Avoid direct check of class name (#4601)
* Avoid direct check of class name

So that subclasses are also ok

* Use type hint in function signature.
2018-05-10 10:52:00 -07:00
Jie Luo
5f9232b5e0
use brew install instead of easy_install in OSX (#4537)
use brew instead of easy_install in OSX (easy_install keep failing for a month)
2018-05-09 15:35:03 -07:00
Feng Xiao
25625b956a
Merge pull request #4590 from PetterS/undefined_fix
Fix error in Clang UndefinedBehaviorSanitizer
2018-05-06 11:48:44 -07:00
Petter Strandmark
d14cacd791 Fix error in Clang UndefinedBehaviorSanitizer
Pointer Arguments to memcpy can not be null in UndefinedBehaviorSanitizer.
In this case, both the memory and the size was zero. This change allows
protoc to run under UndefinedBehaviorSanitizer.
2018-05-04 20:37:03 +02:00
David Chennells
513b35dc4e Add VS2017 optional component dependency details to the C# readme (#4128)
Add mention to the "Build" section of the ReadMe of the requirement of installing an optional component to VS2017.
2018-05-03 15:59:36 -07:00
Yilun Chong
4a09836e6c Fix python ext build on kokoro (#4527) 2018-05-03 15:55:27 -07:00
Ivan Shynkarenka
feb183d895 Appveyor MinGW build 2018-05-03 03:17:19 +03:00
Feng Xiao
92898e9e9c
Merge pull request #4586 from chronoxor/master
Fix MinGW build
2018-05-02 13:45:28 -07:00
Ivan Shynkarenka
3474155371 MinGW build failed 2018-05-02 22:37:17 +03:00
Feng Xiao
b0403a7db8
Merge pull request #4583 from chronoxor/master
Fix CMake build on Cygwin.
2018-05-01 18:07:42 -07:00
Ivan Shynkarenka
f80a886bc1 Cygwin build failed 2018-05-02 03:01:10 +03:00
Stuart Campbell
05c2d01b61 Fix RepeatedField#delete_if (#4292)
Make RepeatedField#delete_if consistent with Array#delete_if.
2018-04-30 16:04:13 -07:00
Petar Dambovaliev
0869b1a0a7 Add space between class name and concat message (#4577)
The class name was linked to the next word in the sentence.
"User\UserRequestis not found in descriptor pool."
2018-04-30 11:00:46 -07:00
Feng Xiao
306f4e3774
Merge pull request #4581 from Yeolar/3rd_rpc_raster
Add a third-party RPC implementation: raster
2018-04-30 10:55:00 -07:00
Hiroshi Ichikawa
7d978084ca [objectivec] Fix memory leak of exceptions raised by RaiseException() (#4556)
* Fix memory leak of exceptions raised by RaiseException()

Currently exceptions raised by RaiseException() is never deallocated because:

* ARC is disabled for this library: https://github.com/google/protobuf/blob/master/BUILD#L913
* It is constructed with `+alloc` but is never `-release`d.

This change fixes the issue by using `-[NSException exceptionWithName:...]` instead, which returns an autoreleased instance, so it is deallocated properly.

* Fix format.
2018-04-30 11:44:41 -04:00
Yeolar
35e4430ebe Add third-party RPC implementation: raster - a network framework supports pbrpc by 'service' keyword. 2018-04-30 19:56:30 +08:00
Jozef Izso
8233d46207 Include version.rc.in in distribution package 2018-04-28 10:53:54 +02:00
Jozef Izso
b1fecd0dea Include file information in all DLL and EXE outputs 2018-04-28 00:12:38 +02:00
Jozef Izso
3415201d1d Add file information to Windows binaries 2018-04-27 23:44:38 +02:00
Feng Xiao
fc922d16ed
Merge pull request #4568 from hectim/master
fixed typo
2018-04-27 12:21:15 -07:00
Feng Xiao
7f2c3cec63
Merge pull request #4550 from Mizux/master
CMake: Update CXX Standard management
2018-04-27 12:11:25 -07:00
Jon Skeet
1b219a174c Fix to allow AOT compilers to play nicely with reflection
With this fix, Unity using IL2CPP should work with one of two
approaches:

- Call `FileDescriptor.ForceReflectionInitialization<T>` for every
  enum present in generated code (including oneof case enums)
- Ensure that IL2CPP uses the same code for int and any int-based
  enums

The former approach is likely to be simpler, unless IL2CPP changes
its default behavior. We *could* potentially generate the code
automatically, but that makes me slightly uncomfortable in terms of
generating code that's only relevant in one specific scenario. It
would be reasonably easy to write a tool (separate from protoc) to
generate the code required for any specific set of assemblies, so
that Unity users can include it in their application. We can always
decide to change to generate it automatically later.
2018-04-27 16:47:46 +01:00
Brady Killeen
9ba2fd3039 typo 2018-04-26 18:27:03 -06:00
Jisi Liu
a21f225824
Merge pull request #4553 from pherl/ruby
Set ext.no_native = true for non mac platform
2018-04-25 14:16:13 -07:00