Skip to content

ci: unblock clippy and MSRV test jobs - #4

Closed
ryok90 wants to merge 3 commits into
tap/watch-resourcesfrom
fix/ci-msrv-and-clippy
Closed

ci: unblock clippy and MSRV test jobs#4
ryok90 wants to merge 3 commits into
tap/watch-resourcesfrom
fix/ci-msrv-and-clippy

Conversation

@ryok90

@ryok90 ryok90 commented Aug 12, 2026

Copy link
Copy Markdown

Summary

The clippy and the three test (…, --all-features, all) jobs fail on tap/watch-resources for 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-features jobs

The CEF work pulls in dependencies requiring a newer toolchain than the pinned 1.88:

error: rustc 1.88.0 is not supported by the following packages:
  cargo-platform@0.3.3 requires rustc 1.91
  smol_str@0.3.6 requires rustc 1.89

Both arrive through this branch only — cargo-platform via cargo_metadata 0.23 (a dependency of the cef crate) and smol_str via winit 0.31.0-beta.2. Neither is on dev.

  • Bump 1.881.90, matching the MSRV already adopted upstream on dev (feat: bump MSRV to 1.90 tauri-apps/tauri#13221). Clears smol_str@0.3.6.
  • Pin cargo-platform to 0.3.2 (MSRV 1.88) in Cargo.lock0.3.3 needs 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. specta cannot build on stable

With the toolchain raised, compilation gets further and hits error[E0658]: use of unstable library feature debug_closure_helpers. This branch resolved specta to 2.0.0-rc.25; pinned back to 2.0.0-rc.20 to match dev, 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).

771228574 bumped the crate to cef 150.0.0+150.0.10 but 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, see 8f7164025). macOS and Linux bind these lazily, which is why only Windows broke.

The version is now a CEF_VERSION env var so the export and cache key cannot drift again. The key previously hashed the workspace Cargo.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-features

  • manager/webview.rs called tauri_utils::html2::parse, which does not exist. The html2 migration renamed it to parse_doc and renders via Document::html(); the merge in 69732d852 kept the old call while adopting the new module path. Restored to match dev.
  • check_get_url_cef omitted the macOS/iOS-gated on_web_content_process_terminate argument, so with_handlers was called with a shifted argument list on Apple targets. Now matches its check_get_url_wry sibling.

5. test-android — two latent bugs that only bite on warm caches

This workflow passed on the first run of this branch and failed on the second. Both causes are cache-dependent:

  • "Restore Android Symlinks" hardcoded the linux-x86_64 toolchain path but also runs on macOS, where it is darwin-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/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.

6. Clippy

Lints reported by current stable (the lint job uses @stable), all mechanical and behaviour-preserving:

Lint Location
question_mark tauri-utils/src/acl/manifest.rs
manual_filter tauri-cli acl capability/new.rs, permission/new.rs
useless_borrows_in_formatting tauri-cli builtin_dev_server.rs, flock.rs, desktop.rs
let_and_return tauri/src/scope/fs.rs
redundant_closure tauri/src/ipc/authority.rs (5×)
while_let_on_iterator tauri-cli/src/helpers/pbxproj.rs
too_many_arguments tauri-cli/src/cef/macos_dev.rs

Two 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. Included so cargo clippy --all-targets --all-features is clean on macOS too.

The examples/api CEF DevTools block is additionally gated on not(test): under cfg(test) the runtime is MockRuntime, which does not expose on_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.04 container on rustc/clippy 1.97.1, the same OS and toolchain as CI, running the identical command:

cargo clippy --all-targets --all-features -- -D warnings
→ Finished `dev` profile [unoptimized + debuginfo] target(s) in 58.72s

MSRV / tests — same command as the failing test tauri step:

cargo +1.90 test --all-features --manifest-path crates/tauri/Cargo.toml --locked
  • before the lockfile pin → rustc 1.90.0 is not supported by the following package: cargo-platform@0.3.3 requires rustc 1.91
  • after → 67 lib tests + 123 doc tests pass

Also: cargo fmt --all -- --check clean, cargo test -p tauri-utils --all-features --lib → 54 passed. Confirmed green on CI: clippy, rustfmt, and the Linux and macOS --all-features jobs.

Workflow edits validated with actionlint (no new findings) and prettier. The CEF and Android fixes are workflow-only and can only be exercised on CI.

Notes

  • No changefile. .changes/msrv-1.90.md already exists on dev and will arrive when this branch is next synced; a duplicate here would only create a merge conflict.
  • Not a dev merge. tap/watch-resources is 15 commits behind dev and a full merge conflicts in 8 files (config.rs, config.schema.json, several Cargo.tomls). These targeted fixes avoid that; the sync is worth doing separately.
  • bench is failing independently. It failed on every run of this branch including the first, is nightly-only, and is unrelated to these changes.
  • acl-tests has a pre-existing snapshot failure (has_metachars drift). It reproduces on a clean tap/watch-resources checkout and that crate is not covered by the failing CI jobs, so it is left alone.

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.
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown

Package Changes Through 30eccf8

There 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 Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-utils 2.9.3 2.9.4
tauri-bundler 2.9.4 2.10.0
tauri-runtime 2.11.3 2.11.4
tauri-runtime-wry 2.11.3 2.11.4
tauri-runtime-cef 0.1.0 0.1.1
tauri-codegen 2.6.3 2.6.4
tauri-macros 2.6.3 2.6.4
tauri-plugin 2.6.3 2.6.4
tauri-build 2.6.3 2.6.4
tauri 2.11.3 2.11.4
@tauri-apps/cli 2.11.4 2.11.5
tauri-cli 2.11.4 2.11.5

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

ryok90 added 2 commits August 11, 2026 23:22
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.
@ryok90 ryok90 closed this Aug 12, 2026
@ryok90
ryok90 deleted the fix/ci-msrv-and-clippy branch August 12, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant