-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] Address non-JSON trimming warnings #14636
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
[dotnet] Address non-JSON trimming warnings #14636
Conversation
|
Michael Render seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
| { 85, new DomainType(typeof(V85.V85Domains)) }, | ||
| }; | ||
|
|
||
| /// <summary>Workaround for trimming.</summary> |
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.
This is the kind of workaround necessary when using a Type as a generic argument, which requires trimming annotations. Hope this is acceptable.
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
This improves the story for trimming/AOT using Selenium, specifically addressing non-JSON related warnings.
Motivation and Context
In furtherance of #14480
Types of changes
Checklist
PR Type
Enhancement
Description
DevToolsDomainsclass to support AOT compatibility by introducing aDomainTypestruct and addingDynamicallyAccessedMembersattributes.JsonEnumMemberConverterto handle AOT scenarios with conditional compilation and dynamic access attributes.TrimmingAttributes.cscontaining custom attributes to manage dynamic and unreferenced code for AOT compatibility.WebDriver.csprojfile to include a conditional property for AOT compatibility, preparing for future .NET versions.Changes walkthrough 📝
DevToolsDomains.cs
Enhance DevToolsDomains for AOT compatibility and trimmingdotnet/src/webdriver/DevTools/DevToolsDomains.cs
DomainTypestruct to handle trimming.DynamicallyAccessedMembersattribute for trimming support.DomainTypeinstead ofType.JsonEnumMemberConverter.cs
Improve JsonEnumMemberConverter for AOT compatibilitydotnet/src/webdriver/DevTools/Json/JsonEnumMemberConverter.cs
DynamicallyAccessedMembersattribute for enum converter.TrimmingAttributes.cs
Introduce custom trimming attributes for AOT supportdotnet/src/webdriver/Internal/TrimmingAttributes.cs
handling.
WebDriver.csproj
Prepare WebDriver project for AOT compatibilitydotnet/src/webdriver/WebDriver.csproj