-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Remove ValidationContext.MemberType #112996
Conversation
This property is unused, and is only ever set. It has an UnconditionalSuppressMessage suppression, which makes it hard to tell if there is a trimming issue here or not. Since this code isn't used, it is better to just remove it to make the trim analysis of this class easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR removes the unused property MemberType from ValidationContext to simplify trim analysis.
- Removed the assignment to MemberType from the Validator's CreateValidationContext call.
- Removed the MemberType property definition and its backing field from ValidationContext.
Reviewed Changes
File | Description |
---|---|
Validator.cs | Removed usage of the unused MemberType property from the validation context. |
ValidationContext.cs | Deleted the unused MemberType property and its backing field to simplify trimming analysis. |
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it builds, LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully no-one using it through the reflection.
If they are.... they shouldn't be. 😄 |
Testing something: This pull request focuses on the removal of the The most important changes include: Removal of
|
It's been a while since I contributed here. I'm not sure what I'm supposed to do to be able to merge this. Do I rerun the failed legs? The one leg appears to be stuck. |
/ba-g unrelated numeric test failure |
Generally you look at the Build Analysis leg. It correctly identified known test and infra failures, and then called out one unknown test failure, but that failure was unrelated, in System.Numerics. I used the /ba-g command ("build analysis - green") to tell it we're good, and that unblocked the ability to merge, which you're good to do. |
Thanks for the help @stephentoub! |
This property is unused, and is only ever set. It has an UnconditionalSuppressMessage suppression, which makes it hard to tell if there is a trimming issue here or not.
Since this code isn't used, it is better to just remove it to make the trim analysis of this class easier.