Conversation
d4b6d2c to
0a0124a
Compare
ae62411 to
fab8dd5
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces an initial experiment to evaluate .NET 11 “runtime-async” output and updates the ConfigureAwait weaver + test suite to handle the new compiler/runtime async pattern (AsyncHelpers-based) alongside existing state-machine rewriting.
Changes:
- Multi-target
AssemblyToProcessandTeststonet10.0+net11.0, enabling preview/runtime-async features fornet11.0. - Extend the weaver to detect/handle “compiler service” async (runtime-async) by rewriting
System.Runtime.CompilerServices.AsyncHelpers.Await(...)call sites. - Update/expand tests and verified IL baselines to cover ValueTask/runtime-async scenarios; update package versions and CI SDK installation.
Reviewed changes
Copilot reviewed 34 out of 35 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/xunit.runner.json | Disables xUnit parallelization for more deterministic runs. |
| Tests/Tests.csproj | Adds net10.0/net11.0, upgrades test packages, copies runner config. |
| Tests/ModuleWeaverTests.DecompileIssue1.Debug.DotNet.verified.txt | Updates verified IL baseline for new output/runtime changes. |
| Tests/ModuleWeaverTests.DecompileGenericMethod.Debug.DotNet.verified.txt | Updates verified IL baseline reflecting runtime-async patterns. |
| Tests/ModuleWeaverTests.DecompileGenericClass.Debug.DotNet.verified.txt | Updates verified IL baseline reflecting runtime-async/ValueTask changes. |
| Tests/ModuleWeaverTests.DecompileExample.Debug.Net.verified.txt | Updates verified IL baseline (Configured* awaiters, etc.). |
| Tests/ModuleWeaverTests.DecompileCatchAndFinally.Debug.Net.verified.txt | Updates verified IL baseline (Configured* awaiters, etc.). |
| Tests/ModuleWeaverTests.DecompileCatchAndFinally.Debug.DotNet.verified.txt | Updates verified IL baseline reflecting runtime-async patterns. |
| Tests/ModuleWeaverTests.cs | Adjusts test bootstrap for updated xUnit/Fody APIs. |
| Tests/MethodWithUsing.cs | Adds ValueTask variant test under #if NET. |
| Tests/MethodWithAttributeTests.cs | Adds ValueTask variant test under #if NET. |
| Tests/DoNotWeaveTests.cs | Adds ValueTask variant coverage under #if NET. |
| Tests/ClassWithAttributeTests.cs | Adds ValueTask variant coverage under #if NET. |
| Tests/CatchAndFinallyTests.cs | New test coverage for Catch/Finally scenarios + ValueTask variants. |
| global.json | Removes SDK pinning. |
| Directory.Build.props | Sets C# LangVersion to 13 and keeps common build settings. |
| ConfigureAwait/ConfigureAwait.csproj | Bumps Fody/FodyPackaging versions. |
| ConfigureAwait.sln.DotSettings | Updates user dictionary entries (IDE settings). |
| ConfigureAwait.Fody/ModuleWeaver.cs | Adds runtime-async processing path and tightens method redirection rules. |
| ConfigureAwait.Fody/ModuleWeaver_TypeFinder.cs | Renames/refocuses type discovery to runtime-related types. |
| ConfigureAwait.Fody/ModuleWeaver_CompilerServices.cs | New IL rewriting for AsyncHelpers.Await(...)-based async (runtime-async). |
| ConfigureAwait.Fody/ConfigureAwait.Fody.csproj | Bumps FodyHelpers version. |
| ConfigureAwait.Fody/CecilExtensions.cs | Adds runtime-async detection helpers + refactors attribute checks. |
| AssemblyToProcess/MethodWithUsing.cs | Expands conditional compilation from NETCOREAPP2_0 to NET. |
| AssemblyToProcess/MethodWithAttribute.cs | Expands conditional compilation from NETCOREAPP2_0 to NET. |
| AssemblyToProcess/Issue1.cs | Updates ValueTask + nullable string usage for ReadLineAsync. |
| AssemblyToProcess/GenericIssue.cs | Expands conditional compilation from NETCOREAPP2_0 to NET. |
| AssemblyToProcess/FlagSynchronizationContext.cs | Formatting change (single-line base type). |
| AssemblyToProcess/Example.cs | Expands conditional compilation from NETCOREAPP2_0 to NET. |
| AssemblyToProcess/DoNotWeave.cs | Uses a non-trivial async path to avoid optimizations; adds helper Return10. |
| AssemblyToProcess/ClassWithAttribute.cs | Uses a non-trivial async path to avoid optimizations; adds helper Return10. |
| AssemblyToProcess/CatchAndFinally.cs | Expands conditional compilation from NETCOREAPP2_0 to NET and adds ValueTask methods. |
| AssemblyToProcess/AssemblyToProcess.csproj | Adds net10.0/net11.0; enables preview/runtime-async feature flags for net11.0. |
| appveyor.yml | Installs .NET 10 + .NET 11 preview SDKs explicitly (no global.json). |
Comments suppressed due to low confidence (1)
AssemblyToProcess/CatchAndFinally.cs:83
- The methods inside the
#if NETblock are indented an extra level compared to the rest of the class, which makes the file hard to read and looks accidental. Align the indentation of these method declarations with the other members in the class.
#if NET
public async Task Catch1_WithValueTask()
{
try
{
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 34 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
AssemblyToProcess/CatchAndFinally.cs:83
- The
#if NETblock is indented as if it were nested, but it’s at class scope. This inconsistent indentation makes the file harder to read and can obscure brace/region structure; align these method declarations with the rest of the class members.
#if NET
public async Task Catch1_WithValueTask()
{
try
{
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 34 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 95 out of 114 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
AssemblyToProcess/CatchAndFinally.cs:90
- Inside the
#if NETregion, the method declarations are indented by an extra level compared to the rest of the class, which makes the file inconsistent and harder to scan. Align the indentation of the NET-only methods with the surrounding methods in the class.
#if NET
public async Task Catch1_WithValueTask()
{
try
{
throw new NotImplementedException();
}
catch
{
await new ValueTask(Task.Delay(1));
}
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Support the new runtime-async feature of DotNet11