Skip to content

Commit 1951078

Browse files
committed
Merge to main
2 parents 1e23a36 + 507ba36 commit 1951078

File tree

442 files changed

+20706
-11177
lines changed

Some content is hidden

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

442 files changed

+20706
-11177
lines changed

.github/workflows/staleness_check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
# If we are in a continuous run, test other supported branches
3030
- branch: ${{ inputs.continuous-run && '25.x' }}
3131
- branch: ${{ inputs.continuous-run && '27.x' }}
32+
- branch: ${{ inputs.continuous-run && '28.x' }}
3233

3334
name: Test staleness ${{ matrix.os.name }} ${{ matrix.branch }}
3435
runs-on: ${{ matrix.os.value }}

.github/workflows/test_bazel.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ jobs:
3232
include:
3333
- runner: ubuntu
3434
bazelversion: '6.4.0'
35-
bzlmod: true
36-
continuous-only: true
37-
- runner: ubuntu
38-
bazelversion: '6.4.0'
35+
# Not running Bazel 6 with bzlmod, because it doesn't support use_repo_rule in rules_jvm_external
3936
bzlmod: false
4037
continuous-only: true
4138
runs-on: ${{ matrix.runner }}-latest

.github/workflows/test_cpp.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
config:
3030
- { name: Optimized, flags: --config=opt }
3131
- { name: Debug, flags: --config=dbg, continuous-only: true }
32-
- { name: ASAN, flags: --config=asan, runner: ubuntu-20-large }
33-
- { name: MSAN, flags: --config=docker-msan, runner: ubuntu-20-large, continuous-only: true }
34-
- { name: TSAN, flags: --config=tsan, runner: ubuntu-20-large, continuous-only: true }
32+
- { name: ASAN, flags: --config=asan, runner: ubuntu-22-4core }
33+
- { name: MSAN, flags: --config=docker-msan, runner: ubuntu-22-4core, continuous-only: true }
34+
- { name: TSAN, flags: --config=tsan, runner: ubuntu-22-4core, continuous-only: true }
3535
- { name: UBSAN, flags: --config=ubsan, continuous-only: true }
3636
- { name: No-RTTI, flags: --cxxopt=-fno-rtti, continuous-only: true }
3737
include:
@@ -40,13 +40,22 @@ jobs:
4040
- targets: //pkg/... //src/... @com_google_protobuf_examples//... //third_party/utf8_range/...
4141

4242
# Override cases with custom images
43-
- config: { name: "Bazel7" }
43+
- config: { name: "Bazel7", flags: --noenable_bzlmod }
44+
version: Bazel7
4445
image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:7.1.2-cf84e92285ca133b9c8104ad7b14d70e953cbb8e"
4546
targets: "//src/... //third_party/utf8_range/..."
47+
- config: { name: "Bazel7 with Bzlmod", flags: --enable_bzlmod }
48+
version: Bazel7bzlmod
49+
image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:7.1.2-cf84e92285ca133b9c8104ad7b14d70e953cbb8e"
50+
targets: "//src/... //third_party/utf8_range/..."
51+
# TODO: enable back command_line_interface_unittest after bug is fixed
52+
exclude-targets: "-//src/google/protobuf/compiler:command_line_interface_unittest"
4653
- config: { name: "TCMalloc" }
54+
version: TcMalloc
4755
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/tcmalloc@sha256:1c5133455481f4d1bb8afa477029604f41f1a3c46cebe4d9958cf1af95b5c87c"
4856
targets: "//src/... //third_party/utf8_range/..."
4957
- config: { name: "aarch64" }
58+
version: TcMalloc
5059
targets: "//src/... //src/google/protobuf/compiler:protoc_aarch64_test //third_party/utf8_range/..."
5160
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:6.3.0-aarch64-68e662b3a56b881804dc4e9d45f949791cbc4b94"
5261
name: ${{ matrix.config.continuous-only && inputs.continuous-prefix || '' }} Linux ${{ matrix.config.name }}
@@ -63,8 +72,9 @@ jobs:
6372
with:
6473
image: ${{ matrix.image }}
6574
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
66-
bazel-cache: cpp_linux/${{ matrix.config.name }}
75+
bazel-cache: cpp_linux/${{ matrix.version }}
6776
bazel: test ${{ matrix.targets }} ${{ matrix.config.flags }}
77+
exclude-targets: ${{ matrix.exclude-targets }}
6878

6979
linux-gcc:
7080
strategy:
@@ -92,7 +102,7 @@ jobs:
92102
matrix:
93103
arch: [x86_64, aarch64]
94104
name: Linux Release ${{ matrix.arch}}
95-
runs-on: ubuntu-latest
105+
runs-on: ubuntu-20-4core
96106
steps:
97107
- name: Checkout pending changes
98108
uses: protocolbuffers/protobuf-ci/checkout@v3
@@ -466,6 +476,12 @@ jobs:
466476
arch: ${{ matrix.windows-arch || 'x64' }}
467477
vsversion: ${{ matrix.vsversion }}
468478

479+
# Workaround for Abseil incompatibility with CMake 3.30 (b/352354235).
480+
- name: Downgrade CMake
481+
if: ${{ runner.os == 'Windows' }}
482+
run: choco install cmake --version 3.29.6 --force
483+
shell: bash
484+
469485
# Workaround for incompatibility between gcloud and windows-2019 runners.
470486
- name: Install Python
471487
if: ${{ matrix.python-version && (!matrix.continuous-only || inputs.continuous-run) }}

.github/workflows/test_java.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ jobs:
4444
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:17-1fdbb997433cb22c1e49ef75ad374a8d6bb88702
4545
targets: //java/... //java/internal:java_version //compatibility/...
4646
continuous-only: false
47+
- name: Bazel7
48+
version: 'bazel7nobzlmod'
49+
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:7.1.2-cf84e92285ca133b9c8104ad7b14d70e953cbb8e
50+
targets: //java/... //java/internal:java_version //compatibility/...
51+
flags: --noenable_bzlmod
52+
- name: Bazel7 with Bzlmod
53+
version: 'bazel7bzlmod'
54+
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:7.1.2-cf84e92285ca133b9c8104ad7b14d70e953cbb8e
55+
targets: //java/... //java/internal:java_version //compatibility/...
56+
flags: --enable_bzlmod
57+
>>>>>>> upstream/main
4758
- name: aarch64
4859
version: 'aarch64'
4960
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:aarch64-63dd26c0c7a808d92673a3e52e848189d4ab0f17
@@ -65,7 +76,7 @@ jobs:
6576
image: ${{ matrix.image }}
6677
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
6778
bazel-cache: java_linux/${{ matrix.version }}
68-
bazel: test ${{ matrix.targets }} --test_env=KOKORO_JAVA_VERSION
79+
bazel: test ${{ matrix.targets }} ${{ matrix.flags }} --test_env=KOKORO_JAVA_VERSION
6980

7081
# TODO restore this test (or a better one) when gRPC has rebuilt with 26.x
7182
# linkage-monitor:

.github/workflows/test_upb.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- { name: "Bazel 7", bazel_version: "7.1.1", continuous-only: true }
3131
- { name: "Fastbuild" }
3232
- { name: "Optimized", flags: "-c opt", continuous-only: true }
33-
- { name: "ASAN", flags: "--config=asan -c dbg", exclude-targets: "-//benchmarks:benchmark -//python/...", runner: ubuntu-20-large }
33+
- { name: "ASAN", flags: "--config=asan -c dbg", exclude-targets: "-//benchmarks:benchmark -//python/...", runner: ubuntu-22-4core }
3434
- { name: "UBSAN", flags: "--config=ubsan -c dbg", exclude-targets: "-//benchmarks:benchmark -//python/... -//lua/...", continuous-only: true }
3535
- { name: "32-bit", flags: "--copt=-m32 --linkopt=-m32", exclude-targets: "-//benchmarks:benchmark -//python/..." }
3636
# TODO: Add 32-bit ASAN test
@@ -52,7 +52,7 @@ jobs:
5252
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize:${{ matrix.config.bazel_version || '6.3.0' }}-75f2a85ece6526cc3d54087018c0f1097d78d42b
5353
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
5454
bazel-cache: upb-bazel
55-
bazel: test --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 //bazel/... //benchmarks/... //lua/... //protos/... //hpb_generator/... //python/... //upb/... //upb_generator/... ${{ matrix.config.flags }}
55+
bazel: test --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 //bazel/... //benchmarks/... //lua/... //python/... //upb/... //upb_generator/... ${{ matrix.config.flags }}
5656
exclude-targets: ${{ matrix.config.exclude-targets }}
5757

5858
linux-gcc:
@@ -71,7 +71,7 @@ jobs:
7171
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:12.2-6.3.0-63dd26c0c7a808d92673a3e52e848189d4ab0f17"
7272
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
7373
bazel-cache: "upb-bazel-gcc"
74-
bazel: test --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 -c opt //bazel/... //benchmarks/... //lua/... //protos/... //hpb_generator/... //python/... //upb/... //upb_generator/...
74+
bazel: test --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 -c opt //bazel/... //benchmarks/... //lua/... //python/... //upb/... //upb_generator/...
7575

7676
windows:
7777
strategy:
@@ -92,7 +92,7 @@ jobs:
9292
with:
9393
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
9494
bazel-cache: "upb-bazel-windows"
95-
bazel: test --cxxopt=/std:c++17 --host_cxxopt=/std:c++17 //upb/... //upb_generator/... //python/... //protos/... //hpb_generator/...
95+
bazel: test --cxxopt=/std:c++17 --host_cxxopt=/std:c++17 //upb/... //upb_generator/... //python/...
9696
version: 6.3.0
9797
exclude-targets: -//python:conformance_test -//upb/reflection:def_builder_test
9898

@@ -119,7 +119,7 @@ jobs:
119119
with:
120120
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
121121
bazel-cache: "upb-bazel-macos"
122-
bazel: ${{ matrix.config.bazel-command }} --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 ${{ matrix.config.flags }} //bazel/... //benchmarks/... //lua/... //protos/... //hpb_generator/... //python/... //upb/... //upb_generator/...
122+
bazel: ${{ matrix.config.bazel-command }} --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 ${{ matrix.config.flags }} //bazel/... //benchmarks/... //lua/... //python/... //upb/... //upb_generator/...
123123
version: 6.3.0
124124

125125
no-python:
@@ -182,13 +182,13 @@ jobs:
182182
# supported Python versions and assume this gives us sufficient test
183183
# coverage.
184184
- { os: ubuntu-latest, python-version: "3.8", architecture: x64, type: 'binary' }
185-
- { os: macos-11, python-version: "3.8", architecture: x64, type: 'binary' }
185+
- { os: macos-12, python-version: "3.8", architecture: x64, type: 'binary' }
186186
- { os: ubuntu-latest, python-version: "3.12", architecture: x64, type: 'binary' }
187-
- { os: macos-12, python-version: "3.12", architecture: x64, type: 'binary' }
187+
- { os: macos-13, python-version: "3.12", architecture: x64, type: 'binary' }
188188
- { os: ubuntu-latest, python-version: "3.8", architecture: x64, type: 'source', continuous-only: true }
189-
- { os: macos-11, python-version: "3.8", architecture: x64, type: 'source', continuous-only: true }
189+
- { os: macos-12, python-version: "3.8", architecture: x64, type: 'source', continuous-only: true }
190190
- { os: ubuntu-latest, python-version: "3.12", architecture: x64, type: 'source', continuous-only: true }
191-
- { os: macos-12, python-version: "3.12", architecture: x64, type: 'source', continuous-only: true }
191+
- { os: macos-13, python-version: "3.12", architecture: x64, type: 'source', continuous-only: true }
192192

193193
# Windows uses the full API up until Python 3.10.
194194
- { os: windows-2019, python-version: "3.8", architecture: x86, type: 'binary', continuous-only: true }

BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ load(":protobuf.bzl", "internal_objc_proto_library", "internal_php_proto_library
1212

1313
licenses(["notice"])
1414

15-
exports_files(["LICENSE"])
15+
exports_files([
16+
"LICENSE",
17+
"PrivacyInfo.xcprivacy",
18+
])
1619

1720
################################################################################
1821
# Well Known Types Proto Library Rules

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ option(protobuf_BUILD_LIBUPB "Build libupb" ON)
3535
option(protobuf_DISABLE_RTTI "Remove runtime type information in the binaries" OFF)
3636
option(protobuf_TEST_XML_OUTDIR "Output directory for XML logs from tests." "")
3737
option(protobuf_ALLOW_CCACHE "Adjust build flags to allow for ccache support." OFF)
38+
39+
# We support Unity (Jumbo) builds best-effort.
40+
option(protobuf_USE_UNITY_BUILD "Enable Unity (Jumbo) build for" OFF)
3841
if (BUILD_SHARED_LIBS)
3942
set(protobuf_BUILD_SHARED_LIBS_DEFAULT ON)
4043
else (BUILD_SHARED_LIBS)
@@ -81,7 +84,7 @@ if (protobuf_BUILD_SHARED_LIBS)
8184
endif ()
8285

8386
# Version metadata
84-
set(protobuf_VERSION_STRING "5.28.0")
87+
set(protobuf_VERSION_STRING "5.29.0")
8588
set(protobuf_DESCRIPTION "Protocol Buffers")
8689
set(protobuf_CONTACT "protobuf@googlegroups.com")
8790

MODULE.bazel

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
module(
55
name = "protobuf",
6-
version = "28.0-dev", # Automatically updated on release
6+
version = "29.0-dev", # Automatically updated on release
77
compatibility_level = 1,
88
repo_name = "com_google_protobuf",
99
)
@@ -18,12 +18,14 @@ bazel_dep(name = "jsoncpp", version = "1.9.5")
1818
bazel_dep(name = "rules_cc", version = "0.0.9")
1919
bazel_dep(name = "rules_fuzzing", version = "0.5.2")
2020
bazel_dep(name = "rules_java", version = "5.3.5")
21-
bazel_dep(name = "rules_jvm_external", version = "5.1")
21+
bazel_dep(name = "rules_jvm_external", version = "6.0")
22+
bazel_dep(name = "rules_kotlin", version = "1.9.0")
2223
bazel_dep(name = "rules_pkg", version = "0.7.0")
2324
bazel_dep(name = "rules_python", version = "0.28.0")
2425
bazel_dep(name = "rules_rust", version = "0.45.1")
2526
bazel_dep(name = "platforms", version = "0.0.8")
2627
bazel_dep(name = "zlib", version = "1.3.1")
28+
bazel_dep(name = "bazel_features", version = "1.13.0", repo_name = "proto_bazel_features")
2729

2830
# TODO: remove after toolchain types are moved to protobuf
2931
bazel_dep(name = "rules_proto", version = "4.0.0")
@@ -70,3 +72,30 @@ crate.spec(
7072
)
7173
crate.from_specs()
7274
use_repo(crate, crate_index = "crates")
75+
76+
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
77+
maven.install(
78+
artifacts = [
79+
"com.google.caliper:caliper:1.0-beta-3",
80+
"com.google.code.findbugs:jsr305:3.0.2",
81+
"com.google.code.gson:gson:2.8.9",
82+
"com.google.errorprone:error_prone_annotations:2.5.1",
83+
"com.google.j2objc:j2objc-annotations:2.8",
84+
"com.google.guava:guava:32.0.1-jre",
85+
"com.google.guava:guava-testlib:32.0.1-jre",
86+
"com.google.truth:truth:1.1.2",
87+
"junit:junit:4.13.2",
88+
"org.mockito:mockito-core:4.3.1",
89+
"biz.aQute.bnd:biz.aQute.bndlib:6.4.0",
90+
"info.picocli:picocli:4.6.3",
91+
],
92+
repositories = [
93+
"https://repo1.maven.org/maven2",
94+
"https://repo.maven.apache.org/maven2",
95+
],
96+
)
97+
use_repo(maven, "maven")
98+
99+
# Development dependencies
100+
bazel_dep(name = "googletest", version = "1.14.0", repo_name = "com_google_googletest", dev_dependency = True)
101+
bazel_dep(name = "rules_testing", version = "0.6.0", dev_dependency = True)

Protobuf-C++.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Protobuf-C++'
3-
s.version = '5.28.0'
3+
s.version = '5.29.0'
44
s.summary = 'Protocol Buffers v3 runtime library for C++.'
55
s.homepage = 'https://github.com/google/protobuf'
66
s.license = 'BSD-3-Clause'

Protobuf.podspec

Lines changed: 5 additions & 2 deletions
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.28.0'
8+
s.version = '3.29.0'
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'
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
1818
s.source = { :git => 'https://github.com/protocolbuffers/protobuf.git',
1919
:tag => "v#{s.version}" }
2020

21-
s.source_files = 'objectivec/*.{h,m}',
21+
s.source_files = 'objectivec/*.{h,m,swift}',
2222
'objectivec/google/protobuf/Any.pbobjc.h',
2323
'objectivec/google/protobuf/Api.pbobjc.h',
2424
'objectivec/google/protobuf/Duration.pbobjc.h',
@@ -33,6 +33,9 @@ Pod::Spec.new do |s|
3333
# left out, as it's an umbrella implementation file.
3434
s.exclude_files = 'objectivec/GPBProtocolBuffers.m'
3535

36+
# Now that there is a Swift source file, set a version.
37+
s.swift_version = '5.0'
38+
3639
s.resource_bundle = {
3740
"Protobuf_Privacy" => "PrivacyInfo.xcprivacy"
3841
}

0 commit comments

Comments
 (0)