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 @@ -3,6 +3,7 @@

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Tracing;

/// <summary>
Expand Down Expand Up @@ -34,6 +35,7 @@ private class TestEventSource : EventSource
public TestEventSource() : base(EventSourceSettings.EtwSelfDescribingEventFormat) { }

[Event(1)]
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(TestSubData))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this worked with ILLink because the property was accessed in IL (both the getter and the setter).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, calling the getter or setter keeps the property right now.

The property could still be removed in theory since what is used is just getter/setter method, but illink never does it right now (it could do it if DebuggerSupport=false, since it makes debugging sub-optimal). It's what I called "lucky IL trimming implementation details".

public void LogData(TestData data)
{
Write("LogData", data);
Expand Down
1 change: 0 additions & 1 deletion src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,6 @@
Condition="'$(TestPackages)' == 'true'" />

<!-- We need to go over these disablements: https://github.com/dotnet/runtime/issues/101228 -->
<ProjectExclusions Condition="'$(RunNativeAotTestApps)' == 'true'" Include="$(MSBuildThisFileDirectory)\System.Diagnostics.Tracing\tests\TrimmingTests\System.Diagnostics.Tracing.TrimmingTests.proj" />
<ProjectExclusions Condition="'$(RunNativeAotTestApps)' == 'true'" Include="$(MSBuildThisFileDirectory)\System.Linq.Queryable\tests\TrimmingTests\System.Linq.Queryable.TrimmingTests.proj" />
<ProjectExclusions Condition="'$(RunNativeAotTestApps)' == 'true'" Include="$(MSBuildThisFileDirectory)\System.Private.Xml.Linq\tests\TrimmingTests\System.Xml.Linq.TrimmingTests.proj" />
<ProjectExclusions Condition="'$(RunNativeAotTestApps)' == 'true'" Include="$(MSBuildThisFileDirectory)\System.Net.Http\tests\TrimmingTests\System.Net.Http.TrimmingTests.proj" />
Expand Down