From e372455883fa204b9eca65cc71bcc5f05ff55667 Mon Sep 17 00:00:00 2001 From: Jens Reimann Date: Mon, 23 Sep 2024 11:24:55 +0200 Subject: [PATCH] fix: declare uuid dependency and v5 feature In Rust, features are additive. So when compiling the whole workspace, v5 gets enabled. However, when just compiling `migration`, then the `uuid` crate will use used without any `v*` features, as declared by the seaorm cargo file. Closes #839 --- Cargo.lock | 1 + migration/Cargo.toml | 6 ++++-- migration/src/m0000543_create_license.rs | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e69ebcbf..c96acb8d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7549,6 +7549,7 @@ dependencies = [ "trustify-cvss", "trustify-entity", "trustify-test-context", + "uuid", ] [[package]] diff --git a/migration/Cargo.toml b/migration/Cargo.toml index 935476f6..01dcd350 100644 --- a/migration/Cargo.toml +++ b/migration/Cargo.toml @@ -11,15 +11,17 @@ path = "src/lib.rs" [dependencies] sea-orm-migration = { workspace = true, features = ["runtime-tokio-rustls", "sqlx-postgres", "with-uuid"] } +serde_json = { workspace = true } tokio = { workspace = true, features = ["full"] } trustify-cvss = { workspace = true } -serde_json = { workspace = true } +uuid = { workspace = true, features = ["v5"] } [dev-dependencies] trustify-common = { workspace = true } trustify-entity = { workspace = true } trustify-test-context = { workspace = true } + +anyhow = { workspace = true } test-context = { workspace = true } test-log = { workspace = true, features = ["log", "trace"] } tokio-util = { workspace = true } -anyhow = { workspace = true } diff --git a/migration/src/m0000543_create_license.rs b/migration/src/m0000543_create_license.rs index 6a4a6612..f7ce450e 100644 --- a/migration/src/m0000543_create_license.rs +++ b/migration/src/m0000543_create_license.rs @@ -1,5 +1,5 @@ -use crate::sea_orm::prelude::Uuid; use sea_orm_migration::prelude::*; +use uuid::Uuid; const NAMESPACE: Uuid = Uuid::from_bytes([ 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0x41, 0x18, 0xa1, 0x38, 0xb8, 0x9f, 0x19, 0x35, 0xe0, 0xa7,