Skip to content

Instantly share code, notes, and snippets.

@thewh1teagle
Last active February 18, 2024 17:33
Show Gist options
  • Save thewh1teagle/9277d09b90354c06a5bdbba9ad33926c to your computer and use it in GitHub Desktop.
Save thewh1teagle/9277d09b90354c06a5bdbba9ad33926c to your computer and use it in GitHub Desktop.

Error

Updating crates.io index
error: failed to select a version for `tauri`.
   ... required by package `tauri-plugin-dialog v2.0.0-beta.0 (/Users/user/Documents/tauri/plugins-workspace/plugins/dialog)`
   ... which satisfies path dependency `tauri-plugin-dialog` of package `app v0.1.0 (/Users/user/Documents/tauri/app)`
versions that meet the requirements `^2.0.0-beta.1` are: 2.0.0-beta.2, 2.0.0-beta.1

the package `tauri` links to the native library `Tauri`, but it conflicts with a previous package which links to `Tauri` as well:
package `tauri v2.0.0-beta.2 (/Users/user/Documents/tauri/tauri/core/tauri)`
   ... which satisfies path dependency `tauri` (locked to 2.0.0-beta.2) of package `app v0.1.0 (/Users/user/Documents/tauri/app)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='tauri' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `tauri` which could resolve this conflict

app/Cargo.toml

[package]
name = "app"
version = "0.1.0"
description = "A Tauri App"
authors = ["you"]
license = ""
repository = ""
edition = "2021"
rust-version = "1.70"

# 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.1", features = [] }

[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
# tauri = { git = "https://github.com/tauri-apps/tauri", rev = "0cb0a15ce22af3d649cf219ac04188c14c5f4905", features = ["unstable"] } # 2.0.0-beta.2
tauri = { path = "../tauri/core/tauri", version = "2.0.0-beta.2", features = ["unstable"] }
tauri-plugin-dialog = { path = "../plugins-workspace/plugins/dialog"}

[features]
# this feature is used for production builds or when `devUrl` points to the filesystem
# DO NOT REMOVE!!
custom-protocol = [ "tauri/custom-protocol" ]

[patch.crates-io]
wry = { git = "https://github.com/thewh1teagle/wry", rev = "f8de248683a42d56b6c24d079eecb34e20db983a" } 
tauri-plugin = { path = "../tauri/core/tauri-plugin" } 

plugins/dialog/Cargo.toml

[package]
name = "tauri-plugin-dialog"
version = "2.0.0-beta.0" # tried to change to beta.2 also
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
edition = { workspace = true }
authors = { workspace = true }
license = { workspace = true }
rust-version = { workspace = true }
links = "tauri-plugin-dialog"

[package.metadata.docs.rs]
rustc-args = [ "--cfg", "docsrs" ]
rustdoc-args = [ "--cfg", "docsrs" ]
targets = [ "x86_64-unknown-linux-gnu", "x86_64-linux-android" ]

[build-dependencies]
tauri-plugin = { workspace = true, features = [ "build" ] }

[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
tauri = { workspace = true }
log = { workspace = true }
thiserror = { workspace = true }
tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.0" }

[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
glib = "0.16"

[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
rfd = { version = "=0.12.0", features = [ "gtk3", "common-controls-v6" ] }
raw-window-handle = "0.5"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment