Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Threading;
using System.Threading.Tasks;
using System.Threading.Tasks.Sources;
Expand Down Expand Up @@ -288,7 +287,6 @@ private static unsafe Continuation AllocContinuationClass(Continuation prevConti
/// <param name="o"> Task or a ValueTaskNotifier whose completion we are awaiting.</param>
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
[RequiresPreviewFeatures]
private static void TransparentAwait(object o)
{
ref RuntimeAsyncAwaitState state = ref t_runtimeAsyncAwaitState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Threading;
using System.Threading.Tasks;

Expand All @@ -25,7 +24,6 @@ public static partial class AsyncHelpers
/// <param name="awaiter">The awaiter to await.</param>
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
[RequiresPreviewFeatures]
[StackTraceHidden]
public static void AwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaiter : INotifyCompletion
{
Expand All @@ -49,7 +47,6 @@ public static void AwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaiter : INo
/// <param name="awaiter">The awaiter to await.</param>
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.Async)]
[RequiresPreviewFeatures]
[StackTraceHidden]
public static void UnsafeAwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaiter : ICriticalNotifyCompletion
{
Expand All @@ -71,7 +68,6 @@ public static void UnsafeAwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaiter
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[RequiresPreviewFeatures]
[StackTraceHidden]
public static T Await<T>(Task<T> task)
{
Expand All @@ -91,7 +87,6 @@ public static T Await<T>(Task<T> task)
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[RequiresPreviewFeatures]
[StackTraceHidden]
public static void Await(Task task)
{
Expand All @@ -112,7 +107,6 @@ public static void Await(Task task)
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[RequiresPreviewFeatures]
[StackTraceHidden]
public static T Await<T>(ValueTask<T> task)
{
Expand All @@ -132,7 +126,6 @@ public static T Await<T>(ValueTask<T> task)
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[RequiresPreviewFeatures]
[StackTraceHidden]
public static void Await(ValueTask task)
{
Expand All @@ -152,7 +145,6 @@ public static void Await(ValueTask task)
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[RequiresPreviewFeatures]
[StackTraceHidden]
public static void Await(ConfiguredTaskAwaitable configuredAwaitable)
{
Expand All @@ -172,7 +164,6 @@ public static void Await(ConfiguredTaskAwaitable configuredAwaitable)
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[RequiresPreviewFeatures]
[StackTraceHidden]
public static void Await(ConfiguredValueTaskAwaitable configuredAwaitable)
{
Expand All @@ -193,7 +184,6 @@ public static void Await(ConfiguredValueTaskAwaitable configuredAwaitable)
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[RequiresPreviewFeatures]
[StackTraceHidden]
public static T Await<T>(ConfiguredTaskAwaitable<T> configuredAwaitable)
{
Expand All @@ -214,7 +204,6 @@ public static T Await<T>(ConfiguredTaskAwaitable<T> configuredAwaitable)
[Intrinsic]
[BypassReadyToRun]
[MethodImpl(MethodImplOptions.Async)]
[RequiresPreviewFeatures]
[StackTraceHidden]
public static T Await<T>(ConfiguredValueTaskAwaitable<T> configuredAwaitable)
{
Expand All @@ -227,26 +216,16 @@ public static T Await<T>(ConfiguredValueTaskAwaitable<T> configuredAwaitable)
return awaiter.GetResult();
}
#else
[RequiresPreviewFeatures]
public static void UnsafeAwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaiter : ICriticalNotifyCompletion { throw new NotImplementedException(); }
[RequiresPreviewFeatures]
public static void AwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaiter : INotifyCompletion { throw new NotImplementedException(); }
[RequiresPreviewFeatures]
public static void Await(System.Threading.Tasks.Task task) { throw new NotImplementedException(); }
[RequiresPreviewFeatures]
public static T Await<T>(System.Threading.Tasks.Task<T> task) { throw new NotImplementedException(); }
[RequiresPreviewFeatures]
public static void Await(System.Threading.Tasks.ValueTask task) { throw new NotImplementedException(); }
[RequiresPreviewFeatures]
public static T Await<T>(System.Threading.Tasks.ValueTask<T> task) { throw new NotImplementedException(); }
[RequiresPreviewFeatures]
public static void Await(System.Runtime.CompilerServices.ConfiguredTaskAwaitable configuredAwaitable) { throw new NotImplementedException(); }
[RequiresPreviewFeatures]
public static void Await(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable configuredAwaitable) { throw new NotImplementedException(); }
[RequiresPreviewFeatures]
public static T Await<T>(System.Runtime.CompilerServices.ConfiguredTaskAwaitable<T> configuredAwaitable) { throw new NotImplementedException(); }
[RequiresPreviewFeatures]
public static T Await<T>(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<T> configuredAwaitable) { throw new NotImplementedException(); }
public static void UnsafeAwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaiter : ICriticalNotifyCompletion { throw new PlatformNotSupportedException("Runtime Async is not supported on this platform."); }
public static void AwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaiter : INotifyCompletion { throw new PlatformNotSupportedException("Runtime Async is not supported on this platform."); }
public static void Await(System.Threading.Tasks.Task task) { throw new PlatformNotSupportedException("Runtime Async is not supported on this platform."); }
public static T Await<T>(System.Threading.Tasks.Task<T> task) { throw new PlatformNotSupportedException("Runtime Async is not supported on this platform."); }
public static void Await(System.Threading.Tasks.ValueTask task) { throw new PlatformNotSupportedException("Runtime Async is not supported on this platform."); }
public static T Await<T>(System.Threading.Tasks.ValueTask<T> task) { throw new PlatformNotSupportedException("Runtime Async is not supported on this platform."); }
public static void Await(System.Runtime.CompilerServices.ConfiguredTaskAwaitable configuredAwaitable) { throw new PlatformNotSupportedException("Runtime Async is not supported on this platform."); }
public static void Await(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable configuredAwaitable) { throw new PlatformNotSupportedException("Runtime Async is not supported on this platform."); }
public static T Await<T>(System.Runtime.CompilerServices.ConfiguredTaskAwaitable<T> configuredAwaitable) { throw new PlatformNotSupportedException("Runtime Async is not supported on this platform."); }
public static T Await<T>(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<T> configuredAwaitable) { throw new PlatformNotSupportedException("Runtime Async is not supported on this platform."); }
#endif
}
}
10 changes: 0 additions & 10 deletions src/libraries/System.Runtime/ref/System.Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14201,25 +14201,15 @@ public static void RunModuleConstructor(System.ModuleHandle module) { }
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static partial class AsyncHelpers
{
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]
public static void UnsafeAwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaiter : ICriticalNotifyCompletion { }
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]
public static void AwaitAwaiter<TAwaiter>(TAwaiter awaiter) where TAwaiter : INotifyCompletion { }
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]
public static void Await(System.Threading.Tasks.Task task) { throw null; }
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]
public static T Await<T>(System.Threading.Tasks.Task<T> task) { throw null; }
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]
public static void Await(System.Threading.Tasks.ValueTask task) { throw null; }
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]
public static T Await<T>(System.Threading.Tasks.ValueTask<T> task) { throw null; }
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]
public static void Await(System.Runtime.CompilerServices.ConfiguredTaskAwaitable configuredAwaitable) { throw null; }
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]
public static void Await(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable configuredAwaitable) { throw null; }
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]
public static T Await<T>(System.Runtime.CompilerServices.ConfiguredTaskAwaitable<T> configuredAwaitable) { throw null; }
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]
public static T Await<T>(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<T> configuredAwaitable) { throw null; }
public static void HandleAsyncEntryPoint(System.Threading.Tasks.Task task) { }
public static int HandleAsyncEntryPoint(System.Threading.Tasks.Task<int> task) { throw null; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0014</DiagnosticId>
<Target>T:System.Runtime.CompilerServices.AsyncHelpers:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]</Target>
<Target>M:System.Runtime.CompilerServices.AsyncHelpers.Await(System.Runtime.CompilerServices.ConfiguredTaskAwaitable):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>T:System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute:[T:System.AttributeUsageAttribute]</Target>
<Left>net10.0/System.Diagnostics.Tools.dll</Left>
<Right>net11.0/System.Diagnostics.Tools.dll</Right>
<DiagnosticId>CP0014</DiagnosticId>
<Target>M:System.Runtime.CompilerServices.AsyncHelpers.Await(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>T:System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute:[T:System.AttributeUsageAttribute]</Target>
<DiagnosticId>CP0014</DiagnosticId>
<Target>M:System.Runtime.CompilerServices.AsyncHelpers.Await(System.Threading.Tasks.Task):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>T:System.Diagnostics.StackTraceHiddenAttribute:[T:System.AttributeUsageAttribute]</Target>
<DiagnosticId>CP0014</DiagnosticId>
<Target>M:System.Runtime.CompilerServices.AsyncHelpers.Await(System.Threading.Tasks.ValueTask):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0014</DiagnosticId>
<Target>M:System.Runtime.CompilerServices.AsyncHelpers.Await``1(System.Runtime.CompilerServices.ConfiguredTaskAwaitable{``0}):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0014</DiagnosticId>
<Target>M:System.Runtime.CompilerServices.AsyncHelpers.Await``1(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable{``0}):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0014</DiagnosticId>
<Target>M:System.Runtime.CompilerServices.AsyncHelpers.Await``1(System.Threading.Tasks.Task{``0}):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0014</DiagnosticId>
<Target>M:System.Runtime.CompilerServices.AsyncHelpers.Await``1(System.Threading.Tasks.ValueTask{``0}):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0014</DiagnosticId>
<Target>M:System.Runtime.CompilerServices.AsyncHelpers.AwaitAwaiter``1(``0):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0014</DiagnosticId>
<Target>M:System.Runtime.CompilerServices.AsyncHelpers.UnsafeAwaitAwaiter``1(``0):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0014</DiagnosticId>
<Target>T:System.Runtime.CompilerServices.AsyncHelpers:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
Expand All @@ -31,10 +73,28 @@
<Left>net10.0/netstandard.dll</Left>
<Right>net11.0/netstandard.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>T:System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute:[T:System.AttributeUsageAttribute]</Target>
<Left>net10.0/System.Diagnostics.Tools.dll</Left>
<Right>net11.0/System.Diagnostics.Tools.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>T:System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute:[T:System.AttributeUsageAttribute]</Target>
<Left>net10.0/System.dll</Left>
<Right>net11.0/System.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>T:System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute:[T:System.AttributeUsageAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>T:System.Diagnostics.StackTraceHiddenAttribute:[T:System.AttributeUsageAttribute]</Target>
<Left>net10.0/System.Runtime.dll</Left>
<Right>net11.0/System.Runtime.dll</Right>
</Suppression>
</Suppressions>
1 change: 0 additions & 1 deletion src/tests/Interop/COM/RuntimeAsync/RuntimeAsync.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<PropertyGroup>
<!-- RequiresProcessIsolation required for CLRTestEnvironmentVariable -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<NoWarn>$(NoWarn);SYSLIB5007</NoWarn>
<Features>$(Features);runtime-async=on</Features>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/tests/async/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<PropertyGroup>
<RunAnalyzers>true</RunAnalyzers>
<NoWarn>$(NoWarn);xUnit1013;CS1998;SYSLIB5007</NoWarn>
<NoWarn>$(NoWarn);xUnit1013;CS1998</NoWarn>
<EnableNETAnalyzers>false</EnableNETAnalyzers>
<Features>$(Features);runtime-async=on</Features>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace Mono.Linker.Tests.Cases.DataFlow
{
[SkipKeptItemsValidation]
[SetupCompileArgument("/features:runtime-async=on")]
[SetupCompileArgument("/nowarn:SYSLIB5007")]
[ExpectedNoWarnings]
public class RuntimeAsyncMethods
{
Expand Down
Loading