Summary
The tauri-specta IPC codegen toolchain is pinned to pre-release exact versions:
specta = "=2.0.0-rc.22" (workspace Cargo.toml)
tauri-specta = "=2.0.0-rc.21" and specta-typescript = "0.0.9" (src-tauri/Cargo.toml)
Do not upgrade to rc.24+.
Why
rc.24 introduces specta-serde, which breaks this repo two ways:
- Unified mode (
disable_serde_phases) rejects any #[serde(skip_serializing_if)] — we have 36 such fields, and #[specta(optional)] does not suppress the error.
- Phased mode infinitely recurses / hangs on
serde_json::Value's inline self-referential Type impl.
rc.21/rc.22 are pre-specta-serde; neither problem exists.
Additionally, the Type trait signature changed: rc.22 uses fn inline(type_map, generics), rc.25 changed it to definition(types). Our hand-written Type impls (AppError → String, OverlayActivityFavoriteGroupKeys) use the rc.22 inline signature, so an upgrade also requires rewriting those.
Codegen context
Commands = #[tauri::command] + #[specta::specta], listed once in collect_commands![] in src-tauri/src/bindings_export.rs; npm run generate:tauri-bindings regenerates src/platform/tauri/bindings.ts. patch_bindings() applies 3 deterministic patches (notably serde_json::Value → any, related to specta-rs/specta#166). CI tauri-bindings job guards against drift.
Upstream
Unpin criteria
- A specta/tauri-specta release where: (a)
#[serde(skip_serializing_if)] fields don't error under serde validation, and (b) serde_json::Value doesn't hang codegen.
- Migrate the hand-written
Type impls to the new definition(types) signature.
- Verify:
npm run generate:tauri-bindings completes and the resulting bindings.ts matches the committed one (modulo the 3 intended patches); cargo check --manifest-path src-tauri/Cargo.toml passes; CI tauri-bindings job stays green.
Dependabot
Enforced via ignore rules for specta / tauri-specta / specta-typescript in .github/dependabot.yml.
Summary
The tauri-specta IPC codegen toolchain is pinned to pre-release exact versions:
specta = "=2.0.0-rc.22"(workspaceCargo.toml)tauri-specta = "=2.0.0-rc.21"andspecta-typescript = "0.0.9"(src-tauri/Cargo.toml)Do not upgrade to rc.24+.
Why
rc.24 introduces
specta-serde, which breaks this repo two ways:disable_serde_phases) rejects any#[serde(skip_serializing_if)]— we have 36 such fields, and#[specta(optional)]does not suppress the error.serde_json::Value's inline self-referentialTypeimpl.rc.21/rc.22 are pre-
specta-serde; neither problem exists.Additionally, the
Typetrait signature changed: rc.22 usesfn inline(type_map, generics), rc.25 changed it todefinition(types). Our hand-writtenTypeimpls (AppError → String,OverlayActivityFavoriteGroupKeys) use the rc.22inlinesignature, so an upgrade also requires rewriting those.Codegen context
Commands =
#[tauri::command]+#[specta::specta], listed once incollect_commands![]insrc-tauri/src/bindings_export.rs;npm run generate:tauri-bindingsregeneratessrc/platform/tauri/bindings.ts.patch_bindings()applies 3 deterministic patches (notablyserde_json::Value → any, related to specta-rs/specta#166). CItauri-bindingsjob guards against drift.Upstream
serde_json::Valueshouldn't beanyspecta-rs/specta#166 —serde_json::Valueshouldn't beany(related; informs whether the Value recursion is fixed).never(separate rc.24 regression).skip_serializing_if+serde_json::Valuerecursion combo.Unpin criteria
#[serde(skip_serializing_if)]fields don't error under serde validation, and (b)serde_json::Valuedoesn't hang codegen.Typeimpls to the newdefinition(types)signature.npm run generate:tauri-bindingscompletes and the resultingbindings.tsmatches the committed one (modulo the 3 intended patches);cargo check --manifest-path src-tauri/Cargo.tomlpasses; CItauri-bindingsjob stays green.Dependabot
Enforced via
ignorerules forspecta/tauri-specta/specta-typescriptin.github/dependabot.yml.