From 92665a611fd52cd35bce256d162d4a6bef7aa566 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Tue, 7 May 2024 12:34:48 -0700 Subject: [PATCH] Cargo.toml: move tempfile to dev-dependencies The tempfile crate is only used in tests, so it does not need to be in the main [dependencies] section of any of our first-party crates. Also fix a couple of [dev_dependencies] instances to the officially documented [dev-dependencies] name for consistency. BUG=None TEST=cargo tree Change-Id: I1dcb6be10c302baec4e8ebe6f72480f76e4e3760 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5521511 Reviewed-by: Dennis Kempin Commit-Queue: Daniel Verkamp --- Cargo.toml | 2 +- acpi_tables/Cargo.toml | 4 +++- base/Cargo.toml | 2 +- disk/Cargo.toml | 4 +++- swap/Cargo.toml | 2 +- third_party/vmm_vhost/Cargo.toml | 4 +++- vendor/generic/crypto/Cargo.toml | 4 +++- vm_memory/Cargo.toml | 2 +- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7113a731f4..4a1838e81d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -463,7 +463,6 @@ smallvec = "1.6.1" static_assertions = "1.1" swap = { path = "swap" } sync = { path = "common/sync" } -tempfile = "3" thiserror = { version = "1.0.20" } vm_control = { path = "vm_control" } acpi_tables = { path = "acpi_tables" } @@ -502,6 +501,7 @@ win_util = { path = "win_util" } [dev-dependencies] base = "*" rand = "0.8" +tempfile = "3" [patch.crates-io] audio_streams = { path = "common/audio_streams" } diff --git a/acpi_tables/Cargo.toml b/acpi_tables/Cargo.toml index 04ea9af4d1..1aac94f167 100644 --- a/acpi_tables/Cargo.toml +++ b/acpi_tables/Cargo.toml @@ -5,5 +5,7 @@ authors = ["The ChromiumOS Authors"] edition = "2021" [dependencies] -tempfile = "3" zerocopy = { version = "0.7", features = ["derive"] } + +[dev-dependencies] +tempfile = "3" diff --git a/base/Cargo.toml b/base/Cargo.toml index cdaaf10c0c..1f4910e464 100644 --- a/base/Cargo.toml +++ b/base/Cargo.toml @@ -31,7 +31,6 @@ remain = "0.2" serde = { version = "1", features = [ "derive" ] } serde_json = "*" smallvec = "1.6.1" -tempfile = "3" thiserror = "1.0.20" uuid = { version = "1", features = ["v4"] } zerocopy = { version = "0.7", features = ["derive"] } @@ -39,6 +38,7 @@ zerocopy = { version = "0.7", features = ["derive"] } [dev-dependencies] libtest-mimic = "0.6" protos = { path = "../protos", features = ["composite-disk"] } +tempfile = "3" [target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies] minijail = "*" diff --git a/disk/Cargo.toml b/disk/Cargo.toml index 28fc13dbf6..be1797378d 100644 --- a/disk/Cargo.toml +++ b/disk/Cargo.toml @@ -26,7 +26,6 @@ remain = "*" serde = { version = "1", features = [ "derive" ] } sync = { path = "../common/sync" } thiserror = "*" -tempfile = "3" uuid = { version = "1", features = ["v4"], optional = true } vm_memory = { path = "../vm_memory" } zerocopy = { version = "0.7", features = ["derive"] } @@ -34,3 +33,6 @@ zerocopy = { version = "0.7", features = ["derive"] } [dependencies.futures] version = "*" default-features = false + +[dev-dependencies] +tempfile = "3" diff --git a/swap/Cargo.toml b/swap/Cargo.toml index 86d7e55876..48c44d99fc 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -39,6 +39,6 @@ libc = "*" userfaultfd = { version = "0.8.1", optional = true } userfaultfd-sys = { version = "0.5.0", optional = true } -[dev_dependencies] +[dev-dependencies] libtest-mimic = "0.6" tempfile = "*" diff --git a/third_party/vmm_vhost/Cargo.toml b/third_party/vmm_vhost/Cargo.toml index 18ff132ced..cbcc20b88e 100644 --- a/third_party/vmm_vhost/Cargo.toml +++ b/third_party/vmm_vhost/Cargo.toml @@ -21,7 +21,6 @@ cfg-if = "1.0.0" enumn = "0.1.0" libc = ">=0.2.39" remain = "*" -tempfile = "*" thiserror = { version = "1.0.20" } zerocopy = { version = "0.7", features = ["derive"] } @@ -29,3 +28,6 @@ zerocopy = { version = "0.7", features = ["derive"] } serde = { version = "1", features = [ "derive" ] } serde_json = "*" tube_transporter = { path = "../../tube_transporter" } + +[dev-dependencies] +tempfile = "*" diff --git a/vendor/generic/crypto/Cargo.toml b/vendor/generic/crypto/Cargo.toml index db728c1cdf..1453b3875c 100644 --- a/vendor/generic/crypto/Cargo.toml +++ b/vendor/generic/crypto/Cargo.toml @@ -12,5 +12,7 @@ anyhow = "1.0.32" base = { path = "../../../base" } serde = { version = "1", features = ["derive"] } serde_json = "*" -tempfile = "3" zeroize = "1.5.7" + +[dev-dependencies] +tempfile = "3" diff --git a/vm_memory/Cargo.toml b/vm_memory/Cargo.toml index c825232d66..f1738a5eaa 100644 --- a/vm_memory/Cargo.toml +++ b/vm_memory/Cargo.toml @@ -20,5 +20,5 @@ serde_json = "*" thiserror = "*" zerocopy = { version = "0.7", features = ["derive"] } -[dev_dependencies] +[dev-dependencies] tempfile = "3"