Commit Graph

9164 Commits

Author SHA1 Message Date
Elliotte Rusty Harold
26d11fdba2 -Dsurefire.failIfNoSpecifiedTests=false (#9761)
@mrkruskal

(cherry picked from commit 88eb7550a6)
2022-04-07 17:05:12 -07:00
Elliotte Rusty Harold
044cb7fd45 -DfailIfNoSpecifiedTests=false (#9753)
@jtattermusch @mkruskal-google

(cherry picked from commit 55177c3574)
2022-04-07 08:37:31 -07:00
Mike Kruskal
7db4eca77f Update changelogs for 3.20.1-rc1 2022-04-05 17:18:20 -07:00
Mike Kruskal
803e371946 Update protobuf version 2022-04-05 17:10:20 -07:00
mkruskal-google
5edc8442a4 Merge pull request #9727 from mlocati/build-packaged-php-extension
Fix building packaged PHP extension

(cherry picked from commit 7f9901c5f6)
2022-04-05 12:20:12 -07:00
Mike Kruskal
d24edbca53 Update protobuf version 2022-04-04 11:13:56 -07:00
Jorg Brown
e097b36732
Merge pull request #9714 from JasonLunn/3.20.x
Cherry pick JRuby changes that fix NPE during encoding (#9507) and implements respond_to? (#9202) into 3.20.x.
2022-04-02 13:38:44 -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
Adam Cozzette
faa42e900c
Revert "Use repo-relative labels wherever possible (#9187)" (#9696)
This reverts commit 11de748d66.
2022-03-29 15:50:39 -04:00
Darly Paredes
7f9f75f30e
Merge pull request #9679 from darly/3.20.x-202203251917
3.20.0
2022-03-25 16:14:44 -04:00
Darly Paredes
25045e3f69 Update protobuf version 2022-03-25 19:20:51 +00:00
Joshua Haberman
bc799d78f8
Added missing files and fixed file roles. (#9672) 2022-03-24 11:51:33 -07: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
Theodore Rose
2099298e08
Merge pull request #9650 from esorot/php-release-fix
update PHP release to not fail on existing tag
2022-03-18 11:58:24 -04:00
theodorerose
523d94a445 update PHP release to not fail on existing tag 2022-03-18 15:54:55 +00:00
Theodore Rose
a6133534e2
Merge pull request #9634 from esorot/3.20.x-202203152103
Update release version to RC2 (3.20.x 202203152103)
2022-03-15 17:47:02 -04:00
theodorerose
ebfa0d345e Update protobuf version 2022-03-15 21:12:45 +00:00
Theodore Rose
e0cec17c71
Merge pull request #9632 from esorot/update-python-version
update python to 3
2022-03-14 20:02:29 -04:00
theodorerose
2a9f806a69 update python to 3 2022-03-14 23:58:36 +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
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
Arfrever
1cec803182
CMake fixes (#9595)
* Support older versions of CMake.

VERSION_GREATER_EQUAL is supported by CMake >=3.7:
https://cmake.org/cmake/help/latest/command/if.html#version-greater-equal

target_link_options() is supported by CMake >=3.13:
https://cmake.org/cmake/help/latest/command/target_link_options.html

* Use PROTOBUF_USE_DLLS and LIBPROTOC_EXPORTS for libprotoc.so shared library

Similar change for libprotobuf.so and libprotobuf-lite.so was made
in commit 5a0887fc65.

* Make value of PROTOC_EXPORT dependent on LIBPROTOC_EXPORTS instead of LIBPROTOBUF_EXPORTS

This was probably intention, and LIBPROTOC_EXPORTS is also used above
in _MSC_VER branch.
2022-03-07 17:03:50 -08:00
Junrou Nishida
92cdf87f1a
[C#] fix parse failure for extensions with large field numbers (#9591) 2022-03-07 10:46:21 +00:00
Brett McBride
f2002f6022
adding php81 support to release notes (#9590) 2022-03-05 16:18:07 -08: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
aff13048c5
Update CHANGES.txt for 3.20.0 release (#9581) 2022-03-04 13:13:55 -08:00
Adam Cozzette
23e7cfd54a
Lower minimum CMake version to 3.5 (#9580)
We tried increasing it to 3.10, but that turned out to be too high since
gRPC still supports 3.5.1.
2022-03-04 13:13:19 -08:00
Adam Cozzette
388df0041a Update tests.sh to locally install all Java packages, not just util
The JRuby test runs appear to be fetching the util package from Maven
Central because it is not being installed locally. This causes the tests
to fail when we upgrade to a new version that has not yet been published
to Maven Central. This commit fixes the problem by locally installing
all the protobuf packages, not just util.
2022-03-04 09:52:19 -08:00
Adam Cozzette
88a18db91e Update protobuf version 2022-03-04 09:52:19 -08:00
Adam Cozzette
0a246e23f8
Merge pull request #9576 from acozzette/sync-stage
Integrate from Piper for C++, Java, and Python
2022-03-03 18:59:20 -08:00
Adam Cozzette
f59a5845a3 Add new unit test protos to setup.py 2022-03-03 22:25:43 +00:00
Adam Cozzette
839f0f8e06 Add missing GSON dependency 2022-03-03 22:03:15 +00:00
Thomas Van Lenten
bb4302e878 Add a generation option to control use of forward declarations in headers.
Swift importing ObjC drops methods/properties if the type is only a forward
declaration since the type is incomplete. Historically the generator has always
use forward declarations to reduce how much will have rebuild when a proto file
does change; but that puts it at odds with Swift. If ObjC Protos end up spanning
Swift modules, the Swift import behavior could become a problem; so this option
provides a control for the behavior. The current behavior is to continue forward
declarations, but eventually the default will be changed.

Generate the WKTs using imports instead of forward decls.
2022-03-03 16:05:18 -05:00
Adam Cozzette
e29b4e3bc2 Update Makefile.am with new Python files 2022-03-03 17:58:57 +00:00
Adam Cozzette
615d214ade Update CHANGES.txt 2022-03-03 17:25:11 +00:00
Adam Cozzette
b0f9799a7c Sync from Piper @432209397
PROTOBUF_SYNC_PIPER
2022-03-03 17:18:16 +00:00
kunhtkun
5f632bef38
[editors/emacs] Fix protobuf-mode definition (#9572)
Fix a few issues with the Emacs mode definition.

First, in 1ab7789f3 (2021-10-13, Emacs: Protobuf mode should be derived from
prog-mode) we made `protobuf-mode' a derived mode of `prog-mode' using the
`define-derived-mode' macro[1]. However, the definition body was not updated
accordingly. So in this commit, we:

- Remove the superfluous `(interactive)' form;
- Remove the unnecessary call of `kill-all-local-variables', which is already
  handled by `define-derived-mode' and could cause a few issues, for example,
  it prevents `prog-mode-hook' from being run;
- Remove forms that set `major-mode' and `mode-name', which are automatically
  set to the first and third arguments respectively;
- Remove forms that set key map, syntax table, and abbrev table, which are
  already handled automatically;
- Do not run `protobuf-mode-hook' explicitly in the body. It is already arranged
  to be run after the body.

Second, the call to `c-make-emacs-variables-local' is removed. It is called
inside `c-init-language-vars' already. Calling it again should do no harm now,
but to be future-proof it might be better to just remove it.

Finally, we move the `c-update-modeline' form to the :after-hook argument to
ensure it is run at the very end, so that the mode line will reflect all user
customizations done in various mode hooks. Similarly, we run
`c-mode-common-hook' also at the very end to leave a place for user
customizations (for example, set `imenu-generic-expression' in
`c-mode-common-hook').

[1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Derived-Modes.html

Re: https://github.com/protocolbuffers/protobuf/issues/7316
Re: https://github.com/protocolbuffers/protobuf/pull/9076
2022-03-03 09:16:46 -08:00
Adam Cozzette
038b479119
Merge pull request #9570 from acozzette/sync-stage
Integrate from Piper for C++, Java, and Python
2022-03-02 14:23:54 -08:00
Adam Cozzette
5faa6123d1 Reimplement the type sorter to avoid a ICE in gcc 4.8.2.
Thanks to @sbenzaquen for this fix.
2022-03-02 20:54:57 +00:00
Adam Cozzette
1c51f9fb39 Undo unintentional file list changes 2022-03-02 20:50:28 +00:00
Adam Cozzette
f7232f2aa3 Replace EasyMock dependency with Mockito and re-pin Bazel deps 2022-03-02 19:27:59 +00:00
Adam Cozzette
23b2fe6e39 Update CHANGES.txt 2022-03-02 17:44:18 +00:00
Adam Cozzette
76398dab31 Sync from Piper @431959314
PROTOBUF_SYNC_PIPER
2022-03-02 17:37:55 +00:00
Adam Cozzette
0ece18cf2e Merge tag 'refs/tags/sync-piper' into sync-stage 2022-03-02 17:37:55 +00:00
Arfrever
1d13b60904
cmake: Use linker version scripts (#9545)
Autotools build system already uses linker version scripts since
commit 13d165de9e.

Fixes: #6113
2022-03-01 17:06:14 -08:00
Joshua Haberman
2a001f792f
Merge pull request #9556 from ntkme/ruby-suppress-warning
Suppress warning for intentional circular require
2022-03-01 15:24:43 -08:00
Thomas Van Lenten
020e4e33d1 Simplify imports of the WKTs within the library itself.
Overdue followup to https://github.com/protocolbuffers/protobuf/pull/7173

Since all the files are at the same level as the runtime headers, there is no
need for things to be framework based imports, they should all just work like
the other headers do.

- Directly generate the bundled header imports into the preamble section when
  generating for a bundled proto.
- Update the preamble generation to skip the CPP wrapper when generating for a
  bundled proto file.
- Regenerate the WKTs.
- Update GPBProtocolBuffer.h/GPBWellKnownTypes.h to also skip the CPP wrapping.

GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS in the podspec and non bundled files still
has to exist because that comes into play for those files to find the runtime
headers.
2022-03-01 17:01:33 -05:00