oscartbeaumont / tauri-specta

Completely typesafe Tauri commands
MIT License
289 stars 26 forks source link

Version mismatch #102

Closed SSardorf closed 3 weeks ago

SSardorf commented 4 weeks ago

In a completely new tauri application with the following cargo file:

[package]
name = "specta_test"
version = "0.0.0"
description = "A Tauri App"
authors = ["you"]
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
tauri-build = { version = "2.0.0-beta", features = [] }

[dependencies]
tauri-plugin-shell = "2.0.0-beta"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tauri = { version = "=2.0.0-beta.22", features = [] }
specta = "=2.0.0-rc.12"
tauri-specta = { version = "=2.0.0-rc.5", features = ["javascript", "typescript"] }

I get the following error:

error: failed to select a version for `specta`.
    ... required by package `tauri-specta v2.0.0-rc.5`
    ... which satisfies dependency `tauri-specta = "=2.0.0-rc.5"` of package `specta_test v0.0.0 (/Users/ssardorf/dev/rust/tauri_projects/specta_test/src-tauri)`
versions that meet the requirements `=2.0.0-rc.11` are: 2.0.0-rc.11

all possible versions conflict with previously selected packages.

  previously selected package `specta v2.0.0-rc.12`
    ... which satisfies dependency `specta = "=2.0.0-rc.12"` of package `specta_test v0.0.0 (/Users/ssardorf/dev/rust/tauri_projects/specta_test/src-tauri)`

failed to select a version for `specta` which could resolve this conflict
SSardorf commented 4 weeks ago

Removing the = from the specta and tauri versions fixes the issue for me.

Brendonovich commented 4 weeks ago

The latest version of tauri-specta is 2.0.0-rc.11 which should be used with specta 2.0.0-rc.12, like in this example.

SSardorf commented 4 weeks ago

The latest version of tauri-specta is 2.0.0-rc.11 which should be used with specta 2.0.0-rc.12, like in this example.

Appreciate your response. I just followed the v2 readme image

Brendonovich commented 4 weeks ago

Ah yep, will get that updated

oscartbeaumont commented 3 weeks ago

Whoops completely forgot to update it when releasing Tauri Specta.

I would also recommend keeping the = in case Tauri do any breaking changes which is why we show it in the docs.