Skip to content

Commit

Permalink
EventSource Feature switch type fix (#49432)
Browse files Browse the repository at this point in the history
* eh fix

* test change that inadvertently got checked in earlier

* Suppresses the trimmer warning on TypeAnalysis ctor

* Incorporating FB

* Update src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs

Co-authored-by: Eric Erhardt <[email protected]>

* Update src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs

Co-authored-by: Eric Erhardt <[email protected]>

* Update src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs

Co-authored-by: Eric Erhardt <[email protected]>

* Fix DynamicDependency as per PR feedback

* an earlier change got reverted

* fixed proj file netcore app condition check

* fixed NETCORE_ENGINEERING_TELEMETRY build failures

* fixeing another NETCORE_ENGINEERING_TELEMETRY build failures

* Adding RequiresUnreferencedCode to TypeAnalysis ctor instead of suppressing the warning to get FB, not fully fixed

* PR FB and suppressing warnings for safe calls

* propagated the warning all the way up

* CI build break fix for one file

* excluding NativeRTEventSrc from being build in a project

* Missed couple of supppressions on NativeRTEventSrc

* build break fixes

* EventSource feature switch type fix

Co-authored-by: Eric Erhardt <[email protected]>
  • Loading branch information
LakshanF and eerhardt authored Mar 10, 2021
1 parent a17716e commit cfd7820
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/coreclr/System.Private.CoreLib/src/ILLink/ILLinkTrim.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<method name="_RegisterFrozenSegment" />
<method name="_UnregisterFrozenSegment" />
</type>
<!-- The private Event methods are accessed by private reflection in the base EventSource class. -->
<type fullname="System.Diagnostics.Tracing.NativeRuntimeEventSource" />
<!-- Accessed via native code. -->
<type fullname="System.Runtime.InteropServices.ComTypes.IEnumerable" />
<type fullname="System.Runtime.InteropServices.ComTypes.IEnumerator" />
Expand All @@ -28,4 +26,10 @@
<method name=".ctor" />
</type>
</assembly>

<!-- The private Event methods are accessed by private reflection in the base EventSource class. -->
<assembly fullname="System.Private.CoreLib" feature="System.Diagnostics.Tracing.EventSource.IsSupported" featurevalue="true" featuredefault="true">
<type fullname="System.Diagnostics.Tracing.NativeRuntimeEventSource" />
</assembly>

</linker>
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" Version="$(MicrosoftCodeAnalysisCSharpVersion)" />
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETCoreApp'">
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\UnconditionalSuppressMessageAttribute.cs" />
</ItemGroup>

<ItemGroup>
<Compile Include="$(LibrariesProjectRoot)\System.Private.CoreLib\generators\EventSourceGenerator.cs" />
<Compile Include="$(LibrariesProjectRoot)\System.Private.CoreLib\generators\EventSourceGenerator.Emitter.cs" />
<Compile Include="$(LibrariesProjectRoot)\System.Private.CoreLib\generators\EventSourceGenerator.Parser.cs" />
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\UnconditionalSuppressMessageAttribute.cs" />
</ItemGroup>
</Project>

0 comments on commit cfd7820

Please sign in to comment.