Repository navigation
base red: acpmux's login-env watcher test module is Linux-only, so macOS has no unused import (clippy, after #33406) - #33690
Conversation
…re it is used (clippy unused import on Linux, after #33406) #33406 (3534e7b) made Linux watch through inotify, so the only Watcher::watch call is in the non-Linux source(). The file-level 'use notify::Watcher as _;' is unused on Linux, and clippy -D warnings refuses it there: 'clippy (changed cmux-tui packages)' is red for every acpmux change. The import now has the same cfg as its one use.
…its import is used (clippy unused super::* on macOS) With the module's one test Linux-only, the macOS test build kept an empty 'mod tests' whose 'use super::*' is unused: clippy -D warnings fails the acpmux lib test build on macOS. The cfg moves from the test to the module.
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
web and size checks: green Shipped in:
|
|
Review (independent subagent): SHIP at f4614c2 Read the PR body, the diff and
|
|
Found 6 test failures on Blacksmith runners: Failures
|
…pmux-watch-import-33406 # Conflicts: # cmux-tui/crates/acpmux/src/login_env/watch.rs
|
Review (independent subagent): SHIP at 675e27d Read the PR body and comments, the diff, and
Note: the PR has the |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Fixes the macOS half of the
clippy (changed cmux-tui packages)red from #33406 (3534e7b):error: unused import: super::*atacpmux/src/login_env/watch.rs:229in the acpmux lib test build on macOS. The Linux half (unused import: notify::Watcher) was fixed by #33664 while this PR was open; this PR now has only the macOS fix.Takes back #33406: only the test module's cfg changes; no code changes.
Cause
The test module's one test is Linux-only (
#[cfg(target_os = "linux")]), so the macOS test build has an emptymod testswhoseuse super::*;is unused, and clippy-D warningsrefuses it.Fix
The test module gets
#[cfg(all(test, target_os = "linux"))], and the cfg on its one test moves to the module. No test is lost on any OS.Red at the base, green at the head
Command (fleet):
cmux-ci run --class isolated --script scripts/ci/cmux-tui-rust-check.sh --arg clippy --os macos --ref SHAunused import: super::*). Green at the earlier head f4614c2: step 337633afdd8bfc8675e1a086.Changelog
none
Observed / Not run
Observed: the clippy steps above; rustfmt
--checkpassed.Not run: the Linux test itself (its cfg only moved; CI runs it).