Commit Graph

7882 Commits

Author SHA1 Message Date
Paul Yang
525be941e0
Add test for php5 for pure php implementation (#8251)
* Add test for php5 for pure php implementation

* Add php5.6 to docker image

* Add php5.6 to php 32-bit docker image
2021-02-04 09:50:28 -08:00
Joshua Haberman
cf28f28347
Updated upb to allow nonzero offset minutes in JSON timestamps. (#8258)
* Updated upb to allow nonzero offset minutes in JSON timestamps.

This is to pick up https://github.com/protocolbuffers/upb/pull/367

* Reverted error message change.

* Fixed quote chars.
2021-02-03 17:59:10 -08:00
Jan Tattermusch
aa13fde017
remove obsolete scripts for python wheels (#8250)
Nowadays, this seems to be script where python wheels are being built:
https://github.com/protocolbuffers/protobuf/blob/ac63e80/kokoro/release/python/linux/build_artifacts.sh

Removing the obsolete scripts to avoid confusion.
2021-02-02 16:53:26 -08:00
David L. Jones
ac63e80bbb
Enhance explanation in kokoro/README.md. (#8253) 2021-02-02 16:49:58 -08:00
Joshua Haberman
b3ea125b03
Fixed clone_obj for PHP8. (#8252)
PHP8 has a different method signature for clone_obj that takes a
zend_object* instead of a zval*.
2021-02-02 15:43:44 -08:00
Joshua Haberman
f3e53a05d6
Fixed clone for Message, RepeatedField, and MapField. (#8245)
Also updated the code to use a TypeInfo struct for convenient
passing of type and desc together. This simplified a lot of code
and made this change easier to write.
2021-02-02 09:15:10 -08:00
Joshua Haberman
d18df4f764
Protect against stack overflow if the user derives from Message. (#8248)
* Protect against stack overflow if the user derives from Message.

* For pure-PHP, change error into an exception.
2021-02-01 20:38:15 -08:00
gerben-s
10ecb080cb
Merge pull request #8121 from busunkim96/add-39
add python 3.9
2021-02-01 19:34:02 -08:00
gerben-s
fe47e99a4f
Add cmake to the path to fix the build on kokoro (#8246) 2021-02-01 15:48:50 -08:00
Jan Tattermusch
94c3916dcf
fix problem when restoring C# dependencies on win2016 (#8243) 2021-02-01 09:25:56 -08:00
Jan Tattermusch
f9e8bf42a9
Merge pull request #8220 from jskeet/bytestrings-with-extensions
Allow FileDescriptors to be parsed with extension registries
2021-02-01 09:02:58 +01:00
Christian Alexander Wolf
f4d0f7c85e
feat: add support for deprecated fields to PHP compiler (#8223)
* feat: add support for deprecated fields to PHP compiler

* PR feedback 1
2021-01-29 11:33:27 -08:00
deannagarcia
69694080ff
Merge pull request #8224 from deannagarcia/sync-stage
Integrate from Piper for C++, Java, and Python
2021-01-28 12:36:19 -08:00
Deanna Garcia
75d125b441 Merge branch 'sync-stage' of https://github.com/deannagarcia/protobuf into sync-stage 2021-01-28 18:27:50 +00:00
Deanna Garcia
c0f5092291 Add deleted failure lists for jruby 2021-01-28 18:27:21 +00:00
Jan Tattermusch
4140735f05
Merge pull request #8149 from JamesNK/jamesnk/writestring-small
Optimize writing small strings
2021-01-28 11:48:18 +01:00
deannagarcia
868b712916
Remove unused variable 2021-01-27 13:29:04 -08:00
Deanna Garcia
f1fba4c227 Add missing bracket 2021-01-27 19:58:37 +00:00
Deanna Garcia
2ccf400b86 Merge branch 'sync-stage' of https://github.com/deannagarcia/protobuf into sync-stage 2021-01-27 19:33:32 +00:00
Deanna Garcia
62fb6ddfce Updating CHANGES.txt and removing all instances of std::is_pod 2021-01-27 19:28:44 +00:00
James Newton-King
c2b22b90fc
PR feedback 2021-01-28 08:11:52 +13:00
Joshua Haberman
d5079ed7db
Fixed PHP to support field numbers >=2**28. (#8235) 2021-01-27 10:12:59 -08:00
James Newton-King
cb246b8032
Optimize writing small strings 2021-01-27 12:50:48 +13:00
deannagarcia
90327eb81b
Fix std::is_pod deprecated 2021-01-26 13:04:02 -08:00
deannagarcia
c89cb8a57d
Reverse unintentional change 2021-01-26 11:55:47 -08:00
deannagarcia
37e88c474e
Change install_requires 2021-01-26 09:48:24 -08:00
Jan Tattermusch
f6da785731
Merge pull request #8143 from JamesNK/jamesnk/messageadapter
Optimize MapField serialization by removing MessageAdapter
2021-01-26 16:26:50 +01:00
deannagarcia
9fee757e46
Update libprotoc.cmake 2021-01-25 16:21:42 -08:00
deannagarcia
7934a800eb
Fix typo in Makefile 2021-01-22 15:50:57 -08:00
deannagarcia
f7c212d010
Add cpp_name.h to Makefile 2021-01-22 11:06:21 -08:00
deannagarcia
16ecc440c9
Fix typo 2021-01-21 16:44:15 -08:00
Deanna Garcia
af95001202 Merge tag 'refs/tags/sync-piper' into sync-stage 2021-01-22 00:24:31 +00:00
Deanna Garcia
a00125024e Sync from Piper @353127564
PROTOBUF_SYNC_PIPER
2021-01-22 00:24:30 +00:00
James Newton-King
69223b8386
Clean up 2021-01-21 13:36:00 +13:00
James Newton-King
542c0cc9d3
Fix missing key and test 2021-01-21 13:34:08 +13:00
Jon Skeet
f01d9e5601 Add an extension registry option when parsing file descriptors
This is important when parsing descriptor sets that contain extensions.
(The alternative is to get the descriptor bytes again for individual
elements, e.g. message descriptors, and reparse them with the
appropriate extensions. It's really ugly.)
2021-01-20 08:11:27 +00:00
Jon Skeet
cea3653a2e Include the size of values (and tags) for extensions, even if the value is the default
Fixes #8218.
2021-01-20 08:06:34 +00:00
Rob Widmer
48234f5f01 Make the new multi-level ruby tests fit the existing structure better and add them to the makefile 2021-01-14 12:26:04 -08:00
Rob Widmer
1d39f78818 Fix jruby support to handle messages nested more than 1 level deep 2021-01-14 12:26:04 -08:00
Joshua Haberman
9abf6e2ab0
Ported Ruby extension to upb_msg (#8184)
* WIP.

* WIP.

* WIP.

* WIP.

* WIP.

* WIP.

* Added some missing files.

* WIP.

* WIP.

* Updated upb.

* Extension loads, but crashes immediately.

* Gets through the test suite without SEGV!

Still a lot of bugs to fix, but it is a major step!

214 tests, 378 assertions, 37 failures, 147 errors, 0 pendings, 0 omissions, 0 notifications
14.0187% passed

* Test and build for Ruby 3.0

* Fixed a few more bugs, efficient #inspect is almost done.

214 tests, 134243 assertions, 30 failures, 144 errors, 0 pendings, 0 omissions, 0 notifications
18.6916% passed

* Fixed message hash initialization and encode depth checking.

214 tests, 124651 assertions, 53 failures, 70 errors, 0 pendings, 0 omissions, 0 notifications
42.5234% passed

* A bunch of fixes to failing tests, now 70% passing.

214 tests, 202091 assertions, 41 failures, 23 errors, 0 pendings, 0 omissions, 0 notifications
70.0935% passed

* More than 80% of tests are passing now.

214 tests, 322331 assertions, 30 failures, 9 errors, 0 pendings, 0 omissions, 0 notifications
81.7757% passed

Unfortunately there is also a sporadic bug/segfault hanging around
that appears to be GC-related.

* Add linux/ruby30 and macos/ruby30

* Use rvm master for 3.0.0-preview2

* Over 90% of tests are passing!

214 tests, 349898 assertions, 15 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
92.5234% passed

* Passes all tests!

214 tests, 369388 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* A bunch of cleanup.

1. Removed a bunch of internal-only symbols from headers.
2. Required a frozen check to get a non-const pointer to a map or array.
3. De-duplicated the code to get a type argument for Map/RepeatedField.

* Removed a bunch more stuff from protobuf.h.  There is an intermittent assert failure.

Intermittent failure:

ruby: ../../../../ext/google/protobuf_c/protobuf.c:263: ObjectCache_Add: Assertion `rb_funcall(obj_cache2, (__builtin_constant_p("[]") ? __extension__ ({ static ID rb_intern_id_cache; if (!rb_intern_id_cache) rb_intern_id_cache = rb_intern2((("[]")
), (long)strlen(("[]"))); (ID) rb_intern_id_cache; }) : rb_intern("[]")), 1, key_rb) == val' failed

* Removed a few more things from protobuf.h.

* Ruby 3.0.0-preview2 to 3.0.0

* Require rake-compiler-dock >= 1.1.0

* More progress, fighting with the object cache.

* Passes on all Ruby versions!

* Updated and clarified comment regarding WeakMap.

* Fixed the wyhash compile.

* Fixed conformance tests for Ruby.

Conformance results now look like:

RUBYLIB=../ruby/lib:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_ruby.txt --text_format_failure_list text_format_failure_list_ruby.txt ./conformance_ruby.rb

CONFORMANCE TEST BEGIN ====================================

CONFORMANCE SUITE PASSED: 1955 successes, 0 skipped, 58 expected failures, 0 unexpected failures.

CONFORMANCE TEST BEGIN ====================================

CONFORMANCE SUITE PASSED: 0 successes, 111 skipped, 8 expected failures, 0 unexpected failures.

Fixes include:

- Changed Ruby compiler to no longer reject proto2 maps.
- Changed Ruby compiler to emit a warning when proto2 extensions are
  present instead of rejecting the .proto file completely.
- Fixed conformance tests to allow proto2 and look up message by name
  instead of hardcoding a specific list of messages.
- Fixed conformance test to support the "ignore unknown" option for
  JSON.
- Fixed conformance test to properly report serialization errors.

* Removed debug printf and fixed #inspect for floats.

* Fixed compatibility test to have proper semantics for #to_json.

* Updated Makefile.am with new file list.

* Don't try to copy wyhash when inside Docker.

* Fixed bug where we would forget that a sub-object is frozen in Ruby >=2.7.

* Avoid exporting unneeded symbols and refactored a bit of code.

* Some more refactoring.

* Simplified and added more comments.

* Some more comments and simplification. Added a missing license block.

Co-authored-by: Masaki Hara <hara@wantedly.com>
2021-01-13 12:16:25 -08:00
Brent Shaffer
468bc193ec
fix: convert native PHP floats to single precision (#8187)
* fix: convert native PHP floats to single precision

* fix unpack
2021-01-11 11:53:35 -08:00
Joshua Haberman
7165c34606
Merge pull request #8195 from HannahShiSFB/gRPC-Ruby-issue-on-Windows
[Ruby] Fix: (SIGSEGV) gRPC-Ruby issue on Windows. memory alloc infinite recursion/run out of memory
2021-01-08 14:39:41 -08:00
root
68f72f3f6c bug fix. in a 32-bit system, sizeof(mem_block) is only 8, _upb_arena_alignup(sizeof(mem_block)) is 16 2021-01-08 19:01:37 +00:00
Aaron Son
10599e6c8d
js/binary/utils.js: Fix jspb.utils.joinUnsignedDecimalString to work with negative bitsLow and low but non-zero bitsHigh parameter. (#8170) 2021-01-07 17:22:10 -08:00
Joshua Haberman
7089ff0ef2
Fix PhpDoc comments for message accessors to include "|null". (#8136)
Message accessors will return null when when the field is not
set, so this should be reflected in the PhpDoc.

Also updated the code generator for the well-known types to reflect
the edits made in https://github.com/protocolbuffers/protobuf/pull/8105.

Also explicitly check for upb_msg_has() in the oneof accessor, so
we are not implicitly relying on unset message fields returning NULL
at the upb level.
2021-01-07 14:58:38 -08:00
Gilles Vollant
9647a7c235 Fix somes warning when compiling with Visual Studio 2019 on x64 target
In visual studio 2019 x64 target, size_t are 64 bits and int are 32 bits
2020-12-30 14:10:09 -08:00
brucearctor
6c970b5a05 Update options.md - Added 'Astounding' Project 2020-12-28 13:44:56 -08:00
Carlos O'Ryan
54d9f6a1da fix: support deprecated enums for GCC < 6 2020-12-28 12:52:49 -08:00
Abhishek Jain
36aff6a526 Fix for compiler warning issue#8145
Corrected the == check condition.

Signed-off-by: Abhishek Jain <abhishek.jain3@huawei.com>
2020-12-28 11:31:57 -08:00
Abhishek Jain
9505222a24 Fix TextFormatMapTest.DynamicMessage issue#5136
Clean up a multi-line string to conform to Unix line endings.

Signed-off-by: Abhishek Jain <abhishek.jain3@huawei.com>
2020-12-28 11:31:18 -08:00