Commit Graph

6224 Commits

Author SHA1 Message Date
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
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
Adam Cozzette
e242a9b79a
Merge pull request #5375 from arunov/fix-overrides-pr
Add overrides in C++ code.
2018-11-26 13:41:09 -08:00
giokara-oqton
f22be4ddb0 fix json_format.ParseDict modifies input (#5267)
* fix json_format.ParseDict modifies input

* added unit test

* fix naming
2018-11-26 11:08:54 -08:00
Adam Cozzette
9313cdc442
Merge pull request #5386 from ThinkDigitalRepair/patch-1
Update add_person.dart
2018-11-20 21:44:52 -08:00
Jonathan White
b017ac4b87
Update add_person.dart
Fixed typo in a function name.
2018-11-20 18:45:25 -08:00
Joshua Haberman
81c3e0cf52
Merge pull request #5142 from noloader/master
Mostly fix Sun Studio configuration using SunCC compiler (GH #5141)
2018-11-19 13:53:50 -08:00
Mikhail Morgunov
cb7678ebb9 Actualizing RubyGems link in README.md (#5378) 2018-11-19 13:38:12 -08:00
Stephane Moore
b323b13679 [protobuf/objc] Introduce a protobuf-specific deprecation annotation ⚠️
Instead of using DEPRECATED_ATTRIBUTE from AvailabilityMacros.h, we should introduce a Google-specific Objective-C protobuf deprecation annotation. This helps address IWYU issues with using DEPRECATED_ATTRIBUTE and also enables allows clients to redefine the macro to treat protobuf warnings differently than other types of warnings (e.g., treating protobuf deprecation warnings as errors or ignoring them).
2018-11-19 13:33:41 -05:00
Joshua Haberman
db96ab0019
Merge pull request #5368 from haberman/objc
Some changes to the ObjC code generator to support importing into Google.
2018-11-19 09:21:28 -08:00
Thomas Van Lenten
ffa6bfc01a
ObjC: small improvement to extension serialization.
For messages that have multiple extension ranges, this will improve things
by avoiding repeated work.  For messages with a single range, it should
be a wash.

- Sort the list of set extensions once during serialization and reuse the list.
- Break out of the serialization loop as soon as the loop has moved pasted at
  accepted range for field ids.
2018-11-19 11:42:47 -05:00
Arun Olappamanna Vasudevan
45a595d249 Add overrides in C++ code. 2018-11-18 05:12:13 -08:00