Commit Graph

554 Commits

Author SHA1 Message Date
Protobuf Team Bot
38e3a11a29 Updating version.json and repo version numbers to: 21.1 2022-05-27 14:07:46 -04:00
Protobuf Team Bot
59c6ff83e9 Updating version.json and repo version numbers to: 21.0 2022-05-25 13:51:01 -07:00
Protobuf Team Bot
1fa42c4be4 Updating version.json and repo version numbers to: 21.0-rc2 2022-05-19 13:35:48 -07:00
johnnyshields
abe77ae13e Backport: Ruby: support x64-mingw-ucrt platform, which is the new platform which Windows Ruby Installer uses as of Ruby 3.1 2022-05-14 11:41:32 +09:00
Protobuf Team
d259bd3287 Updating version.json and repo version numbers to: 21.0-rc1 2022-05-10 11:34:07 -07:00
David L. Jones
95da0ba5b4
Rename all BUILD files to BUILD.bazel (#9892)
This avoids conflicting names in a couple of cases.

1. Within google, we want to sync files but not name them BUILD (since the structure doesn't match).
2. On case-insensitive filesystems, `build` may be used for a build directory. Naming `BUILD.bazel` avoids potentioal conflicts.
2022-04-29 17:57:55 -07:00
Adam Cozzette
9c8c3dea30
Start reducing our reliance on autotools (#9824)
Start reducing our reliance on autotools

This commit updates a few of our CI scripts to build protoc using Bazel
instead of autotools. I also updated the setuptools and Rake build
configs to look for protoc under bazel-bin/ so that they will
preferentially use a Bazel-built protoc binary. The goal is to start
chipping away at our use of autotools in preparation for eventually
dropping autotools support.
2022-04-27 10:40:01 -07:00
David L. Jones
d76f8c868c
Add source distribution packaging rules (#9835)
This change adds `rules_pkg`-based targets that will produce source distribution archives, similar to `make dist`.

These rules produce nearly the same outputs as `make dist`. However, there are some differences and caveats:

1. The outputs do not contain vendored googletest sources.
2. You have to run `autogen.sh` before `blaze build pkg:all`. This produces several autotools-related files directly into the source tree.
3. The output .zip files do not have a directory prefix like `protobuf-3.20.1-rc-1` (this will be addressed after [Substitute package variables in `pkg_zip#package_dir`. bazelbuild/rules_pkg#577](https://github.com/bazelbuild/rules_pkg/pull/577); the tar files do have this prefix, though.)
4. One file is missing from the archives, which is produced during the `make` build: benchmarks/gogo/cpp_no_group/cpp_benchmark.cc
5. In several places, I have explicitly excluded some files that are not in the autotools distribution outputs. I think most of those files should probably be included, but for now, I'm aiming for parity with `make dist`. These are marked with comments, so it should be easy to clean them up later.
2022-04-22 16:58:16 -07:00
Joshua Haberman
a2a0c3c118 Fixed some mis-merged files. 2022-04-22 17:18:36 +00:00
Joshua Haberman
f80137c46d Merge branch 'main' into merge-to-main 2022-04-22 02:44:36 +00:00
Joshua Haberman
296c1fdaff
Update protobuf version (#9820)
* Update protobuf version

* Updated Makefile.am for composer.json move.
2022-04-20 16:00:42 -07:00
Jason Lunn
3a477b1952
Improve range handling logic of RepeatedField (#9799)
Add support for negative start or ends and exclusive ends.

Includes regression tests contributed mostly by @lucthev. Fixes #9751.
2022-04-19 10:46:01 -04:00
mkruskal-google
85aa87cbc9
Merge 3.20.1-rc1 into main (#9760)
* Fix NPE during encoding and add regression test for issue 9507.

(cherry picked from commit 58e320a732)

* Implement `respond_to?` in RubyMessage (#9677)

All synthetic methods implemented by `method_missing` are now supported by `respond_to?`.

Fixes issue #9202.

* Fix null pointer exceptions exposed by new regression tests.
* Fix clear_ on oneofs so that it is safe to call repeatedly and so that respond_to? does not depend on whether the oneof is currently cleared.
* Code cleanup: reenable more tests on JRuby.
* Align JRuby behavior with CRuby by throwing a RuntimeError when attempting to assign to a oneof.

(cherry picked from commit 8e7f936696)

* Update protobuf version

* Merge pull request #9727 from mlocati/build-packaged-php-extension

Fix building packaged PHP extension

(cherry picked from commit 7f9901c5f6)

* Update protobuf version

* Update changelogs for 3.20.1-rc1

Co-authored-by: Jason Lunn <jason.lunn@gmail.com>
Co-authored-by: Jorg Brown <jorg.brown@gmail.com>
2022-04-07 18:33:58 -04:00
Luc Thevenard
d54cafb7c8 Avoid negative indexes for JRuby 2022-04-06 15:49:08 -04:00
Mike Kruskal
d24edbca53 Update protobuf version 2022-04-04 11:13:56 -07:00
Luc Thevenard
d85f03d66a [Ruby] Fix RepeatedField#last, #first inconsistencies 2022-04-01 17:09:22 -04:00
Mike Kruskal
ffe4b0cfe6 Merge branch '3.20.x' into 3.20.x-202204011233 2022-04-01 12:34:01 -07:00
Jason Lunn
31a6482b85 Implement respond_to? in RubyMessage (#9677)
All synthetic methods implemented by `method_missing` are now supported by `respond_to?`.

Fixes issue #9202.

* Fix null pointer exceptions exposed by new regression tests.
* Fix clear_ on oneofs so that it is safe to call repeatedly and so that respond_to? does not depend on whether the oneof is currently cleared.
* Code cleanup: reenable more tests on JRuby.
* Align JRuby behavior with CRuby by throwing a RuntimeError when attempting to assign to a oneof.

(cherry picked from commit 8e7f936696)
2022-03-31 16:00:26 -04:00
Jason Lunn
7fa212bba1 Fix NPE during encoding and add regression test for issue 9507.
(cherry picked from commit 58e320a732)
2022-03-31 16:00:09 -04:00
Jason Lunn
3dee6efa54
Merge pull request #9690 from JasonLunn/format_jruby_with_google-java-format
Run all JRuby source files through `google-java-format.`
2022-03-28 20:44:28 -04:00
Jason Lunn
d0fc2794c4 Cleanup warnings seen when running tests. 2022-03-28 19:00:18 -04:00
Jason Lunn
5b28ae70c0 Run all JRuby source files through google-java-format. 2022-03-28 18:58:54 -04:00
Jason Lunn
8e7f936696
Implement respond_to? in RubyMessage (#9677)
All synthetic methods implemented by `method_missing` are now supported by `respond_to?`.

Fixes issue #9202.

* Fix null pointer exceptions exposed by new regression tests.
* Fix clear_ on oneofs so that it is safe to call repeatedly and so that respond_to? does not depend on whether the oneof is currently cleared.
* Code cleanup: reenable more tests on JRuby.
* Align JRuby behavior with CRuby by throwing a RuntimeError when attempting to assign to a oneof.
2022-03-28 18:43:53 -04:00
Darly Paredes
25045e3f69 Update protobuf version 2022-03-25 19:20:51 +00:00
Jason Lunn
80308c85a1
Merge pull request #9637 from JasonLunn/fix_9507
Fix NPE during encoding and add regression test for issue 9507.
2022-03-22 20:03:31 -04:00
Joshua Haberman
dbb9619a9d
Cherry-pick to get Ruby 3.1 support in protobuf 3.20.0 (#9657)
* Allow pre-compiled binaries for ruby 3.1.0 (#9566)

* Allow pre-compiled binaries for ruby 3.1.1

* add comment

* fix build and use ruby 3.1.0

* add ruby31 to build CI for tests and release

* trying to fix ci

* install ruby 3.1.0 in ruby_build_environment.sh

* use head for rvm to install 3.1.0

* just install master version of rvm in prepare_build_macos_rc

* force install of master rvm in ruby_build_environment.sh

* Use coroutine=universal when compiling ruby31

* use ucontext

* fix filename

* fix coroutine name

* use git head for rake-compiler-dock

* use newest rake-compiler-dock version

* Updated CHANGES.txt for Ruby changes.

* Fixed Ruby 3.1 tests by marking intersect? as unimplemented. (#9645)

* Fixed Ruby 3.1 tests by marking intersect? as unimplemented.

* Updated compatibility tests.

Co-authored-by: Marco Concetto Rudilosso <marcoconcettorudilosso@gmail.com>
2022-03-21 15:26:27 -07:00
Joshua Haberman
7f1acff2a4
Fixed Ruby 3.1 tests by marking intersect? as unimplemented. (#9645)
* Fixed Ruby 3.1 tests by marking intersect? as unimplemented.

* Updated compatibility tests.
2022-03-17 12:51:03 -07:00
Marco Concetto Rudilosso
abdfd093af
Allow pre-compiled binaries for ruby 3.1.0 (#9566)
* Allow pre-compiled binaries for ruby 3.1.1

* add comment

* fix build and use ruby 3.1.0

* add ruby31 to build CI for tests and release

* trying to fix ci

* install ruby 3.1.0 in ruby_build_environment.sh

* use head for rvm to install 3.1.0

* just install master version of rvm in prepare_build_macos_rc

* force install of master rvm in ruby_build_environment.sh

* Use coroutine=universal when compiling ruby31

* use ucontext

* fix filename

* fix coroutine name

* use git head for rake-compiler-dock

* use newest rake-compiler-dock version
2022-03-17 09:38:36 -07:00
Jason Lunn
58e320a732 Fix NPE during encoding and add regression test for issue 9507. 2022-03-16 13:37:46 -04:00
theodorerose
ebfa0d345e Update protobuf version 2022-03-15 21:12:45 +00:00
Joshua Haberman
16dccd6820
Updated Ruby to the latest upb. (#9589) (#9630)
* Updated Ruby to the latest upb.

* Updated to newer upb.
2022-03-14 14:06:36 -07:00
Joshua Haberman
7ecf43f0ce
Updated Ruby to the latest upb. (#9589)
* Updated Ruby to the latest upb.

* Updated to newer upb.
2022-03-14 13:11:29 -07:00
Adam Cozzette
357e71679e
Merge pull request #9588 from protocolbuffers/master
Merge master into 3.20.x
2022-03-08 12:24:24 -08:00
Luka Dornhecker
24a0659f95
[Ruby] allow encode json options to be an object that responds to to_hash (#9513)
* allow encode json options to be an object that responds to to_hash

fixes #9500

* try to convert options arg to hash if it is not a hash
2022-03-08 10:38:52 -08:00
zhangskz
276add0b5c
Add ruby_upb_alloc using xrealloc/xfree so Ruby GC is aware of allocated memory for Arenas. (#9586)
* Add ruby-specific upb_alloc using xrealloc/xfree for use in Arena_alloc so Ruby GC is aware of allocated memory.
* Add RB_GC_GUARD to DescriptorPool_add_serialized_file  to ensure ruby does not aggressively garbage collect arena_rb due to lack of references.
2022-03-08 12:05:34 -05:00
Joshua Haberman
349d74d92e
Updated PHP upb, and utf8_range for Ruby/PHP (#9585)
* Updated PHP to the new version of upb.

This is a large change, as the upb API surface has been
renamed to follow Google style more closely.

* Fixed utf8_range.

* Updated Ruby for new utf8_range.

* Picked up new upb for PHP, with spelling fixes.

* Fixed the 32-bit build.
2022-03-05 11:55:57 -08:00
Adam Cozzette
88a18db91e Update protobuf version 2022-03-04 09:52:19 -08:00
なつき
6c8bda86fe Suppress warning for intentional circular require 2022-02-27 13:15:57 -08:00
Jason Lunn
df0999141e Update JRuby 9.2.19.0 -> 9.2.20.1 and 9.3.0.0 to 9.3.3.0. 2022-02-25 14:11:12 +00:00
Anthony Dmitriyev
2ce9604227
Use rb_obj_class instead of CLASS_OF in Ruby C to ignore singleton classes (#9342)
Co-authored-by: Adam Cozzette <acozzette@google.com>
2022-02-11 11:04:10 -08:00
Adam Cozzette
d5ef16c6eb
Ruby: rename max_recursion_depth to recursion_limit (#9486)
This will help keep the terminology consistent with the other language
implementations.
2022-02-09 10:21:13 -08:00
Lukas Fittl
fbe6ab2487
[Ruby] Message.decode/encode: Add max_recursion_depth option (#9218)
* Message.decode/encode: Add max_recursion_depth option

This allows increasing the recursing depth from the default of 64, by
setting the "max_recursion_depth" to the desired integer value. This is
useful to encode or decode complex nested protobuf messages that otherwise
error out with a RuntimeError or "Error occurred during parsing".

Fixes #1493

* Address review comments

Co-authored-by: Adam Cozzette <acozzette@google.com>
2022-02-09 08:44:12 -08:00
Adam Cozzette
18521f6055 Merge branch '3.19.x' into merge-3.19.x 2022-01-28 17:42:21 +00:00
Adam Cozzette
22d0e265de
Update protobuf version for 3.19.4 (#9449)
I also updated the PHP release notes in
php/ext/google/protobuf/package.xml.
2022-01-27 19:35:56 -08:00
Joshua Haberman
aceff710f4 Fixed data loss bug in Ruby extension. 2022-01-27 17:29:12 -08:00
Maximilian
82372d8fe6
Use proper SPDX license identifier (#9441)
The previously used term "3-Clause BSD License" is not properly
standarized. A common standard is SPDX, therefore "3-Clause BSD License"
is substituted with "BSD-3-Clause" which is a SPDX identifier.

`grep -rl "3-Clause BSD License" | xargs -n1 sed -i "s/3-Clause BSD
License/BSD-3-Clause/g"`
2022-01-27 00:23:14 +00:00
Joshua Haberman
5ef010cb85 Fixed spelling errors in comments. 2022-01-23 16:13:12 -08:00
Joshua Haberman
90065d39a7 Fixed crash bug with proto2 enums. 2022-01-21 20:18:11 -08:00
Joshua Haberman
706ed2d17a Added utf8_range.c as a source file. 2022-01-21 17:32:34 -08:00
Joshua Haberman
c153dd9bf7 Updated to new upb APIs. 2022-01-21 15:46:56 -08:00