Commit Graph

6138 Commits

Author SHA1 Message Date
Adam Cozzette
86d4fe47df Updated checked-in generated code 2018-11-09 11:35:34 -08:00
Adam Cozzette
b78c218af5 Merge branch 'master' into integrate 2018-11-09 11:28:27 -08:00
Adam Cozzette
0894e07536 Integrated internal changes from Google 2018-11-09 11:28:22 -08:00
Adam Cozzette
ce72041cdd
Merge pull request #5316 from zmodem/dllexport_build_fix
Add wire_format_lite_inl.h include to implicit_weak_message.cc
2018-11-08 14:11:09 -08:00
Dave MacLachlan
be83b29bdd Fix bugs in our keyword conversion support for objectivec
We have code for converting C/C++/Objc keywords that appear in protos
to convert them so that they can be compiled.
One of the things we need to be careful of is accidentally overriding methods
that Apple declares in NSObject. It turns out that we have run into issues
where we conflict with "hidden" methods in NSObject or methods added by
categories. method_dump.sh collects all of the methods we care about for
macOS and iOS and dumps them into objectivec_nsobject_methods.h which
is then included in objectivec_helpers.cc as part of the build.

Added a pile of tests to verify that conversions are happening as expected.
2018-11-08 10:29:03 -05:00
gerben-s
cd95c79149
Merge pull request #5261 from szakarias/dartExample
Add Dart example.
2018-11-06 07:36:21 -08:00
Hans Wennborg
5d8dd6b0ba Add wire_format_lite_inl.h include to implicit_weak_message.cc
This unbreaks the Windows shared-library build of Chrome when using
Clang versions based on r344987 or later, see https://crbug.com/901776

implicit_weak_message.cc is part of protobuf_lite.dll, and it includes
wire_format_lite.h, which includes the dllexport inline function
WireFormatLite::WriteGroupToArray which will therefore be emitted.

WriteGroupToArray in turn calls the inline function
InternalWriteGroupToArray, however that definition is provided in the
_inl file. To make sure the definition is available, the _inl file must
be included.

Before Clang r344987 the build worked anyway due to luck, because
InternalWriteGroupToArray was emitted into other object files (e.g. in
wire_format_lite.obj). After that Clang revision, those definitions
started getting inlined, and so are longer available and cause a link
failure for the reference from implicit_weak_message.obj.
2018-11-06 09:38:51 +01:00
Adam Cozzette
eaf672fda6
Merge pull request #5314 from nilslice/patch-1
3rd-party: include Protolock utility
2018-11-05 17:17:38 -08:00
Steve Manuel
6b10b916e0
include Protolock utility 2018-11-05 17:38:50 -07:00
Sydney Acksman
6f73c50936 C# Proto2 feature : Groups (#5183)
Add group support for proto2
2018-11-05 13:37:08 -08:00
Parveen Bhatia
29f27bfd0b Added safety checks when malloc returns nil in GPBDescriptor 2018-11-04 17:39:50 -05:00
Thomas Van Lenten
eecccdc802 Let the 9.4 migrator migrate the Swift source.
No changes were needed, but since the Xcode projects pick up the updated
setting, the tests require a newer Xcode that supports Swift 4.

This is being done because Xcode 10 starting warning about Swift 3 support
going away in the future, so we might as well do the updates since most
folks shouldn't be on those really old Xcode versions any more.
2018-11-02 13:28:33 -04:00
Thomas Van Lenten
dde14310f4
Support suppressing the objc package prefix checks on a list of files. 2018-11-01 17:18:24 -04:00
Thomas Van Lenten
d52f2bb9e4 Add more Xcode versions to the objc build script. 2018-11-01 14:59:33 -04:00
Thomas Van Lenten
18aa296144 Collapse :protobuf_objc and :objectivec targets.
Not sure the history for why there were two objc_library targets, but
given the one has an issue about not working, merge them into a single
target and an alias.

- Use the alias for :objectivec since that naming doesn't seem to follow
  the other targets *_library targets here.
- Update :protobuf_objc to be use for the working target and just inline
  the sources/headers lists so there is less indirection in the file.

Fixes #5284
2018-11-01 12:52:18 -04:00
Adam Cozzette
96f7c5383f
Merge pull request #5297 from brian-peloton/master
Remove unused types
2018-10-31 09:48:53 -07:00
Brian Silverman
7834dbf820 Remove unused types
They're not doing anything, so might as well get rid of them.
2018-10-29 16:45:07 -07:00
Toby Hsieh
63d2f3bc80 Fix RepeatedField#first in Ruby gem (#5293)
Given an argument, the previous implementation was off by one
(`.first(2)` would return 3 elements) compared to the `Enumerable#first`
method.
2018-10-29 11:32:50 -07:00
Adam Cozzette
3025a06607
Merge pull request #5270 from Thomas-Barbier-1A/master
Fix error: unused parameter 'arena' [-Werror=unused-parameter]
2018-10-29 09:46:23 -07:00
micw523
0038ff49af Remove Debug Statement for Win/MinGW (#5283) 2018-10-23 12:50:57 -07:00
Sarah Zakarias
f075cacaf4 comments 2018-10-23 10:36:46 +02:00
Sarah Zakarias
bc00484bf7 comments and formatting 2018-10-23 09:52:44 +02:00
Paul Yang
acc0fc2a9e
Remove ruby21 and ruby22 tests (#5277)
* Remove ruby21 and ruby22 tests

* Update test badge
2018-10-22 15:09:36 -07:00
Adrián Nieto Rodríguez
31d6b4e30e Fix Javadoc typo (#5280) 2018-10-22 14:05:32 -07:00
Yilun Chong
565c26e7a1
Merge pull request #5186 from BSBandme/add_js_php_benchmark_to_dashboard
Add node and php to benchmark dashboard
2018-10-21 19:59:52 -07:00
Paul Yang
333b3ceab6
Add ruby 2.3, 2.4 and 2.5 test for linux. (#5256)
* Add ruby 2.3, 2.4 and 2.5 test for linux.

* Update kokoro files

* Add back commented gc test

* Fix gc_test failure

* Remove unused code

* Update ruby 2.5.0 to 2.5.1

* Update ruby 2.3 to 2.3.8

* Remove useless comment
2018-10-18 11:16:55 -07:00
Thomas BARBIER
403d216d5a Fix error: unused parameter 'arena' and 'default_value' [-Werror=unused-parameter] 2018-10-18 14:48:31 +02:00
Adam Cozzette
4e308267ac
Merge pull request #5260 from acozzette/common-h-includes
Removed unnecessary includes from stubs/common.h
2018-10-16 20:14:50 -07:00
Adam Cozzette
5e37bbf924 Removed unnecessary includes from stubs/common.h 2018-10-15 20:39:44 -07:00
Yilun Chong
5b8a023610 fix 2018-10-15 17:25:02 -07:00
Joshua Haberman
c7352b39f8
Merge pull request #5198 from hesmar/hemsar/cmakeFixProtobufGenerate
Revert "protobuf_generate(): add relative path to output dir"
2018-10-15 13:55:00 -07:00
Yilun Chong
dc81f795c7
Merge pull request #5247 from slovdahl/5139-fix-redundant-cast-java-warning
Remove unnecessary cast to Builder in generated Java code
2018-10-15 12:05:41 -07:00
Sarah Zakarias
969397b719 Add Dart example. 2018-10-15 09:30:34 +02:00
Yilun Chong
ec11d29076 fix function names 2018-10-12 18:17:23 -07:00
Paul Yang
d2d4b403b5
Sync upb for unknown fix (#5240) 2018-10-12 13:46:26 -07:00
Paul Yang
39df66e1f7
Add ruby2.3,2.4.2.5 test on Mac and disable ruby2.1,2.2 test on Linux (#5250) 2018-10-12 12:36:33 -07:00
Adam Cozzette
ebd38c6d9a
Merge pull request #5227 from lopsided98/libatomic-fix
Link to libatomic when necessary (eg. on armv6l)
2018-10-11 16:16:58 -07:00
Sebastian Lövdahl
06bb8e7647 Remove unnecessary cast in generated Java code 2018-10-11 13:11:25 +03:00
Adam Cozzette
2009d45344
Merge pull request #5244 from KennethL/patch-1
Update third_party.md regarding Erlang
2018-10-10 10:12:10 -07:00
Kenneth Lundin
6d2b3c43bf
Update third_party.md regarding Erlang
Removing links to Erlang projects which are no longer maintained.
2018-10-10 16:33:24 +02:00
Adam Cozzette
154b39c23e
Merge pull request #5214 from elharo/parent
remove obsolete parent
2018-10-08 13:41:51 -07:00
Ben Wolsieffer
56b40a8f05 Link to libatomic when necessary (eg. on armv6l) 2018-10-08 16:27:17 -04:00
Paul Yang
a0da84bff4
Fix broken ruby test (#5235)
* Replace assert_true/assert_false with assert, because they are not provided in newer version of test/unit

* Use rescue to handle exception subclass

* Commented out the require that caused gc_test failure.

* Commented out test

* Fix typo
2018-10-08 13:16:56 -07:00
Benjamin Krämer
80e530dabf Ported FieldMaskUtil from Java to C# (#5045)
* Ported FieldMaskUtil from Java to C#

* Merged FieldMaskUtil into FieldMaskPartial

- Removed FieldMaskUtil
- Moved FieldMaskTree to root
- Updated tests

* Improved tests

- Removed internal method FieldMaskTree.GetFieldPaths
- Proof FieldMask.Paths only contains expected values

* Added FieldMaskTreeTest to Makefile

* Added FieldMaskTree to Makefile
2018-10-08 12:54:05 -07:00
michaelbausor
6a51c03823 PHP: Add support for primitive types in setters (#5126)
* Add support for primitive types in setters

* Update to address PR feedback

* Add tests and fixes for repeated fields

* Remove repeated field code, add getters

* Cleanup, test getters and oneofs

* Move boxing logic into separate class

* Add tests for wrapper type constructor args

* Update to add new setXXXValue methods

* Fix tests for invalid values

* Fix c extension for wrapper accessors

* Fix the bug that well known types didn't call Message_construct

* Address PR comments

* Refactoring init message with array logic

* Add include path to protoc

* Add missing TSRM_LS defintion

* Fix TSRM_LS

* Fix dist check
2018-10-07 16:56:41 -07:00
Leon Barrett
9e69594adf Fix parsing empty Struct Values from Json (#5211)
* Fix parsing empty Struct Values from Json

This fixes a bug. When parsing a struct from JSON like
    struct = json_format.Parse('{"k": {}}', Struct())
then the struct's "k" value would end up not initialized, and accessing
the value would raise an error.
    In[1]: struct['k']
    ValueError: Value not set
That seems to be because the Struct field of the Value was not set.
    In[2]: struct
    Out[2]:
    fields {
      key: "k"
      value {
      }
    }

This commit makes sure that the Value's Struct field is initialized even
if the Struct has no values itself.

This commit also extends a test to cover this case.

* Additionally test for empty list
2018-10-05 16:38:16 -07:00
Josh Kelley
8d6f8df1ec ParseFromString returns bytes parsed (#5166)
* ParseFromString returns bytes parsed

ParseFromString is documented as returning the number of bytes parsed,
and the C++ implementation does this, so the Python implementation
should too.

See #5165.

* Fix docstring

* Add a test for ParseFromString length behavior
2018-10-05 11:07:55 -07:00
Sydney Acksman
3f826a6dbf Add method for Any.Is (#5207) 2018-10-05 11:06:58 -07:00
Sydney Acksman
2b0a18b270 Add C# compiler option to add System.SerializableAttribute to generated message classes (#5208) 2018-10-05 11:06:02 -07:00
Kevin James
f50a1f843e fix(python): fix deprecated collections.abc usage (#5195)
Many classes within collections were moved to collections.abc in Python
3.3 -- their usage as imported directly from collections is now
deprecated as of Python 3.7 and will be removed soon.

The fallback import added in this PR can be removed entirely when
support for versions of Python prior to 3.3 is dropped.
2018-10-04 16:06:53 -07:00