Repository navigation
chore(deps): align the Tauri npm and Rust crates on 2.12.1 - #261
Merged
Merged
Conversation
The @tauri-apps/api bump to 2.11.1 in #256 failed the desktop build because the Rust `tauri` crate was still resolved at 2.10.3 and the CLI refuses to build when the JS API and the Rust crate disagree on major/minor: tauri (v2.10.3) : @tauri-apps/api (v2.11.1) Move the whole stack forward together instead of only the npm side: - package.json: @tauri-apps/api ^2.12.1, @tauri-apps/cli ^2.12.1 - src-tauri/Cargo.toml: tauri "2.12", tauri-build "2.7" floors - Cargo.lock / pnpm-lock.yaml regenerated for the same versions Verified with pnpm check, pnpm test (215 passed), pnpm verify:tauri and a local pnpm build:tauri:ci (release bundle, unsigned).
This was referenced Oct 3, 2026
LIUBINfighter
added a commit
that referenced
this pull request
Oct 3, 2026
…263) CI on #261 failed once with tests::delete_file_repo_trash_rejects_paths_outside_the_repo_root left: Some("No such file or directory (os error 2)") right: Some("path-outside-workspace") and passed on rerun. The assertion is about path scope, so the error is reported miles away from its cause: `delete_file` first canonicalizes the target, then resolves the implicit default workspace root, and only then checks scope. The ENOENT came out of that middle step. `with_temp_home` replaces the process-global `HOME` for the duration of a test, because Tauri resolves `app_data_dir()` straight from it. Nothing kept other tests from reading `HOME` while it was replaced, so a test running concurrently resolved its default workspace root inside another test's temporary home and then raced the `fs::remove_dir_all` that deletes it. `create_dir_all` losing that race reports `No such file or directory (os error 2)`, which is what the scope assertion ended up printing. Instrumenting the resolver showed 10 such misresolutions in a single test run, so this was a race the suite hit often and only diagnosed rarely. Fix the resolution instead of the timing: - `default_save_dir` and `global_metadata_dir` now resolve through `test_resolved_home`, which prefers a thread-local override and otherwise uses the real home captured before any test replaced `HOME`. Nothing reads the mutable variable on the resolution path any more. - `with_temp_home` still writes `HOME` (Tauri needs it) but also installs the thread-local override, so tests that do install it keep their private layout, and tests that do not are immune. - `lock_home_env` ignores mutex poisoning, so one panicking test no longer turns every later test into a secondary failure. `a_replaced_home_does_not_leak_into_path_resolution` pins the invariant and fails against the previous resolution (`left: Some(".../tabst-tauri-test-foreign-home")`). Test-support only; production resolution still goes straight to `home_dir()` and `document_dir()`. Verified: `cargo test` 28 passed, `cargo fmt --check`, `cargo check`, `cargo clippy --all-targets` (no new warnings), `pnpm verify:tauri` end to end.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Supersedes #256.
Dependabot bumped only the npm side to
@tauri-apps/api@2.11.1, so the desktop build failed the CLI's own version gate:The Rust crate was still resolved at
2.10.3, and the Tauri CLI refuses to build when the JS API and the Rust crate disagree on major/minor. Pushing the Rust side up by exactly one minor does not avoid the churn either: bothtauri 2.11.xandtauri 2.12.xpullwry 0.57, so this PR moves the whole stack to the current stable release instead of parking on an intermediate version.Changes
package.json:@tauri-apps/api^2.12.1,@tauri-apps/cli^2.12.1src-tauri/Cargo.toml:taurifloor"2.12",tauri-buildfloor"2.7"(bumping the floors keeps a futurecargo updatefrom silently walking the crate back below the JS API line)src-tauri/Cargo.lockandpnpm-lock.yamlregenerated for exactly those versionsTransitive Rust movement is what the crates themselves require:
tauri 2.12.1,tauri-runtime(-wry) 2.12.1,tauri-utils 2.10.1,tauri-build/tauri-codegen/tauri-macros2.7.1,wry 0.57.0,tao 0.37.1,tray-icon 0.24.2,window-vibrancy 0.8.1. No unrelated dependency was re-resolved: the lockfile diff contains only Tauri entries.Verification
Run in this worktree:
pnpm check— format / lint / type-check cleanpnpm test— 215 passedpnpm verify:tauri— web build,cargo check, bundle thresholds,cargo test(27 Rust tests), Tauri security config checkpnpm build:tauri:ci— full unsigned release build and DMG/app bundling succeeded locally; the CLI version gate no longer reports a mismatchFollow-up
The 2.10 to 2.12 jump carries
wry 0.54 -> 0.57, so the WKWebView behaviours documented indocs/dev/reports/WKWEBVIEW_AUDIO_SLEEP_DIAGNOSIS.mdanddocs/dev/reports/PRINT_BLANK_PAGE.md(background throttling, print pagination) deserve a manual pass on a real macOS build. Those fixes are JS/CSS/tauri.conf.jsonlevel and are unchanged by this PR.Closes #256