Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

[feature/damAnalyzer] Remove reflection access patterns from tests - #2444

Merged
vitek-karas merged 5 commits into
dotnet:feature/damAnalyzerfrom
vitek-karas:RemoveReflectionAccessFromTests
Dec 15, 2021
Merged

vitek-karas merged 5 commits into
dotnet:feature/damAnalyzerfrom
vitek-karas:RemoveReflectionAccessFromTests

Conversation

@vitek-karas

Copy link
Copy Markdown
Member

Removes the RecodnizedReflectionAccessPattern and UnrecognizedReflectionAccessPattern attributes and all of the infrastructure for it.

In the tests this is replaced by:

  • ExpectedNoWarning on the test level which makes sure we don't produce unexpected warnings (basically equivalent to RecognizedReflecitonAccessPattern.
  • ExpectedWarning to mark the places where warning should be generated - direct replacement for UnrecognizedReflectionAccessPattern.

This change also removes some of the test-private helpers and replaces it with the DataFlowTypeExtensions helpers.

This is mostly a mechanical change.

This is part of the work to remove reflection access patterns from everywhere - in order to make the data flow logic sharable with the analyzer.

@vitek-karas
vitek-karas requested a review from tlakollo December 14, 2021 19:42
@vitek-karas vitek-karas self-assigned this Dec 14, 2021
@vitek-karas vitek-karas changed the title Remove reflection access patterns from tests [feature/damAnalyzer] Remove reflection access patterns from tests Dec 14, 2021
@vitek-karas
vitek-karas merged commit 6e28469 into dotnet:feature/damAnalyzer Dec 15, 2021
@vitek-karas
vitek-karas deleted the RemoveReflectionAccessFromTests branch December 15, 2021 18:42
@sbomer sbomer mentioned this pull request Jan 13, 2022
4 tasks done
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
…otnet/linker#2444)

Removes the `RecodnizedReflectionAccessPattern` and `UnrecognizedReflectionAccessPattern` attributes and all of the infrastructure for it.

In the tests this is replaced by:
* `ExpectedNoWarning` on the test level which makes sure we don't produce unexpected warnings (basically equivalent to `RecognizedReflecitonAccessPattern`.
* `ExpectedWarning` to mark the places where warning should be generated - direct replacement for `UnrecognizedReflectionAccessPattern`.

This change also removes some of the test-private helpers and replaces it with the `DataFlowTypeExtensions` helpers.

This is mostly a mechanical change.

This is part of the work to remove reflection access patterns from everywhere - in order to make the data flow logic sharable with the analyzer.

Commit migrated from dotnet/linker@6e28469
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants