fix(feature/specta): Resolve error when using latest version of specta with tauri specta feature (#11871)

* Update specta feature to use latest specta version; add specta-util dependency (required in specta v2 rc.20)

* Add .changes file

* Update crates/tauri/Cargo.toml

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
This commit is contained in:
John Carmack
2024-12-05 03:56:16 -08:00
committed by GitHub
parent 2b8a981050
commit b37741da6a
3 changed files with 26 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---
Fix `specta-util` dependency not found error when using `specta` feature

17
Cargo.lock generated
View File

@@ -4867,7 +4867,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
dependencies = [
"cfg-if",
"windows-targets 0.48.5",
"windows-targets 0.52.6",
]
[[package]]
@@ -8595,6 +8595,18 @@ dependencies = [
"syn 2.0.90",
]
[[package]]
name = "specta-util"
version = "0.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8113d65b58a6de3184b01d6df9e50b6d4bbe7f724251f576d84f23228824456"
dependencies = [
"ctor",
"serde",
"specta",
"specta-macros",
]
[[package]]
name = "spin"
version = "0.9.8"
@@ -9032,6 +9044,7 @@ dependencies = [
"serde_repr",
"serialize-to-javascript",
"specta",
"specta-util",
"swift-rs",
"tauri",
"tauri-build",
@@ -10798,7 +10811,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys 0.48.0",
"windows-sys 0.59.0",
]
[[package]]

View File

@@ -85,11 +85,14 @@ tracing = { version = "0.1", optional = true }
heck = "0.5"
log = "0.4"
dunce = "1"
specta = { version = "^2.0.0-rc.16", optional = true, default-features = false, features = [
specta = { version = "^2.0.0-rc.20", optional = true, default-features = false, features = [
"function",
"derive",
] }
# TODO: remove when specta releases rc.21
specta-util = { version = "^0.0.7", optional = true, default-features = false, features = [
"export",
] }
[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"windows\", target_os = \"macos\"))".dependencies]
muda = { version = "0.15", default-features = false, features = ["serde"] }
tray-icon = { version = "0.19", default-features = false, features = [
@@ -192,7 +195,7 @@ config-toml = ["tauri-macros/config-toml"]
image-ico = ["image/ico"]
image-png = ["image/png"]
macos-proxy = ["tauri-runtime-wry/macos-proxy"]
specta = ["dep:specta"]
specta = ["dep:specta", "dep:specta-util"]
[[example]]
name = "commands"