From 3498a61b0dbcf8887f4f76dcaff1034ef4c2d1f5 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Tue, 10 Sep 2024 14:28:14 -0700 Subject: [PATCH] Cargo.lock: update protobuf v3.2.0 -> v3.6.0 In particular, this includes a fix for the generated code to stop including the deprecated box_pointers lint, which prevents clippy from working in Rust 1.81+. Updated with: $ cargo update -p protobuf -p protobuf-codegen -p protobuf-parse Additionally, pull in updated versions of the ChromeOS system_api protos since they need to be built with the same protobuf-codegen version. BUG=b:365852007 Change-Id: I9ba955b48d460a372b6ddfb3555092c910fc4c45 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5957767 Commit-Queue: Daniel Verkamp Reviewed-by: Frederick Mayle Reviewed-by: Zihan Chen --- Cargo.lock | 50 ++++++++++++++++++------- system_api/src/protos/spaced.rs | 25 +++++++++---- system_api/src/protos/vtpm_interface.rs | 9 ++--- 3 files changed, 57 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4833941346..31d617a087 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -473,7 +473,7 @@ checksum = "a6358dedf60f4d9b8db43ad187391afe959746101346fe51bb978126bec61dfb" dependencies = [ "clap 3.2.23", "heck", - "indexmap", + "indexmap 1.9.1", "log", "proc-macro2", "quote 1.0.33", @@ -545,7 +545,7 @@ dependencies = [ "atty", "bitflags 1.3.2", "clap_lex 0.2.4", - "indexmap", + "indexmap 1.9.1", "strsim", "termcolor", "textwrap", @@ -710,7 +710,7 @@ name = "cros_fdt" version = "0.1.0" dependencies = [ "anyhow", - "indexmap", + "indexmap 1.9.1", "remain", "thiserror", ] @@ -1150,6 +1150,12 @@ dependencies = [ "log", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.2.8" @@ -1467,6 +1473,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "heck" version = "0.4.0" @@ -1544,7 +1556,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.0", ] [[package]] @@ -2320,9 +2342,9 @@ dependencies = [ [[package]] name = "protobuf" -version = "3.2.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55bad9126f378a853655831eb7363b7b01b81d19f8cb1218861086ca4a1a61e" +checksum = "3018844a02746180074f621e847703737d27d89d7f0721a7a4da317f88b16385" dependencies = [ "once_cell", "protobuf-support", @@ -2331,9 +2353,9 @@ dependencies = [ [[package]] name = "protobuf-codegen" -version = "3.2.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd418ac3c91caa4032d37cb80ff0d44e2ebe637b2fb243b6234bf89cdac4901" +checksum = "411c15a212b4de05eb8bc989fd066a74c86bd3c04e27d6e86bd7703b806d7734" dependencies = [ "anyhow", "once_cell", @@ -2346,12 +2368,12 @@ dependencies = [ [[package]] name = "protobuf-parse" -version = "3.2.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d39b14605eaa1f6a340aec7f320b34064feb26c93aec35d6a9a2272a8ddfa49" +checksum = "06f45f16b522d92336e839b5e40680095a045e36a1e7f742ba682ddc85236772" dependencies = [ "anyhow", - "indexmap", + "indexmap 2.6.0", "log", "protobuf", "protobuf-support", @@ -2362,9 +2384,9 @@ dependencies = [ [[package]] name = "protobuf-support" -version = "3.2.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d4d7b8601c814cfb36bcebb79f0e61e45e1e93640cf778837833bbed05c372" +checksum = "faf96d872914fcda2b66d66ea3fff2be7c66865d31c7bb2790cff32c0e714880" dependencies = [ "thiserror", ] @@ -3184,7 +3206,7 @@ dependencies = [ "crossbeam-queue", "half", "heck", - "indexmap", + "indexmap 1.9.1", "lazy_static", "libloading", "objc", diff --git a/system_api/src/protos/spaced.rs b/system_api/src/protos/spaced.rs index f567df0b39..b19aeb7147 100644 --- a/system_api/src/protos/spaced.rs +++ b/system_api/src/protos/spaced.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 3.2.0. Do not edit +// This file is generated by rust-protobuf 3.6.0. Do not edit // .proto file is parsed by protoc 3.21.12 // @generated @@ -9,7 +9,6 @@ #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] -#![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] @@ -24,10 +23,10 @@ /// Generated files are compatible only with the same version /// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_6_0; -#[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:spaced.SetProjectIdReply) +#[derive(PartialEq,Clone,Default,Debug)] pub struct SetProjectIdReply { // message fields // @@protoc_insertion_point(field:spaced.SetProjectIdReply.success) @@ -129,8 +128,8 @@ impl ::protobuf::Message for SetProjectIdReply { } } -#[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:spaced.SetProjectInheritanceFlagReply) +#[derive(PartialEq,Clone,Default,Debug)] pub struct SetProjectInheritanceFlagReply { // message fields // @@protoc_insertion_point(field:spaced.SetProjectInheritanceFlagReply.success) @@ -232,8 +231,8 @@ impl ::protobuf::Message for SetProjectInheritanceFlagReply { } } -#[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:spaced.StatefulDiskSpaceUpdate) +#[derive(PartialEq,Clone,Default,Debug)] pub struct StatefulDiskSpaceUpdate { // message fields // @@protoc_insertion_point(field:spaced.StatefulDiskSpaceUpdate.state) @@ -335,8 +334,8 @@ impl ::protobuf::Message for StatefulDiskSpaceUpdate { } } -#[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:spaced.GetQuotaCurrentSpacesForIdsRequest) +#[derive(PartialEq,Clone,Default,Debug)] pub struct GetQuotaCurrentSpacesForIdsRequest { // message fields // @@protoc_insertion_point(field:spaced.GetQuotaCurrentSpacesForIdsRequest.path) @@ -461,8 +460,8 @@ impl ::protobuf::Message for GetQuotaCurrentSpacesForIdsRequest { } } -#[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:spaced.GetQuotaCurrentSpacesForIdsReply) +#[derive(PartialEq,Clone,Default,Debug)] pub struct GetQuotaCurrentSpacesForIdsReply { // message fields // @@protoc_insertion_point(field:spaced.GetQuotaCurrentSpacesForIdsReply.curspaces_for_uids) @@ -665,6 +664,16 @@ impl ::protobuf::Enum for StatefulDiskSpaceState { } } + fn from_str(str: &str) -> ::std::option::Option { + match str { + "NONE" => ::std::option::Option::Some(StatefulDiskSpaceState::NONE), + "NORMAL" => ::std::option::Option::Some(StatefulDiskSpaceState::NORMAL), + "LOW" => ::std::option::Option::Some(StatefulDiskSpaceState::LOW), + "CRITICAL" => ::std::option::Option::Some(StatefulDiskSpaceState::CRITICAL), + _ => ::std::option::Option::None + } + } + const VALUES: &'static [StatefulDiskSpaceState] = &[ StatefulDiskSpaceState::NONE, StatefulDiskSpaceState::NORMAL, diff --git a/system_api/src/protos/vtpm_interface.rs b/system_api/src/protos/vtpm_interface.rs index 7aa8360a70..3c9c7963b9 100644 --- a/system_api/src/protos/vtpm_interface.rs +++ b/system_api/src/protos/vtpm_interface.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 3.2.0. Do not edit +// This file is generated by rust-protobuf 3.6.0. Do not edit // .proto file is parsed by protoc 3.21.12 // @generated @@ -9,7 +9,6 @@ #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] -#![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] @@ -24,10 +23,10 @@ /// Generated files are compatible only with the same version /// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_6_0; -#[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:vtpm.SendCommandRequest) +#[derive(PartialEq,Clone,Default,Debug)] pub struct SendCommandRequest { // message fields // @@protoc_insertion_point(field:vtpm.SendCommandRequest.command) @@ -152,8 +151,8 @@ impl ::protobuf::Message for SendCommandRequest { } } -#[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:vtpm.SendCommandResponse) +#[derive(PartialEq,Clone,Default,Debug)] pub struct SendCommandResponse { // message fields // @@protoc_insertion_point(field:vtpm.SendCommandResponse.response)