Fix/all targets - #1382
Fix/all targets#1382ErwanLegrand wants to merge 4 commits into
Conversation
WASAPI does not use the helper, so gating it on `target_os = "windows"` alone left it compiled but unused on Windows without ASIO or JACK, tripping `dead_code` under `-D warnings`. CI only ran `--all-features`, where ASIO consumes it, so this stayed hidden. Mirror the consuming backends' own module gates.
The module has not compiled since the 0.19 API changes: it was missing the `CallbackInfo` and trait imports, still constructed `SampleRate` as a tuple struct, and passed `&StreamConfig` where the config is now taken by value. CI never compiled it because clippy did not run `--all-targets`. Unverified on a device: iOS has no CI runner, so this is a compile fix only.
|
Let me fix those conflicts... |
|
What do you think about checking both the default feature set and all features? This adds three additional jobs, but it catches issues which aren't caught otherwise. |
The sender was only ever reassigned: the value captured by the listener thread is never read, so `unused_assignments` fires on stable 1.94.1 and the macOS clippy rows fail under `-D warnings`. The leading underscore silences `unused_variables`, not `unused_assignments`. Take the sender out to shut the previous listener down, and swap the replacement in with `mem::replace`, dropping the displaced sender.
The clippy job denied warnings but ran only `--all-features` without `--all-targets`, so lints in test and example bodies went unchecked and regressions that appear only under the default feature set slipped through. Lint `--all-targets`, add default-feature rows for each host platform, and use `--workspace` instead of the deprecated `--all` alias. - Only rows that build ASIO need the SDK, so the setup step is gated on `--all-features` rather than on any non-empty feature list. Closes RustAudio#1375
84de1f4 to
61a18fb
Compare
Yes, that's what we should normally do, ensuring we don't do anything double when we don't mean to. |
|
As I remember, CI was running clippy only with all features enabled, never with the default set I noticed that when working on a branch to add support for WASAPI exclusive mode, a while back. (I need this for realtime effects processing.) CI was green, but just running Possibly, this is the only class of bugs CI misses by not running clippy with the default feature set? |
|
I agree clippy should be OK for both default features and all features. |
|
OK. This PR is an attempt at checking exactly this. |
Fix CI so that clippy runs with all features enabled and with just the default set. Also, add
--all-targets.Some issues were found while running this. This PR also fixes these.
Fixes #1375