Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] error: Dependencies could not be resolved because no versions of 'swift-rs' match the requirement 1.0.0..<2.0.0 and 'tauri-api' depends on 'swift-rs' 1.0.0..<2.0.0. #12964

Open
falcom520 opened this issue Mar 13, 2025 · 1 comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@falcom520
Copy link

falcom520 commented Mar 13, 2025

Describe the bug

--- stderr
Fetching https://github.com/Brendonovich/swift-rs from cache
Fetched https://github.com/Brendonovich/swift-rs (1.25s)
Computing version for https://github.com/Brendonovich/swift-rs
error: Dependencies could not be resolved because no versions of 'swift-rs' match the requirement 1.0.0..<2.0.0 and 'tauri-api' depends on 'swift-rs' 1.0.0..<2.0.0.

thread 'main' panicked at /Users/xxx/.cargo/registry/src/mirrors.aliyun.com-0671735e7cc7f5e7/swift-rs-1.0.7/src-rs/build.rs:281:17:
Failed to compile swift package tauri-plugin-opener
stack backtrace:
0: rust_begin_unwind
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:692:5
1: core::panicking::panic_fmt
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panicking.rs:75:14
2: swift_rs::build::SwiftLinker::link
at /Users/xxx/.cargo/registry/src/mirrors.aliyun.com-0671735e7cc7f5e7/swift-rs-1.0.7/src-rs/build.rs:281:17
3: tauri_utils::build::link_swift_library
at /Users/xxx/.cargo/registry/src/mirrors.aliyun.com-0671735e7cc7f5e7/tauri-utils-2.2.0/src/build.rs:25:3
4: tauri_utils::build::link_apple_library
at /Users/xxx/.cargo/registry/src/mirrors.aliyun.com-0671735e7cc7f5e7/tauri-utils-2.2.0/src/build.rs:11:5
5: tauri_plugin::build::mobile::setup
at /Users/xxx/.cargo/registry/src/mirrors.aliyun.com-0671735e7cc7f5e7/tauri-plugin-2.0.5/src/build/mobile.rs:93:9
6: tauri_plugin::build::Builder::try_build
at /Users/xxx/.cargo/registry/src/mirrors.aliyun.com-0671735e7cc7f5e7/tauri-plugin-2.0.5/src/build/mod.rs:143:5
7: tauri_plugin::build::Builder::build
at /Users/xxx/.cargo/registry/src/mirrors.aliyun.com-0671735e7cc7f5e7/tauri-plugin-2.0.5/src/build/mod.rs:80:25
8: build_script_build::main
at ./build.rs:116:5
9: core::ops::function::FnOnce::call_once
at /Users/xxx/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
Failed to run cargo build: command ["cargo", "build", "--package", "liveapp", "--manifest-path", "/Users/xxx/app/src/liveapp/src-tauri/Cargo.toml", "--target", "x86_64-apple-ios", "--lib", "--no-default-features"] exited with code 101
Error Failed to run cargo build: command ["cargo", "build", "--package", "liveapp", "--manifest-path", "/Users/xxx/app/src/liveapp/src-tauri/Cargo.toml", "--target", "x86_64-apple-ios", "--lib", "--no-default-features"] exited with code 101

note: Run script build phase 'Build Rust Code' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'liveapp_iOS' from project 'liveapp')
** BUILD FAILED **

npm run tauri ios dev

Reinstalled many times, always report this error

Reproduction

No response

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Mac OS 13.7.4 x86_64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.85.0 (4d91de4e4 2025-02-17)
    ✔ cargo: 1.85.0 (d73d2caf9 2024-12-31)
    ✔ rustup: 1.28.1 (f9edccde0 2025-03-05)
    ✔ Rust toolchain: stable-x86_64-apple-darwin (overridden by environment variable RUSTUP_TOOLCHAIN)
    - node: 20.12.2
    - yarn: 1.22.19
    - npm: 10.8.0

[-] Packages
    - tauri 🦀: 2.3.1
    - tauri-build 🦀: 2.0.6
    - wry 🦀: 0.50.4
    - tao 🦀: 0.32.8
    - tauri-cli 🦀: 2.3.1

[-] Plugins
    - tauri-plugin-opener 🦀: 2.2.6

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/

[-] iOS
    - Developer Teams:

Stack trace


Additional context

No response

@falcom520 falcom520 added status: needs triage This issue needs to triage, applied to new issues type: bug labels Mar 13, 2025
@FabianLars
Copy link
Member

this sounds like an issue with your mirror or proxy that results in https://github.com/Brendonovich/swift-rs getting blocked / not downloaded correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants