8000 Cherry-pick Rust fix to 31.x (#21617) · protocolbuffers/protobuf@01b42bb · GitHub
[go: up one dir, main page]

Skip to content

Commit 01b42bb

Browse files
Cherry-pick Rust fix to 31.x (#21617)
* Upgrade minimum supported Rust version to 1.79.0 This should make it easier to fix #21590, since Rust 1.79 introduces `std::path::absolute`. PiperOrigin-RevId: 755529603 * Fix Windows path handling in build script (#21606) PR for patch mentioned in #21590 Closes #21606 COPYBARA_INTEGRATE_REVIEW=#21606 from windows-fryer:main 5cf3804 PiperOrigin-RevId: 755541111 --------- Co-authored-by: liga <githubwindowsfryer.tacking693@passmail.net>
1 parent ac2bbec commit 01b42bb

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

.github/workflows/test_rust.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
# Override cases with custom images
3232
- config: { name: Cargo }
33-
image: "us-docker.pkg.dev/protobuf-build/containers/release/linux/rust:8.0.1-1.74.0-b77fdae6d4771789dfc66a56bf8d806354e8011a"
33+
image: "us-docker.pkg.dev/protobuf-build/containers/release/linux/rust:8.0.1-1.79.0-d271543f317955b5732ce19b2be672a195e96508"
3434
bazel_cmd: "run"
3535
targets: "//rust/release_crates:cargo_test"
3636

rust/release_crates/protobuf/Cargo-template.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ version = "{VERSION}"
1111
edition = "2021" # The Rust edition (not to be confused with Protobuf Edition).
1212
links = "upb"
1313
license = "BSD-3-Clause"
14-
rust-version = "1.74"
14+
rust-version = "1.79"
1515
description = "Protocol Buffers - Google's data interchange format"
1616

1717
[lib]

rust/release_crates/protobuf/build.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ fn main() {
1919
.file("libupb/third_party/utf8_range/utf8_range.c")
2020
.define("UPB_BUILD_API", Some("1"))
2121
.compile("libupb");
22-
let path = std::path::Path::new("libupb");
23-
println!("cargo:include={}", path.canonicalize().unwrap().display());
22+
23+
let path = std::path::absolute("libupb").expect("Failed to get full path to libupb");
24+
25+
println!("cargo:include={}", path.display());
2426
println!("cargo:version={}", VERSION);
2527
}

rust/release_crates/protobuf_codegen/Cargo-template.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ readme = "README.md"
55
version = "{VERSION}"
66
description = "Code generator for Rust Protocol Buffers bindings"
77
license = "BSD-3-Clause"
8-
rust-version = "1.74"
8+
rust-version = "1.79"
99

1010

1111
[dependencies]

rust/release_crates/protobuf_macros/Cargo-template.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name = "protobuf-macros"
1010
version = "{VERSION}"
1111
edition = "2021" # The Rust edition (not to be confused with Protobuf Edition).
1212
license = "BSD-3-Clause"
13-
rust-version = "1.74"
13+
rust-version = "1.79"
1414
description = "Protobuf proc macro implementation (internal)"
1515

1616
[lib]

0 commit comments

Comments
 (0)
0