Merge pull request #8338 from acozzette/3.15.x-202102231541

Merge 3.15.x into master
This commit is contained in:
Adam Cozzette 2021-02-24 16:46:27 -08:00 committed by GitHub
commit a6c28fb207
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 72 additions and 40 deletions

View File

@ -1,3 +1,11 @@
2021-02-23 version 3.15.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Ruby
* Fix for FieldDescriptor.get(msg) (#8330)
C++
* Fix PROTOBUF_CONSTINIT macro redefinition (#8323)
2021-02-05 version 3.15.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Ruby

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Protobuf-C++'
s.version = '3.15.1'
s.version = '3.15.2'
s.summary = 'Protocol Buffers v3 runtime library for C++.'
s.homepage = 'https://github.com/google/protobuf'
s.license = '3-Clause BSD License'

View File

@ -5,7 +5,7 @@
# dependent projects use the :git notation to refer to the library.
Pod::Spec.new do |s|
s.name = 'Protobuf'
s.version = '3.15.1'
s.version = '3.15.2'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/protocolbuffers/protobuf'
s.license = '3-Clause BSD License'

View File

@ -17,7 +17,7 @@ AC_PREREQ(2.59)
# In the SVN trunk, the version should always be the next anticipated release
# version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed
# the size of one file name in the dist tarfile over the 99-char limit.)
AC_INIT([Protocol Buffers],[3.15.1],[protobuf@googlegroups.com],[protobuf])
AC_INIT([Protocol Buffers],[3.15.2],[protobuf@googlegroups.com],[protobuf])
AM_MAINTAINER_MODE([enable])

View File

@ -5,7 +5,7 @@
<title>Google Protocol Buffers tools</title>
<summary>Tools for Protocol Buffers - Google's data interchange format.</summary>
<description>See project site for more info.</description>
<version>3.15.1</version>
<version>3.15.2</version>
<authors>Google Inc.</authors>
<owners>protobuf-packages</owners>
<licenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</licenseUrl>

View File

@ -4,7 +4,7 @@
<Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description>
<Copyright>Copyright 2015, Google Inc.</Copyright>
<AssemblyTitle>Google Protocol Buffers</AssemblyTitle>
<VersionPrefix>3.15.1</VersionPrefix>
<VersionPrefix>3.15.2</VersionPrefix>
<!-- C# 7.2 is required for Span/BufferWriter/ReadOnlySequence -->
<LangVersion>7.2</LangVersion>
<Authors>Google Inc.</Authors>

View File

@ -4,7 +4,7 @@
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-bom</artifactId>
<version>3.15.1</version>
<version>3.15.2</version>
<packaging>pom</packaging>
<name>Protocol Buffers [BOM]</name>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.15.1</version>
<version>3.15.2</version>
</parent>
<artifactId>protobuf-java</artifactId>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.15.1</version>
<version>3.15.2</version>
</parent>
<artifactId>protobuf-javalite</artifactId>

View File

@ -4,7 +4,7 @@
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.15.1</version>
<version>3.15.2</version>
<packaging>pom</packaging>
<name>Protocol Buffers [Parent]</name>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.15.1</version>
<version>3.15.2</version>
</parent>
<artifactId>protobuf-java-util</artifactId>

View File

@ -1,6 +1,6 @@
{
"name": "google-protobuf",
"version": "3.15.1",
"version": "3.15.2",
"description": "Protocol Buffers for JavaScript",
"main": "google-protobuf.js",
"files": [

View File

@ -10,11 +10,11 @@
<email>protobuf-opensource@google.com</email>
<active>yes</active>
</lead>
<date>2021-02-19</date>
<time>10:50:04</time>
<date>2021-02-23</date>
<time>11:35:09</time>
<version>
<release>3.15.1</release>
<api>3.15.1</api>
<release>3.15.2</release>
<api>3.15.2</api>
</version>
<stability>
<release>stable</release>
@ -820,5 +820,20 @@ G A release.
<notes>
</notes>
</release>
<release>
<version>
<release>3.15.2</release>
<api>3.15.2</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2021-02-23</date>
<time>11:35:09</time>
<license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
<notes>
</notes>
</release>
</changelog>
</package>

View File

@ -76,7 +76,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_setter, 0, 0, 1)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()
#define PHP_PROTOBUF_VERSION "3.15.1"
#define PHP_PROTOBUF_VERSION "3.15.2"
// ptr -> PHP object cache. This is a weak map that caches lazily-created
// wrapper objects around upb types:

View File

@ -8,7 +8,7 @@
</parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protoc</artifactId>
<version>3.15.1</version>
<version>3.15.2</version>
<packaging>pom</packaging>
<name>Protobuf Compiler</name>
<description>

View File

@ -30,4 +30,4 @@
# Copyright 2007 Google Inc. All Rights Reserved.
__version__ = '3.15.1'
__version__ = '3.15.2'

View File

@ -960,16 +960,14 @@ static VALUE FieldDescriptor_subtype(VALUE _self) {
static VALUE FieldDescriptor_get(VALUE _self, VALUE msg_rb) {
FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
const upb_msgdef *m;
const upb_msgdef *msg = Message_Get(msg_rb, &m);
VALUE arena = Message_GetArena(msg_rb);
upb_msgval msgval;
Message_Get(msg_rb, &m);
if (m != upb_fielddef_containingtype(self->fielddef)) {
rb_raise(cTypeError, "get method called on wrong message type");
}
msgval = upb_msg_get(msg, self->fielddef);
return Convert_UpbToRuby(msgval, TypeInfo_get(self->fielddef), arena);
return Message_getfield(msg_rb, self->fielddef);
}
/*

View File

@ -292,7 +292,7 @@ static void Message_setfield(upb_msg* msg, const upb_fielddef* f, VALUE val,
upb_msg_set(msg, f, msgval, arena);
}
static VALUE Message_getfield(VALUE _self, const upb_fielddef* f) {
VALUE Message_getfield(VALUE _self, const upb_fielddef* f) {
Message* self = ruby_to_Message(_self);
// This is a special-case: upb_msg_mutable() for map & array are logically
// const (they will not change what is serialized) but physically

View File

@ -63,6 +63,9 @@ const upb_msg* Message_GetUpbMessage(VALUE value, const upb_msgdef* m,
// object will reference |arena| and ensure that it outlives this object.
VALUE Message_GetRubyWrapper(upb_msg* msg, const upb_msgdef* m, VALUE arena);
// Gets the given field from this message.
VALUE Message_getfield(VALUE _self, const upb_fielddef* f);
// Implements #inspect for this message, printing the text to |b|.
void Message_PrintMessage(StringBuilder* b, const upb_msg* msg,
const upb_msgdef* m);

View File

@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "google-protobuf"
s.version = "3.15.1"
s.version = "3.15.2"
git_tag = "v#{s.version.to_s.sub('.rc.', '-rc')}" # Converts X.Y.Z.rc.N to vX.Y.Z-rcN, used for the git tag
s.licenses = ["BSD-3-Clause"]
s.summary = "Protocol Buffers"

View File

@ -193,4 +193,12 @@ class TestWellKnownTypes < Test::Unit::TestCase
assert_equal false, s['b'][:y]
assert_equal false, s[:b]['y']
end
def test_b8325
value_field = Google::Protobuf::ListValue.descriptor.lookup("values")
proto = Google::Protobuf::ListValue.new(
values: [Google::Protobuf::Value.new(string_value: "Hello")]
)
assert_equal '[<Google::Protobuf::Value: string_value: "Hello">]', value_field.get(proto).inspect
end
end

View File

@ -18,7 +18,7 @@ else
PTHREAD_DEF =
endif
PROTOBUF_VERSION = 26:1:0
PROTOBUF_VERSION = 26:2:0
if GCC
# Turn on all warnings except for sign comparison (we ignore sign comparison

View File

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3015001 < PROTOBUF_MIN_PROTOC_VERSION
#if 3015002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View File

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3015001 < PROTOBUF_MIN_PROTOC_VERSION
#if 3015002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View File

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3015001 < PROTOBUF_MIN_PROTOC_VERSION
#if 3015002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View File

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3015001 < PROTOBUF_MIN_PROTOC_VERSION
#if 3015002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View File

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3015001 < PROTOBUF_MIN_PROTOC_VERSION
#if 3015002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View File

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3015001 < PROTOBUF_MIN_PROTOC_VERSION
#if 3015002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View File

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3015001 < PROTOBUF_MIN_PROTOC_VERSION
#if 3015002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View File

@ -335,7 +335,7 @@
// Shared google3/opensource definitions. //////////////////////////////////////
#define PROTOBUF_VERSION 3015001
#define PROTOBUF_VERSION 3015002
#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3015000
#define PROTOBUF_MIN_PROTOC_VERSION 3015000
#define PROTOBUF_VERSION_SUFFIX ""

View File

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3015001 < PROTOBUF_MIN_PROTOC_VERSION
#if 3015002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View File

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3015001 < PROTOBUF_MIN_PROTOC_VERSION
#if 3015002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View File

@ -82,7 +82,7 @@ namespace internal {
// The current version, represented as a single integer to make comparison
// easier: major * 10^6 + minor * 10^3 + micro
#define GOOGLE_PROTOBUF_VERSION 3015001
#define GOOGLE_PROTOBUF_VERSION 3015002
// A suffix string for alpha, beta or rc releases. Empty for stable releases.
#define GOOGLE_PROTOBUF_VERSION_SUFFIX ""

View File

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3015001 < PROTOBUF_MIN_PROTOC_VERSION
#if 3015002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View File

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3015001 < PROTOBUF_MIN_PROTOC_VERSION
#if 3015002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.

View File

@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3015001 < PROTOBUF_MIN_PROTOC_VERSION
#if 3015002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.