tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
78.1k stars 2.31k forks source link

[bug] tauri-utils-2.0.0-beta.13 #9678

Closed RichAutumnSky closed 1 week ago

RichAutumnSky commented 1 week ago

Describe the bug

This compile error occurred immediately after cargo update.

error[E0425]: cannot find function `apply_metadata` in module `schemars::_private`
   --> /Users/handamin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-utils-2.0.0-beta.13/src/config.rs:216:27
    |
216 |       schemars::_private::apply_metadata(
    |                           ^^^^^^^^^^^^^^ not found in `schemars::_private`

error[E0425]: cannot find function `apply_metadata` in module `schemars::_private`
   --> /Users/handamin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-utils-2.0.0-beta.13/src/config.rs:223:27
    |
223 |       schemars::_private::apply_metadata(
    |                           ^^^^^^^^^^^^^^ not found in `schemars::_private`

Reproduction

No response

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Mac OS 14.4.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
    ✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.12.0
    - pnpm: 9.0.6
    - npm: 10.5.0
    - bun: 1.1.4

[-] Packages
    - tauri [RUST]: 2.0.0-beta.17 (no manifest)
    - tauri-build [RUST]: 2.0.0-beta.13 (no manifest)
    - wry [RUST]: 0.39.3 (no manifest)
    - tao [RUST]: 0.27.1 (no manifest)
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-beta.15

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

Stack trace

$ bun cli:dev
$ cd app/tauri-core && bun run dev
$ tauri dev
    Running BeforeDevCommand (`cd ../tauri-view && bun dev`)
$ vite
Re-optimizing dependencies because lockfile has changed

  VITE v5.2.11  ready in 214 ms

  ➜  Local:   http://localhost:8420/
  ➜  Network: use --host to expose
    Info Watching /Users/handamin/Organizations/prj-c/prj-c-client/app/tauri-core for changes...
    Info Watching /Users/handamin/Organizations/prj-c/prj-c-client/app/bevy-core for changes...
    Info Watching /Users/handamin/Organizations/prj-c/prj-c-client/app/tauri-core for changes...
    Updating crates.io index
  Downloaded hyper-tls v0.6.0
  Downloaded native-tls v0.2.11
  Downloaded tokio-native-tls v0.3.1
  Downloaded tempfile v3.10.1
  Downloaded rustls-pemfile v2.1.2
  Downloaded security-framework-sys v2.11.0
  Downloaded security-framework v2.11.0
  Downloaded rustls-pki-types v1.5.0
  Downloaded 8 crates (252.6 KB) in 0.30s
   Compiling cfg-if v1.0.0
   Compiling once_cell v1.19.0
   Compiling memchr v2.7.2
   Compiling libc v0.2.154
   Compiling ppv-lite86 v0.2.17
   Compiling itoa v1.0.11
   Compiling siphasher v0.3.11
   Compiling serde v1.0.200
   Compiling fnv v1.0.7
   Compiling equivalent v1.0.1
   Compiling bitflags v1.3.2
   Compiling regex-syntax v0.8.3
   Compiling byteorder v1.5.0
   Compiling pin-project-lite v0.2.14
   Compiling either v1.11.0
   Compiling phf_shared v0.10.0
   Compiling thiserror v1.0.59
   Compiling ryu v1.0.17
   Compiling futures-core v0.3.30
   Compiling smallvec v1.13.2
   Compiling log v0.4.21
   Compiling glob v0.3.1
   Compiling tinyvec_macros v0.1.1
   Compiling zerocopy v0.7.33
   Compiling aho-corasick v1.1.3
   Compiling new_debug_unreachable v1.0.6
   Compiling precomputed-hash v0.1.1
   Compiling tinyvec v1.6.0
   Compiling percent-encoding v2.3.1
   Compiling allocator-api2 v0.2.18
   Compiling lazy_static v1.4.0
   Compiling scopeguard v1.2.0
   Compiling indexmap v2.2.6
   Compiling typenum v1.17.0
   Compiling hashbrown v0.12.3
   Compiling jobserver v0.1.31
   Compiling getrandom v0.2.15
   Compiling getrandom v0.1.16
   Compiling ahash v0.8.11
   Compiling unicode-normalization v0.1.23
   Compiling cc v1.0.97
   Compiling rand_core v0.5.1
   Compiling rand_chacha v0.2.2
   Compiling hashbrown v0.14.5
   Compiling rand_core v0.6.4
   Compiling generic-array v0.14.7
   Compiling rand_chacha v0.3.1
   Compiling regex-automata v0.4.6
   Compiling rand v0.8.5
   Compiling lock_api v0.4.12
   Compiling form_urlencoded v1.2.1
   Compiling unicode-bidi v0.3.15
   Compiling stable_deref_trait v1.2.0
   Compiling darling_core v0.20.8
   Compiling rand_pcg v0.2.1
   Compiling idna v0.5.0
   Compiling bytes v1.6.0
   Compiling errno v0.3.8
   Compiling futures-sink v0.3.30
   Compiling rand v0.7.3
   Compiling slab v0.4.9
   Compiling mio v0.8.11
   Compiling num_cpus v1.16.0
   Compiling socket2 v0.5.7
   Compiling semver v1.0.22
   Compiling phf_shared v0.8.0
   Compiling futures-io v0.3.30
   Compiling core-foundation-sys v0.8.6
   Compiling tokio v1.37.0
   Compiling parking_lot_core v0.9.10
   Compiling phf_generator v0.8.0
   Compiling crypto-common v0.1.6
   Compiling same-file v1.0.6
   Compiling parking_lot v0.12.2
   Compiling walkdir v2.5.0
   Compiling regex v1.10.4
   Compiling libm v0.2.8
   Compiling futures-channel v0.3.30
   Compiling phf_generator v0.10.0
   Compiling pin-utils v0.1.0
   Compiling futures-task v0.3.30
   Compiling utf-8 v0.7.6
   Compiling string_cache v0.8.7
   Compiling futures-util v0.3.30
   Compiling string_cache_codegen v0.5.2
   Compiling phf_codegen v0.10.0
   Compiling num-traits v0.2.19
   Compiling mac v0.1.1
   Compiling futf v0.1.5
   Compiling phf_macros v0.8.0
   Compiling markup5ever v0.11.0
   Compiling rustc_version v0.4.0
   Compiling block-buffer v0.10.4
   Compiling clang-sys v1.7.0
   Compiling minimal-lexical v0.2.1
   Compiling darling_macro v0.20.8
   Compiling dtoa v1.0.9
   Compiling base64 v0.21.7
   Compiling winnow v0.6.8
   Compiling darling v0.20.8
   Compiling serde_with_macros v3.8.1
   Compiling dtoa-short v0.3.4
   Compiling phf v0.8.0
   Compiling tendril v0.4.3
   Compiling phf_codegen v0.8.0
   Compiling dirs-sys-next v0.1.2
   Compiling phf v0.10.1
   Compiling itoa v0.4.8
   Compiling matches v0.1.10
   Compiling rustix v0.38.34
   Compiling selectors v0.22.0
   Compiling dirs-next v2.0.0
   Compiling nom v7.1.3
   Compiling libloading v0.8.3
   Compiling nodrop v0.1.14
   Compiling servo_arc v0.1.1
   Compiling bindgen v0.65.1
   Compiling which v4.4.2
   Compiling serde_json v1.0.116
   Compiling fxhash v0.2.1
   Compiling tracing-core v0.1.32
   Compiling serde_spanned v0.6.5
   Compiling toml_datetime v0.6.5
   Compiling thin-slice v0.1.1
   Compiling subtle v2.5.0
   Compiling unic-common v0.9.0
   Compiling unic-char-range v0.9.0
   Compiling unic-ucd-version v0.9.0
   Compiling tracing v0.1.40
   Compiling unic-char-property v0.9.0
   Compiling cexpr v0.6.0
   Compiling indexmap v1.9.3
   Compiling httparse v1.8.0
   Compiling core-foundation v0.9.4
   Compiling phf_shared v0.11.2
   Compiling alloc-no-stdlib v2.0.4
   Compiling phf_generator v0.11.2
   Compiling alloc-stdlib v0.2.2
   Compiling unic-ucd-ident v0.9.0
   Compiling tokio-util v0.7.11
   Compiling ring v0.17.8
   Compiling tower-service v0.3.2
   Compiling try-lock v0.2.5
   Compiling brotli-decompressor v2.5.1
   Compiling want v0.3.1
   Compiling phf_macros v0.11.2
   Compiling anyhow v1.0.82
   Compiling digest v0.10.7
   Compiling toml_edit v0.22.12
   Compiling url v2.5.0
   Compiling http v0.2.12
   Compiling spin v0.9.8
   Compiling cpufeatures v0.2.12
   Compiling pin-project v1.1.5
   Compiling brotli v3.5.0
   Compiling phf v0.11.2
   Compiling objc_exception v0.1.2
   Compiling bitflags v2.5.0
   Compiling untrusted v0.9.0
   Compiling powerfmt v0.2.0
   Compiling time-core v0.1.2
   Compiling dunce v1.0.4
   Compiling toml v0.8.12
   Compiling tower-layer v0.3.2
   Compiling num-conv v0.1.0
   Compiling libz-sys v1.1.16
   Compiling deranged v0.3.11
   Compiling crossbeam-utils v0.8.19
   Compiling swift-rs v1.0.6
   Compiling cssparser v0.27.2
   Compiling bzip2-sys v0.1.11+1.0.8
   Compiling zstd-sys v2.0.10+zstd.1.5.6
   Compiling lz4-sys v1.9.4
   Compiling uuid v1.8.0
   Compiling atomic v0.5.3
   Compiling cfb v0.7.3
   Compiling html5ever v0.26.0
   Compiling tower v0.4.13
   Compiling serde_with v3.8.1
   Compiling term v0.7.0
   Compiling heapless v0.7.17
   Compiling http v1.1.0
   Compiling malloc_buf v0.0.6
   Compiling fastrand v2.1.0
   Compiling schemars v0.8.19
   Compiling rustls v0.21.12
   Compiling petgraph v0.6.4
   Compiling cargo_metadata v0.18.1
   Compiling objc v0.2.7
   Compiling ascii-canvas v3.0.0
   Compiling kuchikiki v0.8.2
   Compiling infer v0.15.0
   Compiling rustls-webpki v0.101.7
   Compiling sct v0.7.1
   Compiling urlpattern v0.2.0
   Compiling http-body v0.4.6
   Compiling json-patch v1.4.0
   Compiling core-graphics-types v0.1.3
   Compiling lalrpop-util v0.20.2
   Compiling psm v0.1.21
   Compiling itertools v0.11.0
   Compiling hash32 v0.2.1
   Compiling simd-adler32 v0.3.7
   Compiling base64 v0.22.1
   Compiling mime v0.3.17
   Compiling foreign-types-shared v0.3.1
   Compiling foreign-types v0.5.0
   Compiling toml_edit v0.19.15
   Compiling h2 v0.3.26
   Compiling stacker v0.1.15
   Compiling lalrpop v0.20.2
   Compiling tauri-utils v2.0.0-beta.13
   Compiling inout v0.1.3
error[E0425]: cannot find function `apply_metadata` in module `schemars::_private`
   --> /Users/handamin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-utils-2.0.0-beta.13/src/config.rs:216:27
    |
216 |       schemars::_private::apply_metadata(
    |                           ^^^^^^^^^^^^^^ not found in `schemars::_private`

error[E0425]: cannot find function `apply_metadata` in module `schemars::_private`
   --> /Users/handamin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-utils-2.0.0-beta.13/src/config.rs:223:27
    |
223 |       schemars::_private::apply_metadata(
    |                           ^^^^^^^^^^^^^^ not found in `schemars::_private`

   Compiling block v0.1.6
   Compiling httpdate v1.0.3
   Compiling sync_wrapper v0.1.2
   Compiling adler v1.0.2
   Compiling ipnet v2.9.0
   Compiling miniz_oxide v0.7.2
   Compiling cocoa-foundation v0.1.2
   Compiling toml v0.7.8
   Compiling cipher v0.4.4
   Compiling rstar v0.11.0
   Compiling hyper v0.14.28
   Compiling crc32fast v1.4.0
   Compiling core-graphics v0.23.2
   Compiling embed-resource v2.4.2
For more information about this error, try `rustc --explain E0425`.
error: could not compile `tauri-utils` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: script "dev" exited with code 101
error: script "cli:dev" exited with code 101

Additional context

No response

howardah commented 1 week ago

I am having the same issue! I tried to create a new test with create-tauri-app and still get the issue with the demo app.

Here's my tauri info output:

[✔] Environment
    - OS: Mac OS 14.4.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
    ✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-apple-darwin (default)
    - node: 18.18.0
    - pnpm: 7.27.1
    - yarn: 1.22.19
    - npm: 9.8.1
    - bun: 1.0.31

[-] Packages
    - tauri [RUST]: 2.0.0-beta.17
    - tauri-build [RUST]: 2.0.0-beta.13
    - wry [RUST]: 0.39.3
    - tao [RUST]: 0.27.1
    - @tauri-apps/api [NPM]: 2.0.0-beta.11
    - @tauri-apps/cli [NPM]: 2.0.0-beta.15

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite
FabianLars commented 1 week ago

Yes, everyone has this issue. Thank you all who reported it so far in the 3 gh issues (lol), but no more reports please :D PRs are already up but it seems like i'm alone rn and i can't merge my own PR due to branch protection rules 🥲

For a temporary workaround you can run cargo update -p schemars --precise 0.8.17