diff --git a/Cargo.lock b/Cargo.lock index fcb6888734..ca87066d15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1412,7 +1412,6 @@ dependencies = [ "chrono", "derive_more", "diffus", - "diffus-derive 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "expectorate", "itertools 0.13.0", "omicron-common", @@ -2371,7 +2370,7 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" name = "diffus" version = "0.10.0" dependencies = [ - "diffus-derive 0.10.0", + "diffus-derive", "itertools 0.10.5", "uuid", ] @@ -2385,17 +2384,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "diffus-derive" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b93a2d033d9e1887e8ea6e13a03b9fcf20e66b4891cd0dfb98ef280cff7afaa8" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "digest" version = "0.10.7" @@ -6094,6 +6082,7 @@ dependencies = [ "chrono", "clickhouse-admin-types", "debug-ignore", + "diffus", "expectorate", "gateway-client", "illumos-utils", @@ -6299,7 +6288,6 @@ dependencies = [ "derive-where", "derive_more", "diffus", - "diffus-derive 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "dropshot 0.13.0", "futures", "gateway-client", @@ -6725,7 +6713,6 @@ dependencies = [ "camino-tempfile", "chrono", "diffus", - "diffus-derive 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "dropshot 0.13.0", "expectorate", "futures", @@ -7377,7 +7364,6 @@ name = "omicron-uuid-kinds" version = "0.1.0" dependencies = [ "diffus", - "diffus-derive 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "newtype-uuid", "paste", "schemars", diff --git a/Cargo.toml b/Cargo.toml index a26d1ed335..d15926cb6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -366,7 +366,6 @@ diesel = { version = "2.2.4", features = ["i-implement-a-third-party-backend-and diesel-dtrace = "0.4.2" #diffus = { version = "0.10.0", features = ["uuid-impl", "derive"] } diffus = { path = "../diffus/diffus", features = ["uuid-impl", "derive"] } -diffus-derive = "0.10.0" dns-server = { path = "dns-server" } dns-server-api = { path = "dns-server-api" } dns-service-client = { path = "clients/dns-service-client" } diff --git a/clickhouse-admin/types/Cargo.toml b/clickhouse-admin/types/Cargo.toml index 1e42de0800..c8ee984abe 100644 --- a/clickhouse-admin/types/Cargo.toml +++ b/clickhouse-admin/types/Cargo.toml @@ -15,7 +15,6 @@ camino-tempfile.workspace = true chrono.workspace = true derive_more.workspace = true diffus.workspace = true -diffus-derive.workspace = true itertools.workspace = true omicron-common.workspace = true omicron-workspace-hack.workspace = true diff --git a/clickhouse-admin/types/src/lib.rs b/clickhouse-admin/types/src/lib.rs index a5d58ccd0a..726f4ad6e4 100644 --- a/clickhouse-admin/types/src/lib.rs +++ b/clickhouse-admin/types/src/lib.rs @@ -7,7 +7,7 @@ use atomicwrites::AtomicFile; use camino::Utf8PathBuf; use chrono::{DateTime, Utc}; use derive_more::{Add, AddAssign, Display, From}; -use diffus_derive::Diffus; +use diffus::Diffus; use itertools::Itertools; use omicron_common::api::external::Generation; use schemars::{ diff --git a/common/Cargo.toml b/common/Cargo.toml index ffd8f073b6..f2797ed2b4 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -21,7 +21,6 @@ backoff.workspace = true camino.workspace = true chrono.workspace = true diffus.workspace = true -diffus-derive.workspace = true dropshot.workspace = true futures.workspace = true hex.workspace = true diff --git a/common/src/disk.rs b/common/src/disk.rs index f7f1e260a2..df6efe3196 100644 --- a/common/src/disk.rs +++ b/common/src/disk.rs @@ -6,7 +6,7 @@ use anyhow::bail; use camino::{Utf8Path, Utf8PathBuf}; -use diffus_derive::Diffus; +use diffus::Diffus; use omicron_uuid_kinds::DatasetUuid; use omicron_uuid_kinds::PhysicalDiskUuid; use omicron_uuid_kinds::ZpoolUuid; diff --git a/common/src/zpool_name.rs b/common/src/zpool_name.rs index 3dc5664769..9852b46120 100644 --- a/common/src/zpool_name.rs +++ b/common/src/zpool_name.rs @@ -5,7 +5,7 @@ //! Zpool labels and kinds shared between Nexus and Sled Agents use camino::{Utf8Path, Utf8PathBuf}; -use diffus_derive::Diffus; +use diffus::Diffus; use omicron_uuid_kinds::ZpoolUuid; use schemars::JsonSchema; use serde::{Deserialize, Deserializer, Serialize, Serializer}; diff --git a/nexus/reconfigurator/planning/Cargo.toml b/nexus/reconfigurator/planning/Cargo.toml index efed173a71..63c5e3e44f 100644 --- a/nexus/reconfigurator/planning/Cargo.toml +++ b/nexus/reconfigurator/planning/Cargo.toml @@ -11,6 +11,7 @@ anyhow.workspace = true clickhouse-admin-types.workspace = true chrono.workspace = true debug-ignore.workspace = true +diffus.workspace = true gateway-client.workspace = true illumos-utils.workspace = true indexmap.workspace = true diff --git a/nexus/reconfigurator/planning/src/planner.rs b/nexus/reconfigurator/planning/src/planner.rs index a18bb6e3d3..47ccc6f74c 100644 --- a/nexus/reconfigurator/planning/src/planner.rs +++ b/nexus/reconfigurator/planning/src/planner.rs @@ -797,6 +797,7 @@ mod test { use chrono::Utc; use clickhouse_admin_types::ClickhouseKeeperClusterMembership; use clickhouse_admin_types::KeeperId; + use diffus::Diffable; use expectorate::assert_contents; use nexus_sled_agent_shared::inventory::ZoneKind; use nexus_types::deployment::blueprint_zone_type; @@ -909,6 +910,12 @@ mod test { "2 -> 3 (expect new NTP zone on new sled):\n{}", diff.display() ); + let diffus_diff = blueprint3.diff(&blueprint2); + println!("_______DIFFUS __________\n"); + let change = diffus_diff.change(); + println!("{:#?}", diffus_diff); + println!("{:#?}", change); + println!("________DIFFUS __________\n"); assert_contents( "tests/output/planner_basic_add_sled_2_3.txt", &diff.display().to_string(), diff --git a/nexus/types/Cargo.toml b/nexus/types/Cargo.toml index f44fe3e258..edf22679ef 100644 --- a/nexus/types/Cargo.toml +++ b/nexus/types/Cargo.toml @@ -18,7 +18,6 @@ cookie.workspace = true derive-where.workspace = true derive_more.workspace = true diffus.workspace = true -diffus-derive.workspace = true dropshot.workspace = true futures.workspace = true http.workspace = true diff --git a/nexus/types/src/deployment/clickhouse.rs b/nexus/types/src/deployment/clickhouse.rs index f91d0f2d42..f8443c6afe 100644 --- a/nexus/types/src/deployment/clickhouse.rs +++ b/nexus/types/src/deployment/clickhouse.rs @@ -5,7 +5,7 @@ //! Types used in blueprints related to clickhouse configuration use clickhouse_admin_types::{KeeperId, ServerId}; -use diffus_derive::Diffus; +use diffus::Diffus; use omicron_common::api::external::Generation; use omicron_uuid_kinds::OmicronZoneUuid; use schemars::JsonSchema; diff --git a/nexus/types/src/deployment/planning_input.rs b/nexus/types/src/deployment/planning_input.rs index 59b762810a..1876440d47 100644 --- a/nexus/types/src/deployment/planning_input.rs +++ b/nexus/types/src/deployment/planning_input.rs @@ -17,7 +17,7 @@ use crate::external_api::views::SledState; use chrono::DateTime; use chrono::Utc; use clap::ValueEnum; -use diffus_derive::Diffus; +use diffus::Diffus; use ipnetwork::IpNetwork; use omicron_common::address::IpRange; use omicron_common::address::Ipv6Subnet; diff --git a/nexus/types/src/deployment/zone_type.rs b/nexus/types/src/deployment/zone_type.rs index d0c25386fc..bb5225986c 100644 --- a/nexus/types/src/deployment/zone_type.rs +++ b/nexus/types/src/deployment/zone_type.rs @@ -9,7 +9,7 @@ //! that is not needed by sled-agent. use super::OmicronZoneExternalIp; -use diffus_derive::Diffus; +use diffus::Diffus; use nexus_sled_agent_shared::inventory::OmicronZoneDataset; use nexus_sled_agent_shared::inventory::OmicronZoneType; use nexus_sled_agent_shared::inventory::ZoneKind; @@ -328,7 +328,7 @@ pub mod blueprint_zone_type { use crate::deployment::OmicronZoneExternalFloatingAddr; use crate::deployment::OmicronZoneExternalFloatingIp; use crate::deployment::OmicronZoneExternalSnatIp; - use diffus_derive::Diffus; + use diffus::Diffus; use nexus_sled_agent_shared::inventory::OmicronZoneDataset; use omicron_common::api::internal::shared::NetworkInterface; use schemars::JsonSchema; diff --git a/nexus/types/src/external_api/views.rs b/nexus/types/src/external_api/views.rs index 06d836d911..94b2279906 100644 --- a/nexus/types/src/external_api/views.rs +++ b/nexus/types/src/external_api/views.rs @@ -11,7 +11,7 @@ use crate::identity::AssetIdentityMetadata; use api_identity::ObjectIdentity; use chrono::DateTime; use chrono::Utc; -use diffus_derive::Diffus; +use diffus::Diffus; use omicron_common::api::external::{ AllowedSourceIps as ExternalAllowedSourceIps, ByteCount, Digest, Error, IdentityMetadata, InstanceState, Name, ObjectIdentity, RoleName, diff --git a/uuid-kinds/Cargo.toml b/uuid-kinds/Cargo.toml index 3100319c3b..61bea773aa 100644 --- a/uuid-kinds/Cargo.toml +++ b/uuid-kinds/Cargo.toml @@ -13,7 +13,6 @@ workspace = true [dependencies] diffus.workspace = true -diffus-derive.workspace = true newtype-uuid.workspace = true schemars = { workspace = true, optional = true } paste.workspace = true diff --git a/uuid-kinds/src/lib.rs b/uuid-kinds/src/lib.rs index a13fbfaf6a..e25e4e9bbb 100644 --- a/uuid-kinds/src/lib.rs +++ b/uuid-kinds/src/lib.rs @@ -15,7 +15,7 @@ pub use newtype_uuid::{ }; #[cfg(feature = "diffus")] -use diffus_derive::Diffus; +use diffus::Diffus; #[cfg(feature = "schemars08")] use schemars::JsonSchema;