Skip to content

Commit 86f87a2

Browse files
authored
build(deps): Update protobuf to v25.3 (#1165)
1 parent 9592e7c commit 86f87a2

File tree

4 files changed

+6
-66
lines changed

4 files changed

+6
-66
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010

1111
env:
12-
PROTOC_VERSION: '3.20.3'
12+
PROTOC_VERSION: '3.25.3'
1313
clippy_rust_version: '1.80'
1414

1515
jobs:

protobuf/build.rs

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::fs;
33
use std::path::{Path, PathBuf};
44
use std::process::Command;
55

6-
use anyhow::{ensure, Context, Result};
6+
use anyhow::{Context, Result};
77

88
fn main() -> Result<()> {
99
let out_dir =
@@ -20,8 +20,6 @@ fn main() -> Result<()> {
2020
let protobuf_dir = &out_dir.join(format!("protobuf-{}", version));
2121

2222
if !protobuf_dir.exists() {
23-
apply_patches(&src_dir)?;
24-
2523
let build_dir = &out_dir.join(format!("build-protobuf-{}", version));
2624
fs::create_dir_all(build_dir).expect("failed to create build directory");
2725

@@ -90,25 +88,6 @@ fn git_describe(src_dir: &Path) -> Result<String> {
9088
Ok(stdout.trim().to_string())
9189
}
9290

93-
/// Apply patches to the protobuf source directory
94-
fn apply_patches(src_dir: &Path) -> Result<()> {
95-
let mut patch_src = env::current_dir().context("failed to get current working directory")?;
96-
patch_src.push("src");
97-
patch_src.push("fix-conformance_test_runner-cmake-build.patch");
98-
99-
let rc = Command::new("patch")
100-
.arg("-p1")
101-
.arg("-i")
102-
.arg(patch_src)
103-
.current_dir(src_dir)
104-
.status()
105-
.context("failed to apply patch")?;
106-
// exit code: 0 means success; 1 means already applied
107-
ensure!(rc.code().unwrap() <= 1, "protobuf patch failed");
108-
109-
Ok(())
110-
}
111-
11291
fn install_protoc_and_conformance_test_runner(
11392
src_dir: &Path,
11493
build_dir: &Path,
@@ -119,7 +98,9 @@ fn install_protoc_and_conformance_test_runner(
11998
let build_conformance = !cfg!(windows);
12099

121100
// Build and install protoc, the protobuf libraries, and the conformance test runner.
122-
cmake::Config::new(src_dir.join("cmake"))
101+
cmake::Config::new(src_dir)
102+
.define("CMAKE_CXX_STANDARD", "14")
103+
.define("ABSL_PROPAGATE_CXX_STD", "ON")
123104
.define("CMAKE_INSTALL_PREFIX", prefix_dir)
124105
.define(
125106
"protobuf_BUILD_CONFORMANCE",

protobuf/src/fix-conformance_test_runner-cmake-build.patch

Lines changed: 0 additions & 41 deletions
This file was deleted.

third_party/protobuf

Submodule protobuf updated 3499 files

0 commit comments

Comments
 (0)