From b115c42e7214dd797da6a9430785803fcdfb5a7e Mon Sep 17 00:00:00 2001 From: Jorge Prendes Date: Tue, 3 Dec 2024 19:21:06 +0000 Subject: [PATCH] bump strup (#41) Signed-off-by: Jorge Prendes --- Cargo.lock | 20 ++----------- src/hyperlight_common/Cargo.toml | 3 +- .../flatbuffer_wrappers/guest_log_level.rs | 2 +- src/hyperlight_host/Cargo.toml | 2 +- src/hyperlight_host/src/hypervisor/metrics.rs | 4 +-- src/hyperlight_host/src/sandbox/metrics.rs | 4 +-- .../rust_guests/callbackguest/Cargo.lock | 28 +++---------------- src/tests/rust_guests/simpleguest/Cargo.lock | 28 +++---------------- 8 files changed, 18 insertions(+), 73 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9c33ea2a..f793fdc8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1060,7 +1060,6 @@ dependencies = [ "hyperlight-testing", "log", "strum", - "strum_macros 0.26.4", "tracing", ] @@ -2497,24 +2496,11 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.25.0" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros 0.25.3", -] - -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn", + "strum_macros", ] [[package]] diff --git a/src/hyperlight_common/Cargo.toml b/src/hyperlight_common/Cargo.toml index 063372c4..bc5161f8 100644 --- a/src/hyperlight_common/Cargo.toml +++ b/src/hyperlight_common/Cargo.toml @@ -19,8 +19,7 @@ flatbuffers = { version = "24.3.25", default-features = false } anyhow = { version = "1.0.72", default-features = false } log = "0.4.20" tracing = { version = "0.1.41", optional = true } -strum = {version = "0.25", default-features = false, features = ["derive"]} -strum_macros = {version = "0.26", features =[]} +strum = {version = "0.26", default-features = false, features = ["derive"]} [features] default = ["tracing"] diff --git a/src/hyperlight_common/src/flatbuffer_wrappers/guest_log_level.rs b/src/hyperlight_common/src/flatbuffer_wrappers/guest_log_level.rs index 0add85f6..14fa02b9 100644 --- a/src/hyperlight_common/src/flatbuffer_wrappers/guest_log_level.rs +++ b/src/hyperlight_common/src/flatbuffer_wrappers/guest_log_level.rs @@ -16,7 +16,7 @@ limitations under the License. use anyhow::{bail, Error, Result}; use log::Level; -use strum_macros::EnumIter; +use strum::EnumIter; #[cfg(feature = "tracing")] use tracing::{instrument, Span}; diff --git a/src/hyperlight_host/Cargo.toml b/src/hyperlight_host/Cargo.toml index 4c675489..465b1162 100644 --- a/src/hyperlight_host/Cargo.toml +++ b/src/hyperlight_host/Cargo.toml @@ -44,7 +44,7 @@ crossbeam = "0.8.0" crossbeam-channel = "0.5.8" thiserror = "2.0.0" prometheus = "0.13.3" -strum = { version = "0.25", features = ["derive"] } +strum = { version = "0.26", features = ["derive"] } tempfile = { version = "3.10", optional = true } serde_yaml = "0.9" anyhow = "1.0" diff --git a/src/hyperlight_host/src/hypervisor/metrics.rs b/src/hyperlight_host/src/hypervisor/metrics.rs index 499f3516..a02d19ed 100644 --- a/src/hyperlight_host/src/hypervisor/metrics.rs +++ b/src/hyperlight_host/src/hypervisor/metrics.rs @@ -21,7 +21,7 @@ use std::collections::HashMap; use std::sync::Once; use once_cell::sync::OnceCell; -use strum::{EnumIter, EnumVariantNames, IntoStaticStr}; +use strum::{EnumIter, IntoStaticStr, VariantNames}; use tracing::{instrument, Span}; use crate::metrics::{ @@ -55,7 +55,7 @@ static HYPERVISOR_METRIC_DEFINITIONS: &[HyperlightMetricDefinition] = /// The enum is required to derive from EnumIter, EnumVariantNames, IntoStaticStr /// and strum(serialize_all = "snake_case") performs the name conversion from CamelCase to snake_case /// when the enum variant is serialized to a string -#[derive(Debug, EnumIter, EnumVariantNames, IntoStaticStr)] +#[derive(Debug, EnumIter, VariantNames, IntoStaticStr)] #[strum(serialize_all = "snake_case")] pub(super) enum HypervisorMetric { NumberOfCancelledGuestExecutions, diff --git a/src/hyperlight_host/src/sandbox/metrics.rs b/src/hyperlight_host/src/sandbox/metrics.rs index 840b003a..05ef9bae 100644 --- a/src/hyperlight_host/src/sandbox/metrics.rs +++ b/src/hyperlight_host/src/sandbox/metrics.rs @@ -21,7 +21,7 @@ use std::collections::HashMap; use std::sync::Once; use once_cell::sync::OnceCell; -use strum::{EnumIter, EnumVariantNames, IntoStaticStr}; +use strum::{EnumIter, IntoStaticStr, VariantNames}; use tracing::{instrument, Span}; use crate::metrics::{ @@ -87,7 +87,7 @@ static SANDBOX_METRIC_DEFINITIONS: &[HyperlightMetricDefinition] = &[ /// The enum is required to derive from EnumIter, EnumVariantNames, IntoStaticStr /// and strum(serialize_all = "snake_case") performs the name conversion from CamelCase to snake_case /// when the enum variant is serialized to a string -#[derive(Debug, EnumIter, EnumVariantNames, IntoStaticStr)] +#[derive(Debug, EnumIter, VariantNames, IntoStaticStr)] #[strum(serialize_all = "snake_case")] pub(crate) enum SandboxMetric { GuestErrorCount, diff --git a/src/tests/rust_guests/callbackguest/Cargo.lock b/src/tests/rust_guests/callbackguest/Cargo.lock index 97b27b27..ff2522cc 100644 --- a/src/tests/rust_guests/callbackguest/Cargo.lock +++ b/src/tests/rust_guests/callbackguest/Cargo.lock @@ -62,12 +62,6 @@ dependencies = [ "rustc_version", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -82,7 +76,6 @@ dependencies = [ "flatbuffers", "log", "strum", - "strum_macros 0.26.4", ] [[package]] @@ -227,24 +220,11 @@ dependencies = [ [[package]] name = "strum" -version = "0.25.0" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros 0.25.3", -] - -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn", + "strum_macros", ] [[package]] @@ -253,7 +233,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "rustversion", diff --git a/src/tests/rust_guests/simpleguest/Cargo.lock b/src/tests/rust_guests/simpleguest/Cargo.lock index 6ce9f3e8..f8df7b2a 100644 --- a/src/tests/rust_guests/simpleguest/Cargo.lock +++ b/src/tests/rust_guests/simpleguest/Cargo.lock @@ -54,12 +54,6 @@ dependencies = [ "rustc_version", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -74,7 +68,6 @@ dependencies = [ "flatbuffers", "log", "strum", - "strum_macros 0.26.4", ] [[package]] @@ -228,24 +221,11 @@ dependencies = [ [[package]] name = "strum" -version = "0.25.0" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros 0.25.3", -] - -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn", + "strum_macros", ] [[package]] @@ -254,7 +234,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "rustversion",