Commit Graph

7092 Commits

Author SHA1 Message Date
Rafi Kamal
906e9c6897
Fix for JSON serialization of 0/empty-valued wrapper types () ()
* Fixed Ruby JSON serialization of 0/empty wrapper fields.

* Removed newly-passing conformance tests from the failure list.

Co-authored-by: Joshua Haberman <jhaberman@gmail.com>
2020-02-12 13:27:36 -08:00
Rafi Kamal
37fc4327ef
Fix for wrappers with a zero value () ()
* Add failing tests for issues with wrapped values where the value is the default

* Add test for wrapped values without a value set

* Bugfix for wrapper types with default values.

The previous optimizations for wrapper types had a bug that prevented
wrappers from registering as "present" if the "value" field was not
present on the wire.

In practice the "value" field will not be serialized when it is zero,
according to proto3 semantics, but due to the optimization this
prevented it from creating a new object to represent the presence of the
field.

The fix is to ensure that if the wrapper message is present on the wire,
we always initialize its value to zero.

Co-authored-by: Joshua Haberman <jhaberman@gmail.com>
Co-authored-by: Dan Quan <dan@quan.io>
2020-02-12 12:37:19 -08:00
Rafi Kamal
1440569231
Update the Xcode version number in Kokoro () ()
Currently all of our MacOS tests are failing with the error: "autom4te: need GNU m4 1.4 or later: /usr/bin/m4". This is likely to be happening because Kokoro has updated their Xcode version to 11.3.
2020-02-12 11:34:51 -08:00
Paul Yang
537c5aa9e0
Aggregate Metadata Files () ()
Instead of calling initOnce of dependencies, initialize metadata of dependencies in the same file.

Needs to pass aggregate_metadata option to protoc to trigger, e.g.:
--php_out=aggregate_metadata=foo#bar:generated_dir
For each input file, transitive dependencies (including itself), whose package name has the prefix of foo or bar, will be aggregated, in which their metadata string will be aggregated in the same internalAddGeneratedFile call. For other dependencies, initOnce is called as before.

This feature is EXPERIMENTAL. DO NOT USE!!!
2020-02-11 15:44:40 -08:00
Rafi Kamal
fedb2beee3
Merge pull request from ObsidianMinor/csharp/fix/6936 ()
Fix latest ArgumentException for C# extensions

Co-authored-by: Jan Tattermusch <jtattermusch@users.noreply.github.com>
2020-02-10 10:46:19 -08:00
Rafi Kamal
498de9f761
Changed the maven URL to use https when building dist artifacts 2020-02-02 14:04:32 -08:00
Rafi Kamal
5f3d6599f6
Update CHANGES.txt for 3.11.3 release () 2020-01-31 16:00:28 -08:00
Rafi Kamal
345df38dd3
Update protobuf version () 2020-01-31 13:47:09 -08:00
Rafi Kamal
bc237eb672
Install RubyGem bundler version specified in Gemfile.lock to fix release failure () ()
Ref: https://bundler.io/blog/2019/05/14/solutions-for-cant-find-gem-bundler-with-executable-bundle.html
2020-01-31 09:43:58 -08:00
Elliotte Rusty Harold
47434eb43d
deps: update errorprone to 2.3.4 () () 2020-01-31 09:43:24 -08:00
Luca Santarella
c5eada8eeb
Refactored ulong to zend_ulong for php7.4 compatibility () 2020-01-30 16:47:32 -08:00
Paul Yang
85219578fa
Add continuous test for php7.4 on mac () 2020-01-30 12:45:47 -08:00
Paul Yang
e8016753e3
Maven requires https connection () () 2020-01-22 12:29:56 -08:00
Paul Yang
629ca244a1
Call register_class before getClass from desc ()
* Call register_class before getClass from desc

* Remove debug code
2020-01-21 15:38:42 -08:00
Yannic
29cd005ce1 [bazel] Fix blacklisted_protos in cc_toolchain and add test () 2020-01-15 10:22:16 -08:00
Scott Hart
80eca4c1cd bug: adds OUT and OPTIONAL to windows portability files () 2020-01-13 15:21:40 -08:00
Jingwen Chen
abc5062a61 Migrate from maven_jar to jvm_maven_import_external to prepare for Bazel 2.0 2020-01-09 14:10:34 -08:00
Yannic
77f30b686b Blacklist .proto source files if Bazel allows us to ()
* Blacklist .proto source files is Bazel allows us to

This is a partial revert of 7b28278c7d to unblock, e.g., https://github.com/grpc/grpc/pull/21590 or https://github.com/lyft/envoy-mobile/issues/617 until Bazel is fixed.

Note: this is a forward-compatible change that automatically switches to the behavior intended by 7b28278c7d when a compatible Bazel is released without requiring users to upgrade Protobuf. We will revert this change when Bazel is fixed.

* Remove trailing ,

* Update BUILD
2020-01-09 14:10:34 -08:00
Jie Luo
63cfdafacb
Fix python release breakages by set MB_PYTHON_OSX_VER () 2019-12-19 14:06:29 -08:00
Jie Luo
03ba4ac171
Add python3.8 in build_artifacts for linux and macos () 2019-12-19 10:27:39 -08:00
Jie Luo
7faab5eeeb add python38 ()
* add python38

* add python3.8

* fix tox
2019-12-13 15:49:18 -08:00
Paul Yang
fe1790ca0d
Fix Multiple Request for PHP ()
* Add scripts to test multirequest

* chmod ug+x multirequest.sh

* Add continuous test

* Compile c extension

* Class entry is obsolete in the second request
1) Needes to use class name in persistent map
2) Invalidate class entry stored in descriptor

* Add new files to dist

* Fix compile_extension

* Cleanup outputs for phpize
2019-12-12 13:59:51 -08:00
Rafi Kamal
39492b68d8
Update protobuf version to 3.11.2 () 2019-12-10 17:50:28 -08:00
Rafi Kamal
b58896e53c
Update CHANGES.txt for 3.11.2 release () 2019-12-10 11:22:24 -08:00
Paul Yang
a66423f0fd
Make c extension portable for php 7.4 ()
* Make c extension portable for php 7.4

* Fix conformance tests

* Fix comments

* Fix 32-bit

* Update conformance failure list

* Fix compiler warnings

* Cleanup configure created by phpize
The file created in php 7.4 is not recognizable by previous versions

* Fix conformance tests for 64-bit php

* Fix conformance test

* Fix compile warning

* Fix compile warnings
2019-12-09 17:02:10 -08:00
Eric Anderson
0425fa932c Add a proto_lang_toolchain for javalite () ()
* Add a proto_lang_toolchain for javalite

* fix toolchain. Swap javalite example to master repo
2019-12-03 13:06:31 -08:00
Paul Yang
2929bb3736
Initialize wrapper message during parsing ()
* Initialize wrapper message during parsing
In case the internal value is default

* Fix zts build
2019-12-03 11:11:28 -08:00
Paul Yang
7bb8b108d1
Add php 7.4 to docker image () ()
* Add php 7.4 to docker image

* Use https links
2019-12-02 16:05:55 -08:00
Rafi Kamal
c04d9c984f
Update CHANGES.txt for 3.11.1 release () 2019-12-02 11:57:40 -08:00
Rafi Kamal
b78c53f935
Update protobuf version to 3.11.1 () 2019-12-02 11:57:21 -08:00
Paul Yang
e69c939652
Extern declare protobuf_globals () 2019-11-27 01:00:51 -08:00
Rafi Kamal
ab5b61bf2f
Update CHANGES.txt for 3.11.0 stable release () 2019-11-25 15:15:21 -08:00
Rafi Kamal
1d5375c621
Update protobuf version to 3.11.0 () 2019-11-25 15:12:00 -08:00
Rafi Kamal
b0386daa19
Remove add_proto_enumdesc and get_proto_enumdesc () 2019-11-22 11:40:56 -08:00
Rafi Kamal
391440e3dd
Implement lazy loading of php class for proto messages () ()
* Implement lazy loading of php class for proto messages

* Fix php 7.1

* Fix encode

* Fix memory leak

* Fix enum descriptor
2019-11-22 10:06:45 -08:00
Rafi Kamal
6220db4ec4
Update protobuf version () 2019-11-21 19:10:04 -08:00
Rafi Kamal
51475bc4ea
Marked update_compatibility_version.py as executable () 2019-11-20 16:39:07 -08:00
Rafi Kamal
01425cb262
Revert "Make shared libraries be able to link to MSVC static runtime libraries, so that VC runtime is not required." ()
This reverts commit 129a7c875f. We are
seeing the following error when building Python release artifacts in Windows:
" error LNK2038: mismatch detected for 'RuntimeLibrary': value
'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in
descriptor.obj".
2019-11-20 15:34:09 -08:00
Rafi Kamal
52b632cf27
Update CHANGES.txt with 3.11.0-RC1 release notes () 2019-11-20 10:45:24 -08:00
Paul Yang
edda0c92f5 Persistent Descriptor Pool ()
* Make reserve names map persistent

* Add DescriptorInternal to map

* Use get_msgdef_desc in encode_decode.c

* Add persistent map for ce=>def and enum=>def

* Replace get_ce_obj

* Remove get_proto_obj

* Remove obsolete fields from Descriptor and EnumDescriptor

* Add cache for descriptor php values

* Add cache for descriptors

* Fix bug

* Avoid add generated file again if it has been added

* Fix the bug upb depends on null-ended str for look up.

* Initialize generated pool impl

* Turn down old generated pool

* Add init entry flag protobuf.keep_descriptor_pool_after_request

By default, it's off. Add protobuf.keep_descriptor_pool_after_request=1 to php.ini to enable it

* Fix zts build
2019-11-19 15:32:13 -08:00
Rafi Kamal
cd7b27be38 Update protobuf version () 2019-11-19 15:32:13 -08:00
Rafi Kamal
4e93585e8b
Down integrate to GitHub () 2019-11-15 10:40:11 -08:00
Rafi Kamal
bb0c543934
Update Xcode version needed to run Kokoro tests and replace deprecated rubygem options ()
* Update Xcode version needed to run Kokoro tests

* Replace deprecated --no-ri --no-rdoc rubygem options with --no-document
2019-11-14 13:44:33 -08:00
Paul Yang
601f6963eb
Lazily Create Singular Wrapper Message ()
* Register additional handlers from wrappers

* Return zval instead of parse frame

* Use parse frame

* Update upb

* Lazily create wrapper messages

* Fix a segment fault

Need check type of field before getting submsg def

* Avoid expanding during serialization and direct access

* Fix a bug that getXXXUnwrapped returns null for string

* Implement writeWrapperUnwrapped

* Add more tests

* Fix oneof wrapper parsing

* Fix get oneof field

* Avoid expansion for oneof wrappers

* Fix bug

* Fix a bug that in php7 variable is defined out of scope

* Fix broken tests
 * Update upb to fix Timestamp conformance tests
 * Fix segmentation fault for oneof wrapper fields

* Fix encoding/decoding top level wrapper values

* Add type checking for write wrapper value in php7

* Fix zts build

* Fix the bug that readWrapperValue uses parent message's layout to access wrapper value

* Fix wrapper in map
2019-11-14 12:17:04 -08:00
Jie Luo
f06800524f
Revert "C# upgrade dotnet SDK ()" ()
This reverts commit 0c8acb6c8d.
2019-11-14 09:49:59 -08:00
Jan Tattermusch
0c8acb6c8d C# upgrade dotnet SDK ()
* upgrade dotnet SDK

* upgrade dotnet SDK version in global.json
2019-11-14 09:39:31 -08:00
Benjamin Peterson
9d61eada0f Import MutableSequence from collections.abc on Python 3. ()
Fixes https://github.com/protocolbuffers/protobuf/issues/5335.
2019-11-12 14:40:47 -08:00
Rafi Kamal
9b0fa3e7fb Remove java/lite/proguard.pgcfg from EXTRA_DIST since it's not part of
protoc.
2019-11-12 13:38:58 -08:00
Mohamed Heikal
df71972358 Simplify template exporting macros 2019-11-12 13:38:58 -08:00
Rafi Kamal
394f5c8c0f Whitelist newly added conformance test failures for Ruby, C#, and PHP 2019-11-12 13:38:58 -08:00