From 406e6f484cdc13d35c50fb949f7489ca9eeccc44 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Wed, 15 Jan 2025 13:28:40 +0100 Subject: [PATCH] fix(geo/haptics): Fix serde import error with specta feature disabled (#2323) --- .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 00000000..43f01e56 --- /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 ea7a984c..28a49db3 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/ diff --git a/plugins/geolocation/src/error.rs b/plugins/geolocation/src/error.rs index 21cfce52..0fba5445 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 21cfce52..0fba5445 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, ),