Commit Graph

6212 Commits

Author SHA1 Message Date
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
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
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
Toby Hsieh
59133296a6 Fix most of the unused variable warnings in Ruby tests (#5313)
* Fix most of the unused variable warnings in Ruby tests

* Add encoded_field_b back in tests/common_tests.rb
2018-11-18 00:06:39 -08:00
dyyap
436139803f Updated README.md (#5366)
* Update README.md
2018-11-15 18:47:08 -08:00
Jon Brandvein
7b28271a61 Migrate to new ctx.actions API (#5367)
* Migrate to new `ctx.actions` API

This allows building with --incompatible_new_actions_api.

* Fix typo
2018-11-15 18:19:06 -08:00
Josh Haberman
00987f416b Some changes to the ObjC code generator to support importing into Google.
- removed use of GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
  in favor of deleting them C++11 style.
- removed forward declarations of protobuf core types.
- ensured that namespaces "google" and "protobuf" are
  always opened/closed together.
2018-11-15 17:50:39 -08:00
Adam Cozzette
29747f4ca6
Merge pull request #5363 from acozzette/strutil-header
Make sure to install stubs/strutil.h
2018-11-15 12:48:40 -08:00
Adam Cozzette
034dbf832c Make sure to install stubs/strutil.h
Generated code now pulls in this header transitively, so it needs to be
installed.
2018-11-14 14:50:50 -08:00
Thomas Van Lenten
92a879b2eb Add a unittest for ObjC TextFormat extension support. 2018-11-14 17:06:51 -05:00
Thomas Van Lenten
af2d4134e0 TextFormat extension printing fix.
If a proto has multiple extension ranges back to back, don't double
print the first items as they also are the ending range of the
previous.
2018-11-14 17:06:51 -05:00
Thomas Van Lenten
3eb2889e9e Add the missing newlines between repeated extension files. 2018-11-14 17:06:51 -05:00
Thomas Van Lenten
8dadfda1e3 Improve comment about warning being incomplete. 2018-11-14 14:22:25 -05:00
Thomas Van Lenten
7fa7fbaf16 In debug builds output a warning about NSCoding and extensions.
Using NSCoding with a Message that has extensions is risky because
when reloaded, there is no way to provide a registry through the
NSCoding plumbing, so output a warnings to atleast give developers
a hint about the potential issues.
2018-11-14 13:57:04 -05:00
Adam Cozzette
3c5f52aab4
Merge pull request #5348 from acozzette/remove-singleton-header
Removed stubs/singleton.h
2018-11-14 10:36:36 -08:00