Enforce ConfigureAwait(false) across shipped code#354
Merged
Conversation
Vulthil
force-pushed
the
chore/configureawait-sweep
branch
from
July 22, 2026 18:33
f269c3f to
c6d408c
Compare
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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.
Summary
samples/ keep the repo-wide disabled default from the root .editorconfig).
.ConfigureAwait(false)to every await in src/, then hand-fixes the spotsthe automatic fixer mangled (see Verification).
NOTE: stacked on #353 — its base is the comment-policy-sweep branch so this diff is
the single ConfigureAwait commit. It gets retargeted to main after that PR merges.
Verification
project with real unconfigured awaits raises zero CA2007 from any test file.
await using var x = expr.ConfigureAwait(false)where x's ownmembers were used afterward, since wrapping the disposable changes its static type to
ConfiguredAsyncDisposable. Hand-fixed ~15 locations by splitting into
var x = expr; await using var _ = x.ConfigureAwait(false);, preserving both the real type andthe configured disposal await. One ValueTask-coalescing expression surfaced new CA2012 +
IDE0047 diagnostics under the transformation; rewritten properly rather than suppressed.
passing on a clean run. An earlier run hit 4 failures under heavy parallel load; all 4 were
independently confirmed as pre-existing timing-sensitive flakes unrelated to this change via
isolated re-runs (each passed 100% standalone).
PublicAPI*.txt/CompatibilitySuppressions.xml: byte-identical (ConfigureAwait isimplementation-only).
dotnet pack -c Releasespot-run for two touched packages: both pack cleanly, no APICompatwarnings.
Backport to v1.0: no — convention sweep ships with the next release.