Commit Graph

6356 Commits

Author SHA1 Message Date
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
Adam Cozzette
81f6aa404c Ran ./update_file_lists.sh to update CMake configuration 2018-12-10 13:49:44 -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
Adam Cozzette
a77b867bd2
Merge pull request #5436 from acozzette/fix-sched-yield
Removed configure check for sched_yield
2018-12-07 16:28:14 -08:00
Adam Cozzette
61f5dca471 Removed configure check for sched_yield
In the past we used sched_yield for some initialization code, but we are
no longer using it. This change removes the configure script check for
sched_yield so that we can still build even if sched_yield does not seem
to be available. This fixes #5435.
2018-12-07 09:01:12 -08:00
Adam Cozzette
93d5efaa4b
Merge pull request #5430 from acozzette/fixes-for-3.7
Cherry-picked some internal fixes from Google
2018-12-06 15:49:50 -08:00
Adam Cozzette
76d3961501 Cherry-picked some internal fixes from Google
- Avoid using typeid() so that we don't depend on RTTI
- Change internal AP MapData() to MutableMapData() and added
  GetMapData()
2018-12-06 14:59:24 -08: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
Adam Cozzette
897c2a2216
Merge pull request #5349 from Allen-Webb/master
cpp_generator: Add generator options for --cpp_out.
2018-11-14 10:26:33 -08:00
Thomas Van Lenten
c0bc265b67 Fix up the Xcode project.
The builds were failing under Xcode 10 because of the new build system.
Even when reverted to the old build system, the build was failing
on the analyzer and swift bridging header, so it seems the general
logic for searching for things was changed in a way the setting does
not always cover.

- Disable HeaderMaps.
- Set user header search paths instead of system search paths.
- Turn off always search user paths (now recommended).

Tested in Xcode 10.1 and 9.4.1; both are able to build/pass with this.
2018-11-14 12:32:02 -05:00
Allen Webb
375d32d3eb cpp_generator: Add support for --cpp_out=speed:...
Previously --cpp_out:lite was available to force the optimization mode
to the lite runtime. This adds --cpp_out=speed:...
which is needed to override the file specific options in cases where
libprotobuf-mutator is used for fuzzing since it depends on reflection.

Signed-off-by: Allen Webb <allenwebb@google.com>
2018-11-13 15:35:20 -08:00
Adam Cozzette
2f28980f07
Merge pull request #5323 from aconchillo/cpp-generator-nullptr
compiler/cpp: replace NULL with nullptr
2018-11-13 11:41:12 -08:00
Aleix Conchillo Flaque
83ddea02bd compiler/cpp: replace NULL with nullptr
This avoids compiler errors/warnings if zero-as-null-pointer-constant is
considered an error or warning.
2018-11-13 10:47:31 -08:00
Adam Cozzette
cf900534a7 Removed stubs/singleton.h
This header is no longer used, so we can delete it. I also tweaked
Makefile.am to fix the distcheck test.
2018-11-13 10:28:49 -08:00