Skip to content

Commit 407aa2d

Browse files
Sync from Piper @482325250
PROTOBUF_SYNC_PIPER
2 parents 23f1481 + aa3bc05 commit 407aa2d

File tree

335 files changed

+5408
-7339
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

335 files changed

+5408
-7339
lines changed

.github/workflows/codespell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
with:
1414
check_filenames: true
1515
skip: ./.git,./conformance/third_party,*.snk,*.pb,*.pb.cc,*.pb.h,./src/google/protobuf/testdata,./objectivec/Tests,./python/compatibility_tests/v2.5.0/tests/google/protobuf/internal,./.github/workflows/codespell.yml
16-
ignore_words_list: "alow,alse,ba,chec,cleare,copyable,cloneable,dedup,dur,errorprone,files',fo,fundementals,hel,importd,inout,leapyear,nd,nin,ois,ons,parseable,process',te,testof,ue,unparseable,wasn,wee,gae,keyserver,objext,od,optin,streem,sur,falsy"
16+
ignore_words_list: "alow,alse,ba,chec,cleare,copyable,cloneable,dedup,dur,errorprone,falsy,files',fo,fundementals,hel,importd,inout,leapyear,nd,nin,ois,ons,parseable,process',ro,te,testof,ue,unparseable,wasn,wee,gae,keyserver,objext,od,optin,streem,sur,falsy"

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@
99
[submodule "third_party/jsoncpp"]
1010
path = third_party/jsoncpp
1111
url = https://github.com/open-source-parsers/jsoncpp.git
12+
[submodule "third_party/utf8_range"]
13+
path = third_party/utf8_range
14+
url = https://github.com/protocolbuffers/utf8_range.git

CHANGES.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@
6767
Compiler
6868
* Print full path name of source .proto file on error
6969

70+
2022-10-18 version 21.8 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
71+
72+
Other
73+
* Fix for grpc.tools #17995 & protobuf #7474 (handle UTF-8 paths in argumentfile) (#10721)
74+
75+
C++
76+
* 21.x No longer define no_threadlocal on OpenBSD (#10743)
77+
78+
Java
79+
* Mark default instance as immutable first to avoid race during static initialization of default instances (#10771)
80+
81+
Ruby
82+
* Auto capitalize enums name in Ruby (#10454) (#10763)
83+
7084
2022-09-29 version 21.7 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
7185
Java
7286
* Refactoring java full runtime to reuse sub-message builders and prepare to

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ set_property(CACHE protobuf_ABSL_PROVIDER PROPERTY STRINGS "module" "package")
330330
include(${protobuf_SOURCE_DIR}/cmake/abseil-cpp.cmake)
331331

332332
if (protobuf_BUILD_PROTOBUF_BINARIES)
333+
include(${protobuf_SOURCE_DIR}/cmake/utf8_range.cmake)
333334
include(${protobuf_SOURCE_DIR}/cmake/libprotobuf-lite.cmake)
334335
if (NOT DEFINED protobuf_LIB_PROTOBUF_LITE)
335336
set(protobuf_LIB_PROTOBUF_LITE libprotobuf-lite)

Protobuf.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# dependent projects use the :git notation to refer to the library.
66
Pod::Spec.new do |s|
77
s.name = 'Protobuf'
8-
s.version = '3.21.7'
8+
s.version = '3.21.8'
99
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
1010
s.homepage = 'https://github.com/protocolbuffers/protobuf'
1111
s.license = 'BSD-3-Clause'

WORKSPACE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ upb_deps()
8080
load("@upb//bazel:system_python.bzl", "system_python")
8181
system_python(name = "local_config_python")
8282

83+
load("@utf8_range//:workspace_deps.bzl", "utf8_range_deps")
84+
utf8_range_deps()
85+
8386
bind(
8487
name = "python_headers",
8588
actual = "@local_config_python//:python_headers",

build_defs/cpp_opts.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ COPTS = select({
1414
"/wd4506", # no definition for inline function 'function'
1515
"/wd4800", # 'type' : forcing value to bool 'true' or 'false' (performance warning)
1616
"/wd4996", # The compiler encountered a deprecated declaration.
17+
"/std:c++14", # Use C++14
1718
],
1819
"//conditions:default": [
1920
"-DHAVE_ZLIB",
2021
"-Woverloaded-virtual",
2122
"-Wno-sign-compare",
2223
"-Werror",
24+
"-std=c++14", # Protobuf requires C++14.
2325
],
24-
}) + [
25-
"-std=c++14", # Protobuf requires C++14.
26-
]
26+
})
2727

2828
# Android and MSVC builds do not need to link in a separate pthread library.
2929
LINK_OPTS = select({

cmake/conformance.cmake

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11

2+
if (NOT EXISTS "${protobuf_SOURCE_DIR}/third_party/jsoncpp/CMakeLists.txt")
3+
message(FATAL_ERROR
4+
"Cannot find third_party/jsoncpp directory that's needed to "
5+
"build conformance tests. If you use git, make sure you have cloned "
6+
"submodules:\n"
7+
" git submodule update --init --recursive\n"
8+
"If instead you want to skip them, run cmake with:\n"
9+
" cmake -Dprotobuf_BUILD_CONFORMANCE=OFF\n")
10+
endif()
11+
212
add_custom_command(
313
OUTPUT
414
${protobuf_SOURCE_DIR}/conformance/conformance.pb.h
@@ -33,8 +43,6 @@ add_executable(conformance_test_runner
3343
${protobuf_SOURCE_DIR}/conformance/conformance_test_main.cc
3444
${protobuf_SOURCE_DIR}/conformance/text_format_conformance_suite.cc
3545
${protobuf_SOURCE_DIR}/conformance/text_format_conformance_suite.h
36-
${protobuf_SOURCE_DIR}/conformance/third_party/jsoncpp/json.h
37-
${protobuf_SOURCE_DIR}/conformance/third_party/jsoncpp/jsoncpp.cpp
3846
${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto2.pb.h
3947
${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto2.pb.cc
4048
${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto3.pb.h
@@ -74,3 +82,8 @@ add_test(NAME conformance_cpp_test
7482
--output_dir ${protobuf_TEST_XML_OUTDIR}
7583
${CMAKE_CURRENT_BINARY_DIR}/conformance_cpp
7684
DEPENDS conformance_test_runner conformance_cpp)
85+
86+
set(JSONCPP_WITH_TESTS OFF CACHE BOOL "Disable tests")
87+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/jsoncpp third_party/jsoncpp)
88+
target_include_directories(conformance_test_runner PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/third_party/jsoncpp/include)
89+
target_link_libraries(conformance_test_runner jsoncpp_lib)

cmake/libprotobuf-lite.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ set_target_properties(libprotobuf-lite PROPERTIES
3434
OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
3535
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
3636
add_library(protobuf::libprotobuf-lite ALIAS libprotobuf-lite)
37+
38+
target_include_directories(libprotobuf-lite PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range)
39+
target_link_libraries(libprotobuf-lite PRIVATE utf8_validity)

cmake/libprotobuf.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ set_target_properties(libprotobuf PROPERTIES
3737
OUTPUT_NAME ${LIB_PREFIX}protobuf
3838
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
3939
add_library(protobuf::libprotobuf ALIAS libprotobuf)
40+
41+
target_include_directories(libprotobuf PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range)
42+
target_link_libraries(libprotobuf PRIVATE utf8_validity)

0 commit comments

Comments
 (0)