Commit Graph

6334 Commits

Author SHA1 Message Date
Paul Yang
4dec4f9371
Rebuild python docker image (#5475)
* Rebuild python docker image

* Update docker image

* Change call to build_and_run_docker.sh

* Set up python tests for different versions

* Fix comments
2018-12-18 18:07:24 -08:00
Adam Cozzette
6dc1d4353f
Merge pull request #5470 from meteorcloudy/win_test
Exclude command_line_interface_unittest.cc in MSVC build
2018-12-18 17:57:06 -08:00
Yilun Chong
6adc3d74fb
Fix benchmark to use docker image on kokoro (#5481)
* Fix benchmark to use docker image on kokoro

* Deleted pure php benchmark and fix long time benchmark
2018-12-18 16:20:23 -08:00
Adam Cozzette
cbf89a647a
Merge pull request #5488 from acozzette/unused-kokoro
Removed Kokoro config for 64-bit Linux
2018-12-18 15:28:38 -08:00
Adam Cozzette
453274b72d Removed Kokoro config for 64-bit Linux
This Kokoro configuration is no longer being used and the build.sh
script does not work anymore, so let's delete this configuration.
2018-12-18 14:57:46 -08:00
Paul Yang
d7c4409589
Php 7.3 fix (#5434)
* Inherit from message instead of implement

When regestering class (implmenets other class) during MINIT, zend_class_implements
would call zend_class_entry->interface_gets_implemented(). In PHP-7.3 interface_gets_implemented shares the same location with create_object.
However, during MINIT, the global object storeage hasn't been initialized. And thus, caused segment fault in php 7.3.

* Use zend_string_init where interned string may be the value.
zend_string_dup will keep using the existing interned string.
In php 7.3, interned string cannot be destroyed from user's code.

* Uncommment debug code

* Use latest phpunit for each php versions

* Revert change in Dockerfile

* Update php test to use the new docker image

* Update composer

* Change docker organization

* Update phpunit

* Debug phpunit

* Store phpunit into bin dir in docker image

* Install valgrind to docker

* Fix compatibility test

* Remove generated_service_test from compatibility c extension test

* Update 32bit php test to the new docker image

* Install bison

* Fix build.sh

* Fix DOCKERIMAGE_PREFIX

* Fix basename

* Add comment to build_and_run_docker2.sh

* Remove commented code

* Fix comments
2018-12-18 10:57:03 -08:00
Thomas Van Lenten
d529720e2f If enum aliases overlap in ObjC names skip generating the extras.
Some protos have enum values of "FOO" and "Foo", which the ObjC generation
then makes into the same thing. Just skip generating the enum element for
the duplicate as it would be a compile error because of the name collision.

The descriptors are still generated to support reflection and TextFormat
more completely.
2018-12-18 08:11:58 -05:00
Thomas Van Lenten
4c559316e0 Small fix to -[GPBEnumDescriptor getValue:forEnumTextFormatName:]
Don't look up the TextFormat for the value as aliases can trip that
up, instead check the TextFormat names directly and then fetch the
value.
2018-12-18 08:11:58 -05:00
Hao Nguyen
c11096c10d Do not require Ruby enum to be upper case 2018-12-14 17:06:36 -08:00
Hao Nguyen
37dbfd6c46 Do not require ruby enum to be uppercase 2018-12-14 17:06:11 -08:00
Hao Nguyen
00b9b2303c Add conformance test for enum alias with same name but different case 2018-12-14 16:48:06 -08:00
Hao Nguyen
a6d624ba44 Merge branch 'master' of https://github.com/haon4/protobuf 2018-12-14 16:41:49 -08:00
Hao Nguyen
3d46d8dfe4 Add conformance test for enum alias of the same name with different case 2018-12-14 16:41:44 -08:00
Paul Yang
cecba296b8
Down-integrate internal changes (#5467)
* Down-integrate internal changes

* Update generated code for php, objc and csharp.

* Add missing dependency in conformance_php
2018-12-14 16:05:03 -08:00
Hao Nguyen
f93cf5a3cf
Merge pull request #5471 from haon4/master
Replace update_version shell script with a python script
2018-12-14 15:46:21 -08:00
Hao Nguyen
4b02f652e0 Make sure to add a new line at the end of XML files 2018-12-14 15:10:11 -08:00
Hao Nguyen
9349e23827 Replace update_version shell script with a python script, which is much better at handling XML rewrite. Update the PHP version too. As part of rewrite, some XML file format will change a little, but the semantics is still the same so it should be okay. 2018-12-14 15:05:48 -08:00
Joshua Haberman
38abec80fc
Merge pull request #5469 from haberman/objc
ObjC compiler changes to allow for easier import
2018-12-14 07:29:13 -08:00
Yun Peng
073487b302 Exclude command_line_interface_unittest.cc in MSVC build 2018-12-14 12:53:36 +01:00
Josh Haberman
5eb34cd727 More fixes. 2018-12-13 18:02:04 -08:00
Josh Haberman
401db44e6a More fixes. 2018-12-13 17:48:52 -08:00
Josh Haberman
eff1a6a014 More fixes for import. 2018-12-13 16:29:34 -08:00
Hao Nguyen
e9ea200e71
Merge pull request #5468 from haon4/master
Use docker for csharp, java_compatibility, and python_compatibility.
2018-12-13 16:10:12 -08:00
Hao Nguyen
6cb87bd157 Use docker for csharp, java_compatibility, and python_compatibility. Remove prepare_build_linux_rc that is no longer needed. 2018-12-13 15:20:25 -08:00
Paul Yang
5518c016a7
Compile php source to enable openssl and add php7.3 support (#5466) 2018-12-13 14:45:34 -08:00
Dave MacLachlan
b6311767e6 Minimize amount of filepaths being copied into protos.
By putting the NSAssert behind a DEBUG flag we aren't copying filepaths
into release builds.
2018-12-13 08:53:50 -05:00
Adam Cozzette
a50008ffac
Merge pull request #5452 from acozzette/update-examples-workspace
Updated Bazel workspace in examples/ to handle zlib dependency
2018-12-12 21:56:17 -08:00
Hao Nguyen
15c30d72a4
Create a script to help update the version automatically (#5454)
* Create a script to help update the version automatically

* Update comment in the update_version script

* Update script to fix special handling for common.h and Makefile.am

* Revise update_version script to only update the other constants in common.h if it is a major release. Reset Makefile.am version to 17:0:0
2018-12-12 15:38:14 -08:00
Adam Cozzette
e03c0d22a7 Updated Bazel workspace in examples/ to handle zlib dependency
To make this work, I created a symlink to the existing zlib.BUILD file.
Maybe there is a better way to do this, but this is at least a quick
workaround to fix the build.
2018-12-11 16:52:50 -08:00
Josh Haberman
9851c703ae Rename StringPieceTrimWhitespace() for rewriting purposes. 2018-12-11 16:43:05 -08:00
Hao Nguyen
52fee0e8f0
Merge pull request #5445 from haon4/master
Make Protobuf compatible with C# 6
2018-12-11 14:19:38 -08:00
Paul Yang
1d90079873
Add composer config to Dockerfile (#5451) 2018-12-11 14:00:51 -08:00
Cody Schroeder
802d543173 Add Bazel config for zlib support (#5389)
* Add Bazel config for optional zlib support

* Add hard dependency on zlib

* Remove unused config_setting
2018-12-11 11:58:26 -08:00
Paul Yang
8bd1542980
Add docker file for php testing. (#5447) 2018-12-10 16:32:56 -08:00
Hao Nguyen
db0a9e0b96 Add <LangVersion>6</LangVersion> to the core protobuf C# project to prevent future incompatibility 2018-12-10 15:21:01 -08:00
Joshua Haberman
d7cd54372c
Merge pull request #5396 from hesmar/hesmar/fixCmakeInstallHeader
Windows: install missing headers
2018-12-10 22:41:44 +01:00
Hao Nguyen
3d207c33a4 Fix TimestampPartial operator == overload implementation: Cannot call == inside it, otherwise it would cause stack overflow 2018-12-10 13:41:15 -08:00
Adam Cozzette
73276dbf5f
Merge pull request #5442 from ayounes-nviso/cmake
fix: cmake install
2018-12-10 10:57:47 -08:00
Hao Nguyen
24638088c6 Make Protobuf compatible with C# 6 2018-12-10 10:22:41 -08:00
Abdel Younes
35aa9fdcbd fix: cmake install 2018-12-10 14:55:17 +01:00
Thomas Van Lenten
1484b58056 [ObjC] Properly annotate extensions for ARC.
Just like fields, some extension fieldnames can be named such that they appear
to have meaning to ARC. Add the annotation to the compiler will get things
correct.

Add a bunch of extensions to allow inspection on generation to ensure things
are correct.
2018-12-05 13:15:30 -05:00
Markus Heß
6688b60c36 Windows: install missing headers 2018-12-05 17:27:21 +01:00
Thomas Van Lenten
c486130482 Annotate the GPBDictionary enumerate* apis with NS_NOESCAPE.
This should help the Swift compiler if these apis are used because it
changes the codegen to not need copies/retains.
2018-12-05 11:08:18 -05:00
Thomas Van Lenten
2af9c68591 Annotate the GPBArray enumerate* apis with NS_NOESCAPE.
This should help the Swift compiler if these apis are used because it
changes the codegen to not need copies/retains.
2018-12-05 11:08:18 -05:00
Stephane Moore
74fa874537 [protos/objc] Include more context in deprecation messages ⚠️
For deprecated fields, identify the deprecated field and source file in the deprecation message. For deprecated files, identify the deprecated file in deprecation messages of generated interfaces. This additional context in deprecation messages will help provide developers with more context which could help them seek recommended alternatives to deprecated interfaces.
2018-12-03 10:20:24 -05:00
Paul Yang
704037f23a
Change MACOSX_DEPLOYMENT_TARGET to 10.9 (#5406)
* Add kokoro build for python source package

* Use libc++ for xcode 10 (#5303)

The xcode 10 removes the deprecated libstdc++ library. We could set
"MACOSX_DEPLOYMENT_TARGET" to "10.9" to use libc++ instead.

* Add python 3.7 build

* Add build for python 3.7 on linux and windows

* Remove unused source build

* Add comment

* Fix $MACOSX_DEPLOYMENT_TARGET mismatch

* Fix MACOSX_DEPLOYMENT_TARGET mismatch

* Add missing import for sysconfig

* Add missing imports
2018-11-28 16:45:16 -08:00
michaelbausor
0b9af83dae PHP: Add Enum methods for converting to/from strings (#5342)
* adds string-to-int and int-to-string methods to enums

* remove check for valueToName property in EnumTrait

* Remove unused imports

* Update to avoid using EnumTrait

* Remove EnumTrait

* Update enum types

* Move name and value methods into generated classes

* Remove functions from GPBUtil

* Test well known enums

* Implement enum value to/from name in c extension

* Only generate use statement when namespace is present
2018-11-28 16:44:53 -08:00
Adam Cozzette
bfdc2ba0ee
Merge pull request #5398 from brian-peloton/master
Avoid octal constants in strutil.cc
2018-11-27 10:17:56 -08:00
Dave MacLachlan
ef3a725002 Make sure Objective C Proto compiler doesn't "duplicate" prefixes unnecessarily.
In some cases proto files that want/need to use the objc_class_prefix option have
types that already have the prefix on a subset of their names. In this case we don't
want to duplicate the prefix.

Added tests for this (and prefixes in general).
2018-11-27 08:06:36 -05:00
Brian Silverman
dd614b772d Avoid octal constants in strutil.cc
The code now matches what the comment above it actually generates.

Also tweak that code so it actually compiles for me, and to avoid
embedding /* and */ in comments because that's generally a reasonable
thing to trigger warnings.
2018-11-26 15:15:43 -08:00