roslyn
roslyn copied to clipboard
Test Plan for Runtime Async
Test plan for runtime-generated async state machines
Runtime open issues: https://github.com/dotnet/runtime/issues/109632 Runtime specification: https://github.com/dotnet/runtime/blob/main/docs/design/specs/runtime-async.md Compiler implementation plan: https://github.com/dotnet/roslyn/blob/main/docs/compilers/CSharp/Runtime%20Async%20Design.md
Included in .NET 10 (feature in preview)
- [x] turning feature on (see
IsRuntimeAsyncEnabledIn)- [x] presence of required
AsyncHelpersAPIs in corlib - [x] honor
RuntimeAsyncMethodGenerationAttributeattribute for override - [x] check presence of feature flag
runtime-async=on - [x] check for return type
- [x] presence of required
- [ ] codegen for async methods
- [x] set method flag
MethodImplOptions.Async - [x] calls optimized with
Await- [x] selection of appropriate helper
- [x] calls using
AwaitAwaiter/UnsafeAwaitAwaiter - [x]
awaitincatch/finally - [x]
await using - [x]
await foreach - [x] ref local lifting (https://github.com/dotnet/roslyn/issues/79763)
- [x] set method flag
- methods of validation
- [x] direct IL verification
- [x] verifier (caught some issues, although verification rules not yet updated to understand return value expectations: https://github.com/dotnet/runtime/issues/118042)
- [x] block unsupported scenarios for .NET 10 RC1
- [x] disallow application of
MethodImplOptions.Asyncin source - [x] public APIs
- [x] IOperation (no impact)
- [x] GetAwaitExpressionInfo
- [x] consider removing or downgrading the "no await" warning (related issue) https://github.com/dotnet/roslyn/pull/80144
- [ ] analyzer work for
RequiresPreviewFeatures(honor attribute on helper APIs)
Post-.NET 10
- [ ] PDBs/symbols for debugging (https://github.com/dotnet/roslyn/issues/79793)
- sequence points
- [ ] instrumentation
- [ ] dynamic (https://github.com/dotnet/roslyn/issues/79762)
- [ ] disallow directly calling
MethodImplOptions.Asyncmethods in some cases? - [ ] disallow directly calling
AsyncHelpershelper methods? - [ ] manual smoke testing of various scenarios (debugging, EE, EnC)
- [x] execution (pending availability of new runtime, https://github.com/dotnet/roslyn/issues/79791)
- [ ] ensure that every async test also covers runtime-async
- [ ] remove
RuntimeAsyncMethodGenerationAttributeandDOTNET_RuntimeAsynconce feature is stable - [ ] replace feature flag with a real switch and make the SDK set it by default
- [ ] use real
MethodImplOptions.Asyncflag (https://github.com/dotnet/roslyn/issues/79792) - [ ] partner validation (driven by runtime team)
- [ ] follow-up on public announcement
- [ ] codegen for async iterator methods (notes)
Async-iterators
- [ ] codegen https://github.com/dotnet/roslyn/pull/81314
- [ ] debug info/symbols
- [ ] EnC