specta-rs / tauri-specta

Completely typesafe Tauri commands
MIT License
368 stars 40 forks source link

Getting a lot of errors when trying to upgrade #110

Closed kareemmahlees closed 3 months ago

kareemmahlees commented 3 months ago

Issue

I am trying to update to the latest version of tauri-specta as of this piece of code and I am getting tons of issues when building tauri:

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> C:\Users\karee\.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
   --> C:\Users\karee\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-utils-2.0.0-beta.19\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 */)
    |  
wvffle commented 3 months ago

I'm having the same issue after upgrading. I cannot get tauri-specta to work no matter the version of tauri or tauri-specta

kareemmahlees commented 3 months ago

@wvffle there is a PR that fixes this but haven't been merged yet, the only workaround I came up with is to fork this repo which has the branch that fixes those until the fix is merged.

oscartbeaumont commented 3 months ago

Closing in favor on main which is now on the latest Tauri.

Also be careful using forks that don't lock the version to a specific Tauri version (Eg. tauri = "=...") in the Cargo.toml because it means your builds will break when running cargo update or if your not using a Cargo lockfile. We do in Tauri Specta to ensure your builds won't randomly break.