Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup CoreLib CompatibilitySuppressions #102363

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
32 changes: 0 additions & 32 deletions src/coreclr/System.Private.CoreLib/CompatibilitySuppressions.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ namespace System.Collections.Generic
** behavior.)
**
===========================================================*/
#if TYPE_LOADER_IMPLEMENTATION
[System.Runtime.CompilerServices.ForceDictionaryLookups]
#endif
jkotas marked this conversation as resolved.
Show resolved Hide resolved
internal class LowLevelDictionary<TKey, TValue> where TKey : IEquatable<TKey>
{
private const int DefaultSize = 17;
Expand Down Expand Up @@ -209,9 +206,6 @@ private int GetBucket(TKey key, int numBuckets = 0)
}


#if TYPE_LOADER_IMPLEMENTATION
[System.Runtime.CompilerServices.ForceDictionaryLookups]
#endif
private sealed class Entry
{
public TKey m_key;
Expand All @@ -223,9 +217,6 @@ private sealed class Entry
private int _numEntries;
private int _version;

#if TYPE_LOADER_IMPLEMENTATION
[System.Runtime.CompilerServices.ForceDictionaryLookups]
#endif
protected sealed class LowLevelDictEnumerator : IEnumerator<KeyValuePair<TKey, TValue>>
{
public LowLevelDictEnumerator(LowLevelDictionary<TKey, TValue> dict)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ namespace System.Collections.Generic
// Code size is smaller because only functions called will be in the binary.
// Use LowLevelListWithIList<T> for IList support
[DebuggerDisplay("Count = {Count}")]
#if TYPE_LOADER_IMPLEMENTATION
[System.Runtime.CompilerServices.ForceDictionaryLookups]
#endif
internal class LowLevelList<T>
{
private const int _defaultCapacity = 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -821,10 +821,6 @@
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:System.Reflection.RuntimeAssemblyName</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:System.Runtime.CompilerServices.ForceDictionaryLookupsAttribute</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:System.Runtime.CompilerServices.StaticClassConstructionContext</Target>
Expand All @@ -837,32 +833,4 @@
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.Threading.Lock.#ctor(System.Boolean)</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,``0):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute]</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,System.Diagnostics.Tracing.EventSourceOptions@,``0@):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute]</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,System.Diagnostics.Tracing.EventSourceOptions@,System.Guid@,System.Guid@,``0@):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute]</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>M:System.Diagnostics.Tracing.EventSource.WriteEvent(System.Int32,System.Object[]):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute]</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>M:System.Diagnostics.Tracing.EventSource.WriteEventCore(System.Int32,System.Int32,System.Diagnostics.Tracing.EventSource.EventData*):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute]</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>M:System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityId(System.Int32,System.Guid,System.Object[]):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute]</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP0015</DiagnosticId>
<Target>M:System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityIdCore(System.Int32,System.Guid*,System.Int32,System.Diagnostics.Tracing.EventSource.EventData*):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute]</Target>
</Suppression>
</Suppressions>
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
<type fullname="System.Runtime.CompilerServices.IntrinsicAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="System.Runtime.CompilerServices.ForceDictionaryLookupsAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="System.Runtime.CompilerServices.EagerStaticClassConstructionAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
</PropertyGroup>

<ItemGroup>
<ApiCompatSuppressionFile Include="$(MSBuildProjectDirectory)\CompatibilitySuppressions.xml" />
</ItemGroup>

<ItemGroup>
<ILLinkSubstitutionsXmls Include="ILLink\ILLink.Substitutions.xml" />
<ILLinkLinkAttributesXmls Include="ILLink\ILLink.LinkAttributes.xml" />
Expand Down Expand Up @@ -185,7 +189,6 @@
<Compile Include="System\Runtime\ControlledExecution.NativeAot.cs" />
<Compile Include="System\Runtime\DependentHandle.cs" />
<Compile Include="System\Runtime\CompilerServices\EagerStaticClassConstructionAttribute.cs" />
<Compile Include="System\Runtime\CompilerServices\ForceDictionaryLookupsAttribute.cs" />
<Compile Include="System\Runtime\CompilerServices\RuntimeFeature.NativeAot.cs" />
<Compile Include="System\Runtime\CompilerServices\StaticClassConstructionContext.cs" />
<Compile Include="System\Runtime\ExceptionIDs.cs" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
<DefineConstants Condition="'$(TargetsHaiku)' == 'true'">$(DefineConstants);TARGET_HAIKU</DefineConstants>
</PropertyGroup>
<ItemGroup>
<ApiCompatSuppressionFile Include="$(MSBuildProjectDirectory)\CompatibilitySuppressions.xml" />
<ApiCompatSuppressionFile Include="$(MSBuildThisFileDirectory)CompatibilitySuppressions.xml" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public partial class EventSource
{
private byte[]? m_providerMetadata;
private protected virtual ReadOnlySpan<byte> ProviderMetadata => m_providerMetadata;
private const string EventSourceRequiresUnreferenceMessage = "EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed.";
private const string EventSourceRequiresUnreferenceMessage = "EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type";
private const string EventSourceSuppressMessage = "Parameters to this method are primitive and are trimmer safe";

#if FEATURE_PERFTRACING
Expand Down
35 changes: 0 additions & 35 deletions src/mono/System.Private.CoreLib/CompatibilitySuppressions.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ internal static int TryGetHashCode(object? o)
}

[MethodImplAttribute(MethodImplOptions.InternalCall)]
[return: NotNullIfNotNull(nameof(obj))]
public static extern object? GetObjectValue(object? obj);

[RequiresUnreferencedCode("Trimmer can't guarantee existence of class constructor")]
Expand Down
Loading