From 3fbc1703f107dfb2c5a75e848805dcf60d449eb1 Mon Sep 17 00:00:00 2001 From: Hankung <73242257+Hankung7183@users.noreply.github.com> Date: Tue, 7 May 2024 04:22:35 +0700 Subject: [PATCH] fix: schemars 0.8.18 compatibility (#9676) * fix: schemars 0.8.18 compatibility * fix cli cargo issue * update tauri-utils v1 --------- Co-authored-by: FabianLars --- .changes/fix-schemars-compatibility.md | 5 +++++ Cargo.lock | 18 +++++++++--------- core/tauri-build/Cargo.toml | 2 +- core/tauri-config-schema/Cargo.toml | 2 +- core/tauri-plugin/Cargo.toml | 2 +- core/tauri-utils/Cargo.toml | 2 +- core/tauri-utils/src/config.rs | 14 ++++---------- tooling/cli/Cargo.lock | 24 ++++++++++++------------ 8 files changed, 34 insertions(+), 35 deletions(-) create mode 100644 .changes/fix-schemars-compatibility.md diff --git a/.changes/fix-schemars-compatibility.md b/.changes/fix-schemars-compatibility.md new file mode 100644 index 000000000..37576c896 --- /dev/null +++ b/.changes/fix-schemars-compatibility.md @@ -0,0 +1,5 @@ +--- +tauri-utils: "patch:bug" +--- + +Fixes `schemars` compilation issue. \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 20f19ab45..726053e23 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1765,7 +1765,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.5", ] [[package]] @@ -2989,9 +2989,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" +checksum = "fc6e7ed6919cb46507fb01ff1654309219f62b4d603822501b0b80d42f6f21ef" dependencies = [ "dyn-clone", "indexmap 1.9.3", @@ -3003,14 +3003,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" +checksum = "185f2b7aa7e02d418e453790dde16890256bbd2bcd04b7dc5348811052b53f49" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 1.0.109", + "syn 2.0.57", ] [[package]] @@ -3099,13 +3099,13 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.26.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.57", ] [[package]] diff --git a/core/tauri-build/Cargo.toml b/core/tauri-build/Cargo.toml index 36979373a..cb47e364b 100644 --- a/core/tauri-build/Cargo.toml +++ b/core/tauri-build/Cargo.toml @@ -41,7 +41,7 @@ semver = "1" dirs-next = "2" glob = "0.3" toml = "0.8" -schemars = { version = "0.8", features = [ "preserve_order" ] } +schemars = { version = "0.8.18", features = [ "preserve_order" ] } [features] default = [ "config-json" ] diff --git a/core/tauri-config-schema/Cargo.toml b/core/tauri-config-schema/Cargo.toml index 40903b753..3842a7d9c 100644 --- a/core/tauri-config-schema/Cargo.toml +++ b/core/tauri-config-schema/Cargo.toml @@ -6,7 +6,7 @@ publish = false [build-dependencies] tauri-utils = { features = [ "schema" ], path = "../tauri-utils" } -schemars = { version = "0.8", features = ["url", "preserve_order"] } +schemars = { version = "0.8.18", features = ["url", "preserve_order"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" url = { version = "2.3", features = ["serde"] } diff --git a/core/tauri-plugin/Cargo.toml b/core/tauri-plugin/Cargo.toml index b5910b7cd..275d5d3ac 100644 --- a/core/tauri-plugin/Cargo.toml +++ b/core/tauri-plugin/Cargo.toml @@ -34,7 +34,7 @@ tauri-utils = { version = "2.0.0-beta.13", default-features = false, features = serde_json = { version = "1", optional = true } glob = { version = "0.3", optional = true } toml = { version = "0.8", optional = true } -schemars = { version = "0.8", features = [ "preserve_order" ] } +schemars = { version = "0.8.18", features = [ "preserve_order" ] } walkdir = { version = "2", optional = true } [target."cfg(target_os = \"macos\")".dependencies] diff --git a/core/tauri-utils/Cargo.toml b/core/tauri-utils/Cargo.toml index ac21bc95f..cfe65463b 100644 --- a/core/tauri-utils/Cargo.toml +++ b/core/tauri-utils/Cargo.toml @@ -23,7 +23,7 @@ html5ever = "0.26" kuchiki = { package = "kuchikiki", version = "0.8" } proc-macro2 = { version = "1", optional = true } quote = { version = "1", optional = true } -schemars = { version = "0.8", features = [ "url" ], optional = true } +schemars = { version = "0.8.18", features = [ "url" ], optional = true } serde_with = "3" aes-gcm = { version = "0.10", optional = true } getrandom = { version = "0.2", optional = true, features = [ "std" ] } diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 5951b30f3..7d60cf0d8 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -213,19 +213,13 @@ impl schemars::JsonSchema for BundleTarget { ..Default::default() } .into(), - schemars::_private::apply_metadata( + schemars::_private::metadata::add_description( gen.subschema_for::>(), - schemars::schema::Metadata { - description: Some("A list of bundle targets.".to_owned()), - ..Default::default() - }, + "A list of bundle targets.", ), - schemars::_private::apply_metadata( + schemars::_private::metadata::add_description( gen.subschema_for::(), - schemars::schema::Metadata { - description: Some("A single bundle target.".to_owned()), - ..Default::default() - }, + "A single bundle target.", ), ]; diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index c732623e9..85948671d 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -4165,9 +4165,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" +checksum = "fc6e7ed6919cb46507fb01ff1654309219f62b4d603822501b0b80d42f6f21ef" dependencies = [ "dyn-clone", "schemars_derive", @@ -4178,14 +4178,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" +checksum = "185f2b7aa7e02d418e453790dde16890256bbd2bcd04b7dc5348811052b53f49" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 1.0.109", + "syn 2.0.52", ] [[package]] @@ -4300,13 +4300,13 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.26.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.52", ] [[package]] @@ -4945,7 +4945,7 @@ dependencies = [ "sublime_fuzzy", "tauri-bundler", "tauri-icns", - "tauri-utils 1.5.3", + "tauri-utils 1.5.4", "tauri-utils 2.0.0-beta.13", "thiserror", "tokio", @@ -4981,15 +4981,15 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ad0bbb31fccd1f4c56275d0a5c3abdf1f59999f72cb4ef8b79b4ed42082a21" +checksum = "450b17a7102e5d46d4bdabae0d1590fd27953e704e691fc081f06c06d2253b35" dependencies = [ "aes-gcm", "ctor", "dunce", "getrandom 0.2.12", - "heck 0.4.1", + "heck 0.5.0", "html5ever", "infer 0.13.0", "json-patch",