Commit Graph

9215 Commits

Author SHA1 Message Date
Jason Lunn
40cb0e43c0
Merge pull request #9638 from JasonLunn/master
Add alternative instructions for Homebrew users.
2022-03-16 22:41:08 -04:00
Deanna Garcia
faae704730 Toolchain cleanups 2022-03-16 21:07:51 +00:00
Jason Lunn
557f6fbfc8 Add alternative instructions for Homebrew users. 2022-03-16 13:48:15 -04:00
Jason Lunn
58e320a732 Fix NPE during encoding and add regression test for issue 9507. 2022-03-16 13:37:46 -04:00
deannagarcia
178ebc179e
Merge pull request #9628 from protocolbuffers/windowsSysroot
Removing toolchain_dir variable
2022-03-15 12:12:58 -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
Deanna Garcia
202ec9ed9b Removing toolchain_dir variable 2022-03-14 17:33:08 +00:00
Arfrever Frehtes Taifersar Arahesis
5dab09408c
Enable GeneratedDescriptorTest.EnormousDescriptor test for GCC/Clang CMake builds (#9617) 2022-03-10 16:40:07 -08:00
Arfrever Frehtes Taifersar Arahesis
bd935e101d
cmake: Call get_filename_component() with DIRECTORY mode instead of PATH mode (#9614)
PATH mode is legacy alias for DIRECTORY mode (needed only for CMake <= 2.8.11):
https://cmake.org/cmake/help/latest/command/get_filename_component.html
2022-03-10 12:05:27 -08:00
Go Kudo
1722b16e03
[PHP] fix PHP build system (#9571)
* [PHP] fix PHP extension build system

* fix year

* fix EXTRA_DIST

* remove include header

* add comment

* Revert "add comment"

This reverts commit e462966aa927b01d888527c17aaf29ea9ac6b6b4.

* add comment

* fix dangling commit

Co-authored-by: Go Kudo <g-kudo@colopl.co.jp>
2022-03-10 11:44:01 -08:00
Adam Cozzette
1ddad63dd9 Sync from Piper @acozzette/proto_github_202203101748
PROTOBUF_SYNC_PIPER
2022-03-10 18:44:16 +00:00
Adam Cozzette
b20209f321 Sync from Piper @acozzette/proto_github_202203101748
PROTOBUF_SYNC_PIPER
2022-03-10 18:36:42 +00:00
deannagarcia
f4d22f80a2
Merge pull request #9610 from protocolbuffers/manylinuxToolchains
Changing toolchain build file
2022-03-10 10:26:19 -08:00
Elliotte Rusty Harold
3adfa9afc5
clean up language (#9577)
* clean up language

@logophile

* Update lite.md
2022-03-10 13:19:07 -05:00
lzj
7d5af9d539
avoid allocating memory if all extension are cleared (#9345)
* Update extension_set.cc

avoid allocating memory if all extension are cleared

* Avoid allocating too much memory

* Accurately count flat memory size

* Update extension_set.cc

use the 4x growth.

* add unittest for ExtensionSet
2022-03-10 08:41:08 -08:00
Martin Schröder
75554b80a1
Replace gradle plugin with a live project (#9611)
Replace the link for the gradle plugin with a project that's alive.
2022-03-10 07:55:49 -08:00
Deanna Garcia
02be7a09f1 Changing toolchain build file 2022-03-09 23:34:31 +00:00
Arfrever Frehtes Taifersar Arahesis
426866285b cmake: Replace protobuf_source_dir variable with protobuf_SOURCE_DIR variable (#9596)
protobuf_source_dir variable is no longer needed and has the same value
as protobuf_SOURCE_DIR variable, which is instance of CMake-standard
<PROJECT-NAME>_SOURCE_DIR variable:
https://cmake.org/cmake/help/latest/variable/PROJECT-NAME_SOURCE_DIR.html
2022-03-09 14:55:55 -08:00
Arfrever Frehtes Taifersar Arahesis
def70d725a Add cmake/CMakeLists.txt for compatibility (#9596) 2022-03-09 14:55:55 -08:00
Arfrever Frehtes Taifersar Arahesis
14cab5b909 Rename main cmake/CMakeLists.txt to CMakeLists.txt
Fixes: #9596
2022-03-09 14:55:55 -08:00
Adam Cozzette
5ad0697c86
Merge pull request #9604 from protocolbuffers/3.20.x
Merge 3.20.x into master
2022-03-08 14:38:23 -08:00
Go Kudo
d1d13ed6fa
[PHP] Remove unnecessary zval initialization (#9600)
* [PHP] remove unneccesary zval

* fix memory leak, warning, Makefile
2022-03-08 14:35:48 -08: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