diff --git a/.cargo/config b/.cargo/config.toml similarity index 100% rename from .cargo/config rename to .cargo/config.toml diff --git a/.changes/schemars-comp.md b/.changes/schemars-comp.md new file mode 100644 index 000000000..6abcf7225 --- /dev/null +++ b/.changes/schemars-comp.md @@ -0,0 +1,5 @@ +--- +tauri-utils: "patch:bug" +--- + +Fixes `schemars` compilation issue. diff --git a/Cargo.lock b/Cargo.lock index a564b98a5..17fbef245 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3462,9 +3462,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", @@ -3476,14 +3476,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.60", ] [[package]] @@ -3572,13 +3572,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.60", ] [[package]] diff --git a/core/tauri-config-schema/Cargo.toml b/core/tauri-config-schema/Cargo.toml index 8cb62fb38..350f158b6 100644 --- a/core/tauri-config-schema/Cargo.toml +++ b/core/tauri-config-schema/Cargo.toml @@ -8,7 +8,7 @@ publish = false tauri-utils = { version = "1.0.0", 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-config-schema/schema.json b/core/tauri-config-schema/schema.json index ef718f93b..3ad96747e 100644 --- a/core/tauri-config-schema/schema.json +++ b/core/tauri-config-schema/schema.json @@ -226,7 +226,6 @@ }, "version": { "description": "App version. It is a semver version number or a path to a `package.json` file containing the `version` field. If removed the version number from `Cargo.toml` is used.", - "default": null, "type": [ "string", "null" diff --git a/core/tauri-utils/Cargo.toml b/core/tauri-utils/Cargo.toml index ae428d513..32f7a8d82 100644 --- a/core/tauri-utils/Cargo.toml +++ b/core/tauri-utils/Cargo.toml @@ -22,7 +22,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 c9485884d..cb60dc304 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -166,19 +166,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/core/tauri/src/async_runtime.rs b/core/tauri/src/async_runtime.rs index 01c7083be..17a554be2 100644 --- a/core/tauri/src/async_runtime.rs +++ b/core/tauri/src/async_runtime.rs @@ -42,7 +42,7 @@ impl GlobalRuntime { } } - fn spawn(&self, task: F) -> JoinHandle + fn spawn(&self, task: F) -> JoinHandle where F: Future + Send + 'static, F::Output: Send + 'static, @@ -96,7 +96,7 @@ impl Runtime { } /// Spawns a future onto the runtime. - pub fn spawn(&self, task: F) -> JoinHandle + pub fn spawn(&self, task: F) -> JoinHandle where F: Future + Send + 'static, F::Output: Send + 'static, @@ -189,7 +189,7 @@ impl RuntimeHandle { } /// Spawns a future onto the runtime. - pub fn spawn(&self, task: F) -> JoinHandle + pub fn spawn(&self, task: F) -> JoinHandle where F: Future + Send + 'static, F::Output: Send + 'static, diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index ea42b9969..18f522e23 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -2812,9 +2812,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", @@ -2825,14 +2825,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]] @@ -2943,13 +2943,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]] diff --git a/tooling/cli/Cargo.toml b/tooling/cli/Cargo.toml index 02f311829..eb4ea1d09 100644 --- a/tooling/cli/Cargo.toml +++ b/tooling/cli/Cargo.toml @@ -6,7 +6,7 @@ name = "tauri-cli" version = "1.5.12" authors = [ "Tauri Programme within The Commons Conservancy" ] edition = "2021" -rust-version = "1.60" +rust-version = "1.70" categories = [ "gui", "web-programming" ] license = "Apache-2.0 OR MIT" homepage = "https://tauri.app" diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index ef718f93b..3ad96747e 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -226,7 +226,6 @@ }, "version": { "description": "App version. It is a semver version number or a path to a `package.json` file containing the `version` field. If removed the version number from `Cargo.toml` is used.", - "default": null, "type": [ "string", "null" diff --git a/tooling/cli/src/build.rs b/tooling/cli/src/build.rs index d8fc8d162..dc9610060 100644 --- a/tooling/cli/src/build.rs +++ b/tooling/cli/src/build.rs @@ -160,7 +160,7 @@ pub fn command(mut options: Options, verbosity: u8) -> Result<()> { } if options.runner.is_none() { - options.runner = config_.build.runner.clone(); + options.runner.clone_from(&config_.build.runner); } options diff --git a/tooling/cli/src/dev.rs b/tooling/cli/src/dev.rs index 67a048e74..d63398d0d 100644 --- a/tooling/cli/src/dev.rs +++ b/tooling/cli/src/dev.rs @@ -192,14 +192,9 @@ fn command_internal(mut options: Options) -> Result<()> { } if options.runner.is_none() { - options.runner = config - .lock() - .unwrap() - .as_ref() - .unwrap() - .build + options .runner - .clone(); + .clone_from(&config.lock().unwrap().as_ref().unwrap().build.runner); } let mut cargo_features = config