* 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
* 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.
* 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.
* 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.
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.
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.
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