From e462e9fa2b8584e3588d4ee2e4f33f1f379896e0 Mon Sep 17 00:00:00 2001 From: FabianLars Date: Wed, 15 Jan 2025 13:11:01 +0100 Subject: [PATCH 1/2] fix(geo/haptics): Fix serde import error with specta feature disabled --- .changes/fix-geo-haptics-serde.md | 8 ++++++++ .taurignore | 3 ++- plugins/geolocation/src/error.rs | 2 +- plugins/haptics/src/error.rs | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 .changes/fix-geo-haptics-serde.md diff --git a/.changes/fix-geo-haptics-serde.md b/.changes/fix-geo-haptics-serde.md new file mode 100644 index 0000000000..43f01e56a6 --- /dev/null +++ b/.changes/fix-geo-haptics-serde.md @@ -0,0 +1,8 @@ +--- +haptics: patch +haptics-js: patch +geolocation: patch +geolocation-js: patch +--- + +Fixed an issue that caused build failures when the `haptics` or `geolocation` plugin was used without their `specta` feature flag enabled. diff --git a/.taurignore b/.taurignore index ea7a984c2f..e79f855099 100644 --- a/.taurignore +++ b/.taurignore @@ -1 +1,2 @@ -plugins/*/permissions/autogenerated/ \ No newline at end of file +plugins/*/permissions/autogenerated/ +plugins/*/android/.tauri/tauri-api/build/ \ No newline at end of file diff --git a/plugins/geolocation/src/error.rs b/plugins/geolocation/src/error.rs index 21cfce52ec..0fba54457c 100644 --- a/plugins/geolocation/src/error.rs +++ b/plugins/geolocation/src/error.rs @@ -14,7 +14,7 @@ pub enum Error { #[cfg(mobile)] #[error(transparent)] PluginInvoke( - #[serde(skip)] + #[cfg_attr(feature = "specta", serde(skip))] #[from] tauri::plugin::mobile::PluginInvokeError, ), diff --git a/plugins/haptics/src/error.rs b/plugins/haptics/src/error.rs index 21cfce52ec..0fba54457c 100644 --- a/plugins/haptics/src/error.rs +++ b/plugins/haptics/src/error.rs @@ -14,7 +14,7 @@ pub enum Error { #[cfg(mobile)] #[error(transparent)] PluginInvoke( - #[serde(skip)] + #[cfg_attr(feature = "specta", serde(skip))] #[from] tauri::plugin::mobile::PluginInvokeError, ), From c8d98cc67df07517a90a438471918c02fb9c1ed7 Mon Sep 17 00:00:00 2001 From: FabianLars Date: Wed, 15 Jan 2025 13:11:41 +0100 Subject: [PATCH 2/2] fmt --- .taurignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.taurignore b/.taurignore index e79f855099..28a49db3e0 100644 --- a/.taurignore +++ b/.taurignore @@ -1,2 +1,2 @@ plugins/*/permissions/autogenerated/ -plugins/*/android/.tauri/tauri-api/build/ \ No newline at end of file +plugins/*/android/.tauri/tauri-api/build/