Repository navigation
ci: Opt the workspace into clippy's await-holding lints (RUST-019, #2715) - #2716
Merged
Merged
Conversation
) `[workspace.lints.clippy]` opted in to wildcard_imports and enum_glob_use only, so the three pedantic lints that catch a lock or RefCell guard living across an `.await` never fired. A guard held across an await makes the future !Send or deadlocks the runtime, and it surfaces as a hang, not a diagnostic. The workspace has no async code yet (the only `.await` text match under `rust/` is the test helper `await_parked`), which is exactly when to set them: the first async caller cannot land the bug. No clippy.toml entry is needed -- the std guard types are covered by the built-in lints, and the workspace registers no blocking wrapper type. ci-lint precheck: 24 violation(s), 488 approved exception(s), 31 needs_review -> 21 violation(s), 488 approved exception(s), 31 needs_review (RUST-019 gone).
zackees
commented
Oct 28, 2026
zackees
left a comment
Member
Author
There was a problem hiding this comment.
Coordinator review — verified, queueing.
- Diff is the three pedantic await-holding lints denied under
[workspace.lints.clippy]plus a comment naming the failure mode; every member already carries[lints] workspace = true, so no member file needs to change. - RED → GREEN is honest:
ci-lint precheckon master reportsRUST-019 (3)forCargo.tomlwith no exception, and the branch's report has no RUST-019 section and nothing else moved. - The lint names are real for the pinned toolchain —
-D warningsoversoldr cargo clippy --locked --workspace --all-targetswould turn anunknown_lintswarning into an error, so a green run is evidence the three are known and unfired. - No
docs/features.mdline and no newci/test_*.pypin are both correct: lint configuration is not user-visible, andci-lint precheckis already the rule's checker.
Checks: CI Gate ✅, Fast Gate ⚡, Tier 2 Linux lanes all green, mergeStateStatus CLEAN.
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.
Closes #2715.
[workspace.lints.clippy]opted the workspace in towildcard_importsandenum_glob_useonly, soci-lint's RUST-019 findings onCargo.toml(three violations, no exception) meant the awaits-holding lints were unset:clippy::await_holding_lock,clippy::await_holding_refcell_ref,clippy::await_holding_invalid_type.Why
A
Mutex/RefCellguard that lives across an.awaitmakes the future!Sendor deadlocks the runtime when the executor polls the task again on the same thread — and it surfaces as a hang, not a diagnostic. All three are pedantic lints, so they never fire unless the workspace opts in.The workspace has no async code today (
git grep '\.await' -- rust ':!rust/tools'matches only the test helperawait_parkedinrust/obs-util/tests/platform/nix_inhibit.rs), which is exactly when to turn them on: the first async caller then cannot land the bug.Change
Cargo.toml:await_holding_lock,await_holding_refcell_refandawait_holding_invalid_typeset to"deny"under[workspace.lints.clippy], with a comment naming the failure mode and infra: Cargo.toml leaves clippy::await_holding_lock / await_holding_refcell_ref / await_holding_invalid_type unset (RUST-019) #2715.rust/*/Cargo.tomleach carry[lints] workspace = true), so no member file changes.clippy.tomlawait-holding-invalid-typesentry: that registration is for a project's own blocking wrapper type, and the workspace has none — the std guard types are covered by the two built-in lints.RED → GREEN
RED, on
origin/master(d82a994e4):GREEN, this branch (
328b781e6):grep -c RUST-019on the second report is0and the rule's section is gone; nothing else moved.The repo's own clippy lane command passes on the branch with the lints denied — no guard-across-await exists to fire:
(That run also proves the three lint names are known to the pinned toolchain: an unknown lint is an
unknown_lintswarning, which-D warningsturns into an error.)Not applicable
docs/features.mdline: a lint configuration change has no user-visible behaviour.ci/test_*.pypin:ci-lint precheckis the rule's own checker and runs offline againstCargo.toml; the repo's tests are stdlib-only hand parsers of workflow YAML, and a second parser of[workspace.lints.clippy]would duplicate the rule rather than pin behaviour this repo owns.Refs #2715.