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

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

Conversation

vitek-karas
Copy link
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 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
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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants