Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 3.19.x into master #9169

Merged
merged 7 commits into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2021-10-28 version 3.19.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

Bazel
* Ensure that release archives contain everything needed for Bazel (#9131)
* Align dependency handling with Bazel best practices (#9165)

JavaScript
* Fix `ReferenceError: window is not defined` when getting the global object (#9156)

Ruby
* Fix memory leak in MessageClass.encode (#9150)

2021-10-15 version 3.19.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

C++
Expand All @@ -17,6 +29,7 @@

Kotlin
* Switch Kotlin proto DSLs to be implemented with inline value classes
* Fix inlining and deprecation for repeated string fields in kotlin (#9120)

Python
* Proto2 DecodeError now includes message name in error message
Expand All @@ -37,6 +50,7 @@
* Add class method Timestamp.from_time to ruby well known types (#8562)
* Adopt pure ruby DSL implementation for JRuby (#9047)
* Add size to Map class (#8068)
* Fix for descriptor_pb.rb: google/protobuf should be required first (#9121)

C#
* Correctly set ExtensionRegistry when parsing with MessageParser, but using an already existing CodedInputStream (#7246)
Expand Down
2 changes: 1 addition & 1 deletion Protobuf-C++.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Protobuf-C++'
s.version = '3.19.0'
s.version = '3.19.1'
s.summary = 'Protocol Buffers v3 runtime library for C++.'
s.homepage = 'https://github.com/google/protobuf'
s.license = '3-Clause BSD License'
Expand Down
2 changes: 1 addition & 1 deletion Protobuf.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.19.0'
s.version = '3.19.1'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/protocolbuffers/protobuf'
s.license = '3-Clause BSD License'
Expand Down
63 changes: 8 additions & 55 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ http_archive(
)

# Load common dependencies.
load("//:protobuf_deps.bzl", "protobuf_deps")
load("//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps")
protobuf_deps()

bind(
Expand All @@ -36,70 +36,23 @@ bind(
)

load("@rules_jvm_external//:defs.bzl", "maven_install")
maven_install(
artifacts = [
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.code.gson:gson:2.8.6",
"com.google.errorprone:error_prone_annotations:2.3.2",
"com.google.j2objc:j2objc-annotations:1.3",
"com.google.guava:guava:30.1.1-jre",
"com.google.truth:truth:1.1.2",
"junit:junit:4.12",
"org.easymock:easymock:3.2",

],
maven_install(
artifacts = PROTOBUF_MAVEN_ARTIFACTS,
# For updating instructions, see:
# https://github.com/bazelbuild/rules_jvm_external#updating-maven_installjson
maven_install_json = "//:maven_install.json",
repositories = [
"https://repo1.maven.org/maven2",
"https://repo.maven.apache.org/maven2",
],
# For updating instructions, see:
# https://github.com/bazelbuild/rules_jvm_external#updating-maven_installjson
maven_install_json = "//:maven_install.json",
)

load("@maven//:defs.bzl", "pinned_maven_install")
pinned_maven_install()

bind(
name = "guava",
actual = "@maven//:com_google_guava_guava",
)

bind(
name = "gson",
actual = "@maven//:com_google_code_gson_gson",
)

bind(
name = "error_prone_annotations",
actual = "@maven//:com_google_errorprone_error_prone_annotations",
)

bind(
name = "j2objc_annotations",
actual = "@maven//:com_google_j2objc_j2objc_annotations",
)

bind(
name = "jsr305",
actual = "@maven//:com_google_code_findbugs_jsr305",
)

bind(
name = "junit",
actual = "@maven//:junit_junit",
)

bind(
name = "easymock",
actual = "@maven//:org_easymock_easymock",
)

bind(
name = "truth",
actual = "@maven//:com_google_truth_truth",
)
pinned_maven_install()

# For `cc_proto_blacklist_test` and `build_test`.
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

bazel_skylib_workspace()
8 changes: 4 additions & 4 deletions benchmarks/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ python_add_init: protoc_middleman protoc_middleman2
done \
done

python_cpp_pkg_flags = `pkg-config --cflags --libs python`
python_cpp_pkg_flags = `pkg-config --cflags --libs python3`

lib_LTLIBRARIES = libbenchmark_messages.la
libbenchmark_messages_la_SOURCES = python/python_benchmark_messages.cc
Expand All @@ -186,7 +186,7 @@ python-pure-python-benchmark: python_add_init
@echo export DYLD_LIBRARY_PATH=$(top_srcdir)/src/.libs >> python-pure-python-benchmark
@echo export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=\'python\' >> python-pure-python-benchmark
@echo cp $(srcdir)/python/py_benchmark.py tmp >> python-pure-python-benchmark
@echo python tmp/py_benchmark.py '$$@' >> python-pure-python-benchmark
@echo python3 tmp/py_benchmark.py '$$@' >> python-pure-python-benchmark
@chmod +x python-pure-python-benchmark

python-cpp-reflection-benchmark: python_add_init
Expand All @@ -196,7 +196,7 @@ python-cpp-reflection-benchmark: python_add_init
@echo export DYLD_LIBRARY_PATH=$(top_srcdir)/src/.libs >> python-cpp-reflection-benchmark
@echo export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=\'cpp\' >> python-cpp-reflection-benchmark
@echo cp $(srcdir)/python/py_benchmark.py tmp >> python-cpp-reflection-benchmark
@echo python tmp/py_benchmark.py '$$@' >> python-cpp-reflection-benchmark
@echo python3 tmp/py_benchmark.py '$$@' >> python-cpp-reflection-benchmark
@chmod +x python-cpp-reflection-benchmark

python-cpp-generated-code-benchmark: python_add_init libbenchmark_messages.la
Expand All @@ -206,7 +206,7 @@ python-cpp-generated-code-benchmark: python_add_init libbenchmark_messages.la
@echo export DYLD_LIBRARY_PATH=$(top_srcdir)/src/.libs >> python-cpp-generated-code-benchmark
@echo export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=\'cpp\' >> python-cpp-generated-code-benchmark
@echo cp $(srcdir)/python/py_benchmark.py tmp >> python-cpp-generated-code-benchmark
@echo python tmp/py_benchmark.py --cpp_generated '$$@' >> python-cpp-generated-code-benchmark
@echo python3 tmp/py_benchmark.py --cpp_generated '$$@' >> python-cpp-generated-code-benchmark
@chmod +x python-cpp-generated-code-benchmark

python-pure-python: python-pure-python-benchmark
Expand Down
23 changes: 13 additions & 10 deletions benchmarks/python/python_benchmark_messages.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,26 @@
#include "datasets/google_message3/benchmark_message3.pb.h"
#include "datasets/google_message4/benchmark_message4.pb.h"

static PyMethodDef python_benchmark_methods[] = {
{NULL, NULL, 0, NULL} /* Sentinel */
};

static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT,
"libbenchmark_messages",
"Benchmark messages Python module",
-1,
NULL,
NULL,
NULL,
NULL,
NULL};

extern "C" {
PyMODINIT_FUNC
initlibbenchmark_messages() {
PyInit_libbenchmark_messages() {
benchmarks::BenchmarkDataset().descriptor();
benchmarks::proto3::GoogleMessage1().descriptor();
benchmarks::proto2::GoogleMessage1().descriptor();
benchmarks::proto2::GoogleMessage2().descriptor();
benchmarks::google_message3::GoogleMessage3().descriptor();
benchmarks::google_message4::GoogleMessage4().descriptor();

PyObject *m;

m = Py_InitModule("libbenchmark_messages", python_benchmark_methods);
if (m == NULL)
return;
return PyModule_Create(&_module);
}
}
12 changes: 6 additions & 6 deletions benchmarks/util/result_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __parse_cpp_result(filename):
return
if filename[0] != '/':
filename = os.path.dirname(os.path.abspath(__file__)) + '/' + filename
with open(filename, "rb") as f:
with open(filename, encoding="utf-8") as f:
results = json.loads(f.read())
for benchmark in results["benchmarks"]:
data_filename = "".join(
Expand Down Expand Up @@ -96,7 +96,7 @@ def __parse_synthetic_result(filename):
return
if filename[0] != "/":
filename = os.path.dirname(os.path.abspath(__file__)) + "/" + filename
with open(filename, "rb") as f:
with open(filename, encoding="utf-8") as f:
results = json.loads(f.read())
for benchmark in results["benchmarks"]:
__results.append({
Expand Down Expand Up @@ -126,7 +126,7 @@ def __parse_python_result(filename):
return
if filename[0] != '/':
filename = os.path.dirname(os.path.abspath(__file__)) + '/' + filename
with open(filename, "rb") as f:
with open(filename, encoding="utf-8") as f:
results_list = json.loads(f.read())
for results in results_list:
for result in results:
Expand Down Expand Up @@ -176,7 +176,7 @@ def __parse_java_result(filename):
return
if filename[0] != '/':
filename = os.path.dirname(os.path.abspath(__file__)) + '/' + filename
with open(filename, "rb") as f:
with open(filename, encoding="utf-8") as f:
results = json.loads(f.read())
for result in results:
total_weight = 0
Expand Down Expand Up @@ -212,7 +212,7 @@ def __parse_go_result(filename):
return
if filename[0] != '/':
filename = os.path.dirname(os.path.abspath(__file__)) + '/' + filename
with open(filename, "rb") as f:
with open(filename, encoding="utf-8") as f:
for line in f:
result_list = re.split(r"[\ \t]+", line)
if result_list[0][:9] != "Benchmark":
Expand Down Expand Up @@ -252,7 +252,7 @@ def __parse_custom_result(filename, language):
return
if filename[0] != '/':
filename = os.path.dirname(os.path.abspath(__file__)) + '/' + filename
with open(filename, "rb") as f:
with open(filename, encoding="utf-8") as f:
results = json.loads(f.read())
for result in results:
_, avg_size = __get_data_size(result["filename"])
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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.19.0],[protobuf@googlegroups.com],[protobuf])
AC_INIT([Protocol Buffers],[3.19.1],[protobuf@googlegroups.com],[protobuf])

AM_MAINTAINER_MODE([enable])

Expand Down
2 changes: 1 addition & 1 deletion csharp/Google.Protobuf.Tools.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.19.0</version>
<version>3.19.1</version>
<authors>Google Inc.</authors>
<owners>protobuf-packages</owners>
<licenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</licenseUrl>
Expand Down
2 changes: 1 addition & 1 deletion csharp/src/Google.Protobuf/Google.Protobuf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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.19.0</VersionPrefix>
<VersionPrefix>3.19.1</VersionPrefix>
<!-- C# 7.2 is required for Span/BufferWriter/ReadOnlySequence -->
<LangVersion>7.2</LangVersion>
<Authors>Google Inc.</Authors>
Expand Down
6 changes: 3 additions & 3 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If you are using Maven, use the following:
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.19.0</version>
<version>3.19.1</version>
</dependency>
```

Expand All @@ -37,15 +37,15 @@ protobuf-java-util package:
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>3.19.0</version>
<version>3.19.1</version>
</dependency>
```

### Gradle

If you are using Gradle, add the following to your `build.gradle` file's dependencies:
```
implementation 'com.google.protobuf:protobuf-java:3.19.0'
implementation 'com.google.protobuf:protobuf-java:3.19.1'
```
Again, be sure to check that the version number matches (or is newer than) the version number of protoc that you are using.

Expand Down
2 changes: 1 addition & 1 deletion java/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-bom</artifactId>
<version>3.19.0</version>
<version>3.19.1</version>
<packaging>pom</packaging>

<name>Protocol Buffers [BOM]</name>
Expand Down
Loading