From 964282a267dc5bb262c46828a6824666eaa0e8ab Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Wed, 6 Sep 2023 13:43:17 -0300 Subject: [PATCH 1/2] fix(cli): migration tests (#7745) --- tooling/cli/src/interface/mod.rs | 2 +- tooling/cli/src/interface/rust.rs | 8 ++++---- tooling/cli/src/migrate/manifest.rs | 15 ++++++++++++++- tooling/cli/src/mobile/android/dev.rs | 2 +- tooling/cli/src/mobile/ios/dev.rs | 2 +- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/tooling/cli/src/interface/mod.rs b/tooling/cli/src/interface/mod.rs index c5805cbac0a8..3ab53af02867 100644 --- a/tooling/cli/src/interface/mod.rs +++ b/tooling/cli/src/interface/mod.rs @@ -95,7 +95,7 @@ pub trait Interface: Sized { options: Options, on_exit: F, ) -> crate::Result<()>; - fn mobile_dev crate::Result>>( + fn mobile_dev crate::Result>>( &mut self, options: MobileOptions, runner: R, diff --git a/tooling/cli/src/interface/rust.rs b/tooling/cli/src/interface/rust.rs index 239a2a48ed10..ed1e92fb1d69 100644 --- a/tooling/cli/src/interface/rust.rs +++ b/tooling/cli/src/interface/rust.rs @@ -197,7 +197,7 @@ impl Interface for Rust { } } - fn mobile_dev crate::Result>>( + fn mobile_dev crate::Result>>( &mut self, mut options: MobileOptions, runner: R, @@ -431,7 +431,7 @@ impl Rust { options: Options, run_args: Vec, on_exit: F, - ) -> crate::Result> { + ) -> crate::Result> { desktop::run_dev( options, run_args, @@ -441,10 +441,10 @@ impl Rust { self.product_name.clone(), on_exit, ) - .map(|c| Box::new(c) as Box) + .map(|c| Box::new(c) as Box) } - fn run_dev_watcher crate::Result>>( + fn run_dev_watcher crate::Result>>( &mut self, config: Option, run: Arc, diff --git a/tooling/cli/src/migrate/manifest.rs b/tooling/cli/src/migrate/manifest.rs index 22024f9898d9..54673d91766d 100644 --- a/tooling/cli/src/migrate/manifest.rs +++ b/tooling/cli/src/migrate/manifest.rs @@ -225,6 +225,7 @@ mod tests { .as_array() .expect("features must be an array") .clone(); + if toml.contains("reqwest-native-tls-vendored") { assert!( features @@ -233,10 +234,22 @@ mod tests { "reqwest-native-tls-vendored was not replaced with native-tls-vendored" ); } + + if toml.contains("system-tray") { + assert!( + features + .iter() + .any(|f| f.as_str().expect("feature must be a string") == "tray-icon"), + "system-tray was not replaced with tray-icon" + ); + } + for feature in features.iter() { let feature = feature.as_str().expect("feature must be a string"); assert!( - keep_features.contains(&feature) || feature == "native-tls-vendored", + keep_features.contains(&feature) + || feature == "native-tls-vendored" + || feature == "tray-icon", "feature {feature} should have been removed" ); } diff --git a/tooling/cli/src/mobile/android/dev.rs b/tooling/cli/src/mobile/android/dev.rs index 058d8da7e80a..5f739f067658 100644 --- a/tooling/cli/src/mobile/android/dev.rs +++ b/tooling/cli/src/mobile/android/dev.rs @@ -235,7 +235,7 @@ fn run_dev( crate::dev::wait_dev_process(c.clone(), move |status, reason| { crate::dev::on_app_exit(status, reason, exit_on_panic, no_watch) }); - Ok(Box::new(c) as Box) + Ok(Box::new(c) as Box) } Err(e) => { crate::dev::kill_before_dev_process(); diff --git a/tooling/cli/src/mobile/ios/dev.rs b/tooling/cli/src/mobile/ios/dev.rs index ec866cdc5d06..1e2b9ede52c5 100644 --- a/tooling/cli/src/mobile/ios/dev.rs +++ b/tooling/cli/src/mobile/ios/dev.rs @@ -221,7 +221,7 @@ fn run_dev( crate::dev::wait_dev_process(c.clone(), move |status, reason| { crate::dev::on_app_exit(status, reason, exit_on_panic, no_watch) }); - Ok(Box::new(c) as Box) + Ok(Box::new(c) as Box) } Err(e) => { crate::dev::kill_before_dev_process(); From b75a1210bed589187678861d7314ae6279bf7c87 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Wed, 6 Sep 2023 15:11:30 -0300 Subject: [PATCH 2/2] fix(cli): update tauri-mobile to fix iOS logs not showing (#7762) --- .changes/fix-ios-logs.md | 6 ++++++ tooling/cli/Cargo.lock | 30 +++++------------------------- tooling/cli/Cargo.toml | 2 +- 3 files changed, 12 insertions(+), 26 deletions(-) create mode 100644 .changes/fix-ios-logs.md diff --git a/.changes/fix-ios-logs.md b/.changes/fix-ios-logs.md new file mode 100644 index 000000000000..367e512f1dd5 --- /dev/null +++ b/.changes/fix-ios-logs.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch:bug +"@tauri-apps/cli": patch:bug +--- + +Fixes a regression on alpha.11 where iOS logs aren't being displayed when using `ios dev` with a real device. diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 65e18ef21a90..525552eef7bd 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -1415,20 +1415,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "handlebars" -version = "3.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" -dependencies = [ - "log", - "pest", - "pest_derive", - "quick-error", - "serde", - "serde_json", -] - [[package]] name = "handlebars" version = "4.3.7" @@ -2981,12 +2967,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - [[package]] name = "quick-xml" version = "0.28.2" @@ -3933,7 +3913,7 @@ dependencies = [ "dirs-next", "dunce", "glob", - "handlebars 4.3.7", + "handlebars", "heck", "hex", "image", @@ -3980,7 +3960,7 @@ dependencies = [ "dialoguer", "duct", "env_logger", - "handlebars 4.3.7", + "handlebars", "heck", "html5ever 0.26.0", "ignore", @@ -4050,9 +4030,9 @@ dependencies = [ [[package]] name = "tauri-mobile" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d71d0a35c86cb9707ebb800a37c19fb90ee2d346db2d036c54c344e6839b32" +checksum = "0fd415c57bbe9d25db96e2ceeacf5b1ebe0dd413f1074f2ad2060bdd2d058405" dependencies = [ "cocoa", "colored 1.9.3", @@ -4063,7 +4043,7 @@ dependencies = [ "embed-resource", "english-numbers", "freedesktop_entry_parser", - "handlebars 3.5.5", + "handlebars", "heck", "home", "ignore", diff --git a/tooling/cli/Cargo.toml b/tooling/cli/Cargo.toml index 002e5d8b6721..a97893fd2982 100644 --- a/tooling/cli/Cargo.toml +++ b/tooling/cli/Cargo.toml @@ -39,7 +39,7 @@ name = "cargo-tauri" path = "src/main.rs" [dependencies] -tauri-mobile = { version = "0.5.2", default-features = false } +tauri-mobile = { version = "0.5.3", default-features = false } textwrap = { version = "0.11.0", features = [ "term_size" ] } jsonrpsee = { version = "0.16", features = [ "server" ] } jsonrpsee-core = "0.16"