I've hit a roadblock trying to upgrade an existing project to v2 so I created a new one with scratch and added specta and tauri-specta as shown in its respective documentation (https://github.com/oscartbeaumont/tauri-specta/blob/main/docs/v2.md).
Running cargo update does not show any errors or warnings.
However, rust-analyzer gives the error below:
ERROR rust_analyzer::main_loop: FetchBuildDataError:
error[E0061]: this function takes 3 arguments but 2 arguments were supplied
--> /Users/ilya/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.0-beta.22/build.rs:380:5
|
380 | tauri_utils::acl::build::generate_docs(&permissions, &docs_out_dir)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----------------------------- an argument of type `&str` is missing
|
note: function defined here
--> /Users/ilya/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-utils-2.0.0-beta.18/src/acl/build.rs:240:8
|
240 | pub fn generate_docs(
| ^^^^^^^^^^^^^
help: provide the argument
|
380 | tauri_utils::acl::build::generate_docs(&permissions, &docs_out_dir, /* &str */)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
error: could not compile `tauri` (build script) due to 2 previous errors
I tried using newer version of tauri but it's not compatible with tauri-specta.
Cargo.toml:
[build-dependencies]
tauri-build = { version = "2.0.0-beta", features = [] }
[dependencies]
tauri = { version = "=2.0.0-beta.22", features = [] }
tauri-plugin-shell = "2.0.0-beta"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
specta = "=2.0.0-rc.12"
tauri-specta = { version = "=2.0.0-rc.11", features = ["javascript", "typescript"] }