ci(rust): run clippy on the first-party Rust crates - #557
Conversation
|
Standing release PR: #456 · 15 packages queued · open 39d 11h 22m · ✅ ready to merge Release Preview — 17 packages
These changes will be added to the release PR (#456) when merged: Changelog@wdio/dioxus-bridge 1.0.0-next.3 → 1.0.0-next.4
@wdio/dioxus-service 1.0.0-next.3 → 1.0.0-next.4
wdio-dioxus-driver 1.0.0-next.3 → 1.0.0-next.4
wdio-dioxus-embedded-driver 1.0.0-next.3 → 1.0.0-next.4
@wdio/tauri-plugin 1.2.0 → 1.2.1
@wdio/tauri-service 1.2.0 → 1.2.1
tauri-plugin-wdio-webdriver 1.2.0 → 1.2.1
@wdio/flutter-service 1.0.0-next.1 → 1.0.0-next.2
wdio_flutter N/A → 0.1.1
@wdio/electrobun-service 0.1.0 → 0.1.1
@wdio/electron-service 10.1.0 → 10.1.1
@wdio/native-cdp-bridge 1.0.0 → 1.0.1
@wdio/native-core 1.0.0 → 1.0.1
@wdio/native-mobile-core 1.0.0 → 1.0.1
@wdio/native-spy 1.1.0 → 1.1.1
@wdio/native-types 2.4.0 → 2.4.1
@wdio/native-utils 2.5.0 → 2.5.1
@wdio/react-native-service 1.0.0-next.0 → 1.0.0-next.1
After merge — predicted release
Updated automatically by ReleaseKit |
|
| Filename | Overview |
|---|---|
| .github/workflows/_ci-rust-clippy.reusable.yml | Adds the reusable, multi-crate Clippy workflow with Linux dependency installation and aggregated crate failure handling. |
| .github/workflows/ci.yml | Wires platform-specific Clippy jobs into change detection and the required CI status aggregator, resolving the prior bypass. |
| packages/tauri-plugin-webdriver/src/platform/executor.rs | Replaces MSRV-incompatible integer casts with checked timestamp conversions. |
| packages/tauri-plugin/src/commands.rs | Applies behavior-preserving Clippy-driven simplifications to JavaScript parsing conditions. |
| packages/dioxus-bridge/src/invoke.rs | Simplifies a test handler closure without changing its result. |
| packages/tauri-plugin-webdriver/src/platform/macos.rs | Removes a redundant string allocation while formatting macOS errors. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Detect changed packages] --> B{Tauri changed?}
A --> C{Dioxus changed?}
B -->|Yes| D[Clippy: Linux]
B -->|Yes| E[Clippy: Windows]
B -->|Yes| F[Clippy: macOS ARM]
C -->|Yes| G[Clippy: Linux]
D --> H[CI status aggregator]
E --> H
F --> H
G --> H
H --> I[CI / Required]
Reviews (3): Last reviewed commit: "ci(rust): gate the required status on th..." | Re-trigger Greptile
Greptile review on #557. `ci-status` publishes the `CI / Required` commit status that branch protection evaluates, and it derives that from `needs.*.result`. The four new clippy jobs were absent from its `needs`, so a clippy failure would have left `CI / Required` green and let lint violations merge — the checks were advisory in practice. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CsgeivZCqduTQmWK55zqiT
Nothing in CI lints Rust. The only Rust compiled today is the dioxus crates on Linux plus the fixture app builds, so tauri-plugin-webdriver's `#[cfg]`-gated platform modules are each seen by one runner and never under lint. Violations accumulated unnoticed, and both open Tauri contributor PRs had to pass `-A` flags to get a clean local clippy run. Add _ci-rust-clippy.reusable.yml running `cargo clippy --all-targets -D warnings` over a caller-supplied crate list, wired into ci.yml as the tauri crates on all three OSes (a single-OS run would leave two of macos.rs / windows.rs / linux.rs unlinted) and the dioxus crates on Linux, matching the v1 scope of the existing build-dioxus-crates job. Both gated on the same detect-changes outputs as their sibling build jobs. Fix the six violations this surfaces: - executor.rs used `cast_unsigned`/`cast_signed` for cookie expiry. These are stable since 1.87 against a declared MSRV of 1.77, so this was a real `clippy::incompatible_msrv` violation, not lint noise — switch to `try_from`. - macos.rs passed `.to_string()` on a Display type into `format!`. - commands.rs folded a nested `if` into its match guard and swapped `map_or` for `is_some_and`. - dioxus-bridge passed a redundant `|args| Ok(args)` closure. `cargo fmt` is deliberately not added: 18 files in tauri-plugin-webdriver alone already drift, so it needs a repo-wide reformat that would conflict with the open PRs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CsgeivZCqduTQmWK55zqiT
Greptile review on #557. `ci-status` publishes the `CI / Required` commit status that branch protection evaluates, and it derives that from `needs.*.result`. The four new clippy jobs were absent from its `needs`, so a clippy failure would have left `CI / Required` green and let lint violations merge — the checks were advisory in practice. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CsgeivZCqduTQmWK55zqiT
b18122b to
e7458a4
Compare
…rrences New transient class F9 (RN Android new-arch native-find). Broaden F2 (Electron E2E teardown/hang) to cover Linux — same signature (`Timeout reached` after a healthy session through `deleteSession()`) on `E2E - Electron [Linux] - builder`. Occurrences: #558 run 30722562323 (F9/F1/F4/F3); #557 run 30722561443 (F2 Electron Linux builder + F1 Tauri macOS standalone + F4 Flutter iOS). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKc4JHZKXfyqCiiU4C2b7V
…rrences New transient class F9 (RN Android new-arch native-find) — recurs across job retries (#558 run 30722562323 attempts 1-2 both failed; green on main). Broaden F2 (Electron E2E teardown/hang) to cover Linux — same signature (`Timeout reached` after a healthy session through `deleteSession()`) on `E2E - Electron [Linux] - builder`. Occurrences: #558 run 30722562323 (F9 att.1-2 / F1 / F4 / F3); #557 run 30722561443 (F2 Electron Linux builder + F1 Tauri macOS standalone + F4 Flutter iOS). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKc4JHZKXfyqCiiU4C2b7V
…rrences New transient class F9 (RN Android new-arch native-find) — recurs across job retries (#558 attempts 1-2). Broaden F2 (Electron E2E teardown/hang) to Linux — same signature on `E2E - Electron [Linux] - builder`. F4 (Flutter iOS) also seen recurring across job retries (#557 attempts 1-2). Occurrences: #558 run 30722562323 (F9 att.1-2 / F1 / F4 / F3); #557 run 30722561443 (F2 Electron Linux builder + F1 Tauri macOS standalone + F4 Flutter iOS att.1-2). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKc4JHZKXfyqCiiU4C2b7V
…ccurrences New transient classes: F9 (RN Android new-arch native-find), F10 (unit/integration suite hang, SIGINT/130 — green on main), F11 (RN iOS E2E intermittent spec fail). Broaden F2 (Electron E2E teardown/hang) to Linux. Occurrences: #558 run 30722562323 (F9 att.1-2 / F1 / F4 / F3); #557 run 30722561443 (F2 Electron Linux + F1 Tauri macOS + F4 Flutter iOS att.1-2); #519 run 30723856572 (F9 RN Android + F11 RN iOS old-arch + F10 Unit macOS-Intel + F3 Dioxus Fedora). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKc4JHZKXfyqCiiU4C2b7V
…ccurrences New transient classes: F9 (RN Android new-arch native-find), F10 (unit/integration suite hang, SIGINT/130 — green on main), F11 (RN iOS E2E intermittent spec fail). Broaden F2 (Electron E2E teardown/hang) to Linux. F1/F4/F9 all seen surviving across job retries. Occurrences: #558 run 30722562323 (F9 att.1-2 / F1 / F4 / F3); #557 run 30722561443 (F2 Electron Linux + F1 Tauri macOS standalone att.1-3 + F4 Flutter iOS att.1-2); #519 run 30723856572 (F9 RN Android + F11 RN iOS old-arch + F10 Unit macOS-Intel + F3 Dioxus). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKc4JHZKXfyqCiiU4C2b7V
…ccurrences New transient classes: F9 (RN Android new-arch native-find), F10 (unit/integration suite hang, SIGINT/130 — green on main), F11 (RN iOS E2E intermittent spec fail). Broaden F2 (Electron E2E teardown/hang) to Linux. F1/F4/F9 seen surviving retries; F1 on #557 took 5 attempts to clear (~1-in-5 clear rate un-pumped). Occurrences: #558 run 30722562323 (F9 att.1-2 / F1 / F4 / F3); #557 run 30722561443 (F2 Electron Linux + F1 Tauri macOS standalone att.1-4 cleared att.5 + F4 Flutter att.1-2); #519 run 30723856572 (F9 RN Android + F11 RN iOS old-arch + F10 Unit macOS-Intel + F3 Dioxus). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKc4JHZKXfyqCiiU4C2b7V
#564) * docs(ci): add F9/F10/F11 + broaden F2 to Linux + log #557/#558/#519 occurrences New transient classes: F9 (RN Android new-arch native-find), F10 (unit/integration suite hang, SIGINT/130 — green on main), F11 (RN iOS E2E intermittent spec fail). Broaden F2 (Electron E2E teardown/hang) to Linux. F1/F4/F9 seen surviving retries; F1 on #557 took 5 attempts to clear (~1-in-5 clear rate un-pumped). Occurrences: #558 run 30722562323 (F9 att.1-2 / F1 / F4 / F3); #557 run 30722561443 (F2 Electron Linux + F1 Tauri macOS standalone att.1-4 cleared att.5 + F4 Flutter att.1-2); #519 run 30723856572 (F9 RN Android + F11 RN iOS old-arch + F10 Unit macOS-Intel + F3 Dioxus). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKc4JHZKXfyqCiiU4C2b7V * docs(flake-log): log run 30730874052 (#528) — F1/F2/F4/F9 Dependabot setup-node 6→7 bump drew all four top app-flake classes in one full-matrix run: F1 (Tauri macOS standalone), F2 (Electron Linux script teardown), F4 (Flutter iOS exit-1), F9 (RN Android new-arch native find). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKc4JHZKXfyqCiiU4C2b7V * docs(flake-log): annotate run 30730874052 retry outcomes Attempt-2 retry: F1 (Tauri macOS) and F2 (Electron Linux) cleared, while F4 (Flutter iOS) and F9 (RN Android new-arch) recurred on both attempts — the two stubborn-on-retry classes on this run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKc4JHZKXfyqCiiU4C2b7V * docs(flake-log): log #537 run 30750927964 — F1 ×2 (embedded, pre-#553) + F3 Fedora Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKc4JHZKXfyqCiiU4C2b7V * docs(flake-log): #537 run 30750927964 full retry history — F1 standalone recurred att.1–4, cleared att.5 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKc4JHZKXfyqCiiU4C2b7V --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Description
Nothing in CI lints Rust today. The only Rust that gets compiled is the dioxus crates on Linux (
_ci-build-dioxus-crates.reusable.yml) plus the fixture app builds — sotauri-plugin-webdriver's#[cfg]-gated platform modules are each seen by exactly one runner and never under lint, andpackages/tauri-pluginis only ever compiled transitively.The result is that violations accumulate on
mainunnoticed. Both open Tauri contributor PRs hit them and had to work around them with-Aflags to get a clean local clippy run (#527 used-A clippy::incompatible-msrv; #532 fixed one of them as a drive-by). That's friction we're pushing onto contributors for no reason.What this adds
_ci-rust-clippy.reusable.ymlrunscargo clippy --all-targets -- -D warningsover a caller-supplied, newline-separated crate list, wired intoci.ymlas:clippy-tauri-crates-linuxtauri-plugin,tauri-plugin-webdriverrun_tauriclippy-tauri-crates-windowsrun_tauriclippy-tauri-crates-macos-armrun_tauriclippy-dioxus-crates-linuxdioxus-bridge,dioxus-driver,dioxus-embedded-driverrun_dioxusThe tauri crates run on all three OSes on purpose — a single-OS run would leave two of
macos.rs/windows.rs/linux.rsunlinted, which is precisely how the current violations survived. Dioxus is Linux-only, matching the documented v1 scope of the existingbuild-dioxus-crates-linuxjob. Both are gated on the samedetect-changesoutputs as their sibling build jobs (packages/tauri-plugin*→tauri,packages/dioxus-*→dioxus, per the path classifier).Violations fixed
Six, across three crates:
executor.rs—cast_unsigned/cast_signedfor cookie expiry. These are stable since 1.87 against the crate's declaredrust-version = "1.77", so this was a genuine MSRV violation rather than lint noise. Switched totry_from.macos.rs—.to_string()on aDisplaytype passed intoformat!.commands.rs(×2) — nestediffolded into its match guard;map_or(false, …)→is_some_and(…)(stable since 1.70, matching that crate's MSRV).dioxus-bridge/invoke.rs— redundant|args| Ok(args)closure.The
commands.rsguard collapse is behaviour-preserving: when the added conditions fail the arm falls through to_ => {}, which is what the innerifdid by falling out of the block.Deliberately not included
cargo fmt --check. 18 files intauri-plugin-webdriveralone already drift from rustfmt onmain, so wiring it up needs a repo-wide reformat first — which would conflict with both open Tauri PRs. Worth doing as its own PR once those land.Also not included:
cargo testfor the tauri plugin crates. Those 17 unit tests currently never run in CI either, andclippy --all-targetsalready pays the compile cost, so it's a cheap follow-up — happy to fold it in here if you'd prefer.Type of Change
Scope
scope:tauri- Tauri service and pluginTesting
Locally on macOS, all five crates pass the exact command CI runs:
cargo test— tauri-plugin-webdriver 15 passed, dioxus-bridge 24 passed, tauri-plugin has no testsactionlint .github/workflows/*.yml— clean (thelintjob runs this)Only the macOS leg is verified locally. The Linux and Windows legs compile code paths I can't reach from here (
linux.rs,windows.rs), so this PR's own CI run is the real check — don't merge until those three jobs are green.🤖 Generated with Claude Code
https://claude.ai/code/session_01CsgeivZCqduTQmWK55zqiT