Giter Site home page Giter Site logo

[bug] about tauri HOT 9 CLOSED

cryarchy avatar cryarchy commented on July 26, 2024
[bug]

from tauri.

Comments (9)

FabianLars avatar FabianLars commented on July 26, 2024 1

Can you run cargo update in the src-tauri dir and check if that fixes it? We're currently not setting minimum versions internally which can cause issues like these in new releases. We're reworking our CI a bit to handle this better in the future but that will take a bit more time.

from tauri.

FabianLars avatar FabianLars commented on July 26, 2024 1

Can you try that again? We just published new versions of all plugins and since tauri-plugin (used by the plugins) is the issue this may fix it.

from tauri.

cryarchy avatar cryarchy commented on July 26, 2024 1

I resolved the issue by configuring my dependencies as shown below:

tauri = {version = "2.0.0-beta.22"}
tauri-build = "2.0.0-beta.17"
tauri-plugin = "2.0.0-beta.17"
tauri-utils = "2.0.0-beta.17"

[patch.crates-io]
tauri = {git = "https://github.com/tauri-apps/tauri", rev = "tauri-v2.0.0-beta.22"}
tauri-build = {git = "https://github.com/tauri-apps/tauri", rev = "tauri-build-v2.0.0-beta.17"}
tauri-plugin = {git = "https://github.com/tauri-apps/tauri", rev = "tauri-plugin-v2.0.0-beta.17"}

from tauri.

FabianLars avatar FabianLars commented on July 26, 2024 1

@ElianMalessy tauri-specta needs to be updated (https://github.com/oscartbeaumont/tauri-specta/blob/main/Cargo.toml#L31) or you'll have to stick with beta.22 (and beta.17 for the "inner" crates as shown above).

from tauri.

cryarchy avatar cryarchy commented on July 26, 2024

Running cargo-update in the src-tauri directory does not solve the issue.

I have also tried deleting the Cargo.lock file and running cargo tauri build --no-bundle --debug but I still get the same error.

from tauri.

cryarchy avatar cryarchy commented on July 26, 2024

I tried running cargo update and still got the same error. To reproduce the bug, I have created a sample project here. The tauri-plugin-hello project is the project created by running cargo tauri plugin new hello with a few dependencies added and minimal code changes to reproduce the bug.

The issue, it seems, arises when authoring plugins. Running cargo clippy from the tauri-plugin-hello folder in the repository above fails with the error:

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> /home/user/.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
   --> /home/user/.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 */)
    |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For more information about this error, try `rustc --explain E0061`.
error: could not compile `tauri` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

from tauri.

amrbashir avatar amrbashir commented on July 26, 2024

I just tried a fresh project and it works without a problem, make sure to run cargo update inside src-tauri and if it doesn't work, please make a minimal repro of the project that failed.

from tauri.

FabianLars avatar FabianLars commented on July 26, 2024

Ahh nevermind, it's tauri-specta's "fault" by locking tauri to beta.22

from tauri.

ElianMalessy avatar ElianMalessy commented on July 26, 2024

@FabianLars how do you fix this issue with tauri-specta?

from tauri.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.