ci: unblock clippy and MSRV test jobs - #4
Closed
ryok90 wants to merge 3 commits into
Closed
Conversation
The `clippy` and the three `test --all-features` jobs fail on this branch for reasons unrelated to any individual PR targeting it. MSRV: the CEF work pulls in `cargo_metadata 0.23` (via the `cef` crate) and `winit 0.31-beta`, which require newer toolchains than the pinned 1.88: cargo-platform@0.3.3 requires rustc 1.91 smol_str@0.3.6 requires rustc 1.89 Bump the toolchain to 1.90 to match the MSRV already adopted upstream on `dev` (tauri-apps#13221), which covers `smol_str`, and pin `cargo-platform` to 0.3.2 (MSRV 1.88) since 0.3.3 would still exceed 1.90. Clippy: `Manifest::command_permission` tripped `clippy::question_mark` on current stable. Rewrite the trailing branch with `?`; behaviour is unchanged. Verified with `cargo +1.90 test --all-features --no-run --manifest-path crates/tauri/Cargo.toml`, which reproduced the resolver error before the lockfile pin and proceeds to compile after it.
Package Changes Through 30eccf8There are 9 changes which include tauri with patch, tauri-utils with patch, tauri-build with patch, tauri-plugin with patch, tauri-macros with patch, tauri-codegen with patch, @tauri-apps/cli with patch, tauri-cli with patch, tauri-bundler with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Follow-up to the MSRV bump. With the toolchain raised, compilation gets further and uncovers more pre-existing breakage on this branch. Pin `specta` to 2.0.0-rc.20 in the lockfile, matching `dev`. rc.25 uses the unstable `debug_closure_helpers` feature and cannot build on stable, which broke `test tauri` on all three platforms. `dev` pins the same version for this reason (tauri-apps#15305). Fix two genuine breakages under `--all-features`: - `manager/webview.rs` called `tauri_utils::html2::parse`, which does not exist. The `html2` migration renamed it to `parse_doc` and made the document render via `Document::html()`; the merge in 69732d8 kept the old call. Restored to match `dev`. - the `check_get_url_cef` test omitted the macOS/iOS-gated `on_web_content_process_terminate` argument, so `with_handlers` was called with a shifted argument list on Apple targets. Matches `check_get_url_wry` now. The remaining changes are clippy lints reported by current stable, all of them mechanical and behaviour-preserving: `manual_filter`, `useless_borrows_in_formatting`, `let_and_return`, `redundant_closure`, `while_let_on_iterator` and `too_many_arguments`. Two lint fixes are in code CI does not lint (the clippy job runs on Linux only) but which fail `cargo clippy` locally on macOS: the dmg bundler and `cef/macos_dev.rs`. The `examples/api` CEF DevTools block is additionally gated on `not(test)`, since under `cfg(test)` the runtime is `MockRuntime`, which does not expose those methods. Verified in an ubuntu:24.04 container on rustc/clippy 1.97.1, matching the CI job: `cargo clippy --all-targets --all-features -- -D warnings` passes. `cargo +1.90 test --all-features --manifest-path crates/tauri/Cargo.toml` passes (67 lib + 123 doc tests).
Windows `test --all-features` failed to link with three unresolved externals: cef_v8_backing_store_create cef_v8_value_create_array_buffer_from_backing_store cef_component_updater_get 7712285 bumped the crate to `cef 150.0.0+150.0.10` but left the workflow exporting CEF 144.0.7, so the binary lacked symbols the crate references. The build metadata after `+` is the CEF version to export -- this used to line up (`cef 144.1.0+144.0.7` <-> `--version 144.0.7`, see 8f71640). macOS and Linux bind these lazily, which is why only Windows broke. Hoist the version into a `CEF_VERSION` env var so the export and the cache key cannot drift again. The key previously hashed the workspace Cargo.toml, which does not contain the CEF version, so a bump would silently reuse a stale CEF; it is now keyed on the version itself. test-android had two latent bugs that only trigger once caches are warm, which is why it passed on the first run of this branch and failed on the second: - "Restore Android Symlinks" hardcoded the `linux-x86_64` toolchain path but also runs on macOS, where it is `darwin-x86_64`. The workaround therefore never applied on macOS and the symlinks restored from the NDK cache stayed broken, failing the link with `.../bin/clang: No such file or directory`. - `mv cargo-tauri.exe $HOME/.cargo/bin` failed with "The file exists" once rust-cache restored a cargo bin dir already containing it. PowerShell's Move-Item does not overwrite without -Force. Validated with actionlint (no new findings) and prettier.
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.
Summary
The
clippyand the threetest (…, --all-features, all)jobs fail ontap/watch-resourcesfor reasons unrelated to any individual PR stacked on top of it (e.g. #3, #1). This fixes them at the source so the stacked PRs go green.Everything here is pre-existing breakage on the base branch — none of it comes from the stacked PRs.
1. MSRV — 3 failing
test --all-featuresjobsThe CEF work pulls in dependencies requiring a newer toolchain than the pinned
1.88:Both arrive through this branch only —
cargo-platformviacargo_metadata 0.23(a dependency of thecefcrate) andsmol_strviawinit 0.31.0-beta.2. Neither is ondev.1.88→1.90, matching the MSRV already adopted upstream ondev(feat: bump MSRV to 1.90 tauri-apps/tauri#13221). Clearssmol_str@0.3.6.cargo-platformto0.3.2(MSRV 1.88) inCargo.lock—0.3.3needs 1.91, so the bump alone is not enough.Only the lockfile is pinned; no manifest constraint is added, so the pin lifts naturally once the MSRV moves past 1.91.
2.
spectacannot build on stableWith the toolchain raised, compilation gets further and hits
error[E0658]: use of unstable library feature debug_closure_helpers. This branch resolvedspectato2.0.0-rc.25; pinned back to2.0.0-rc.20to matchdev, which pins it for exactly this reason (tauri-apps#15305).3. CEF version mismatch — Windows link failure
Windows failed with three unresolved externals (
cef_v8_backing_store_create,cef_v8_value_create_array_buffer_from_backing_store,cef_component_updater_get).771228574bumped the crate tocef 150.0.0+150.0.10but left the workflow exporting CEF 144.0.7, so the downloaded binary lacked symbols the crate references. The build metadata after+is the version to export — this used to line up (cef 144.1.0+144.0.7↔--version 144.0.7, see8f7164025). macOS and Linux bind these lazily, which is why only Windows broke.The version is now a
CEF_VERSIONenv var so the export and cache key cannot drift again. The key previously hashed the workspaceCargo.toml, which does not contain the CEF version — a bump would silently reuse a stale CEF. It is now keyed on the version itself.4. Two genuine breakages under
--all-featuresmanager/webview.rscalledtauri_utils::html2::parse, which does not exist. Thehtml2migration renamed it toparse_docand renders viaDocument::html(); the merge in69732d852kept the old call while adopting the new module path. Restored to matchdev.check_get_url_cefomitted the macOS/iOS-gatedon_web_content_process_terminateargument, sowith_handlerswas called with a shifted argument list on Apple targets. Now matches itscheck_get_url_wrysibling.5.
test-android— two latent bugs that only bite on warm cachesThis workflow passed on the first run of this branch and failed on the second. Both causes are cache-dependent:
linux-x86_64toolchain path but also runs on macOS, where it isdarwin-x86_64. The workaround never applied on macOS, so symlinks restored from the NDK cache stayed broken →.../bin/clang: No such file or directory.mv cargo-tauri.exe $HOME/.cargo/binfailed with "The file exists" once rust-cache restored a cargo bin dir already containing it. PowerShell'sMove-Itemdoes not overwrite without-Force.6. Clippy
Lints reported by current stable (the lint job uses
@stable), all mechanical and behaviour-preserving:question_marktauri-utils/src/acl/manifest.rsmanual_filtertauri-cliaclcapability/new.rs,permission/new.rsuseless_borrows_in_formattingtauri-clibuiltin_dev_server.rs,flock.rs,desktop.rslet_and_returntauri/src/scope/fs.rsredundant_closuretauri/src/ipc/authority.rs(5×)while_let_on_iteratortauri-cli/src/helpers/pbxproj.rstoo_many_argumentstauri-cli/src/cef/macos_dev.rsTwo are in code CI does not lint — the clippy job runs on Linux only — but which fail
cargo clippylocally on macOS: the dmg bundler andcef/macos_dev.rs. Included socargo clippy --all-targets --all-featuresis clean on macOS too.The
examples/apiCEF DevTools block is additionally gated onnot(test): undercfg(test)the runtime isMockRuntime, which does not exposeon_dev_tools_protocol/send_dev_tools_message.Verification
Both originally-failing jobs were reproduced in their real environments rather than approximated.
Clippy — reproduced in an
ubuntu:24.04container on rustc/clippy 1.97.1, the same OS and toolchain as CI, running the identical command:MSRV / tests — same command as the failing
test tauristep:rustc 1.90.0 is not supported by the following package: cargo-platform@0.3.3 requires rustc 1.91Also:
cargo fmt --all -- --checkclean,cargo test -p tauri-utils --all-features --lib→ 54 passed. Confirmed green on CI:clippy,rustfmt, and the Linux and macOS--all-featuresjobs.Workflow edits validated with
actionlint(no new findings) andprettier. The CEF and Android fixes are workflow-only and can only be exercised on CI.Notes
.changes/msrv-1.90.mdalready exists ondevand will arrive when this branch is next synced; a duplicate here would only create a merge conflict.devmerge.tap/watch-resourcesis 15 commits behinddevand a full merge conflicts in 8 files (config.rs,config.schema.json, severalCargo.tomls). These targeted fixes avoid that; the sync is worth doing separately.benchis failing independently. It failed on every run of this branch including the first, is nightly-only, and is unrelated to these changes.acl-testshas a pre-existing snapshot failure (has_metacharsdrift). It reproduces on a cleantap/watch-resourcescheckout and that crate is not covered by the failing CI jobs, so it is left alone.