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

Fix marking of annotations on complex type hierarchies #1972

Merged
merged 1 commit into from
Apr 17, 2021

Conversation

vitek-karas
Copy link
Member

The original code didn't take into account the fact that applying annotations can lead to marking of additional types which will interact with the cache data structure which is used to drive the application of annotations.

This change adds several new test cases with complex hierarchies and interactions and implements fixes in the code for those.

Fixes #1969

The original code didn't take into account the fact that applying annotations can lead to marking of additional types which will interact with the cache data structure which is used to drive the application of annotations.

This change adds several new test cases with complex hierarchies and interactions and implements fixes in the code for those.
@vitek-karas
Copy link
Member Author

@LakshanF

@tlakollo
Copy link
Contributor

I filled #1976 for scenarios that use DynamicDependency, I don't think this should gate this PR since a complete different scenario that has the old behavior of not keep enough stuff.

@marek-safar marek-safar merged commit 0e2e95e into dotnet:main Apr 17, 2021
agocke added a commit to agocke/runtime that referenced this pull request Apr 22, 2021
This fix is necessary for dotnet#51237 to
work properly. Otherwise, the linker may crash when analyzing certain patterns.
mmitche pushed a commit to dotnet/runtime that referenced this pull request Apr 22, 2021
* Include linker fix from dotnet/linker#1972

This fix is necessary for #51237 to
work properly. Otherwise, the linker may crash when analyzing certain patterns.

* Fix EventSource trimmer warning (#51237)

* 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

* Trimmer warning fix related to EventSource manifest creation

* incorporate fb

* fix build break in some configs

* comment feedback

* build break

Co-authored-by: Eric Erhardt <[email protected]>
(cherry picked from commit ddaa1c3)

Co-authored-by: Lakshan Fernando <[email protected]>
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
…#1972)

The original code didn't take into account the fact that applying annotations can lead to marking of additional types which will interact with the cache data structure which is used to drive the application of annotations.

This change adds several new test cases with complex hierarchies and interactions and implements fixes in the code for those.

Commit migrated from dotnet/linker@0e2e95e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_typesInDynamicallyAccessedMembersHierarchy might get modified from a readonly enumeration
4 participants