Skip to content

Mark ComNativeDescriptor-related code as RequiresUnreferencedCode - #11165

Merged
sbomer merged 1 commit into
dotnet:mainfrom
sbomer:comNativeDescriptor
Apr 8, 2024
Merged

sbomer merged 1 commit into
dotnet:mainfrom
sbomer:comNativeDescriptor

Conversation

@sbomer

@sbomer sbomer commented Apr 5, 2024 •

Copy link
Copy Markdown
Member

Addresses some warnings in a winforms app by propagating RUC to code related to ComNativeDescriptor.
The app still produces one related warning for dotnet/runtime's reference (by name) to ComNativeDescriptor, which I plan to address with a feature switch. The code path is not needed in the trimmed test app.

Microsoft Reviewers: Open in CodeFlow

@sbomer
sbomer requested review from JeremyKuhne and LakshanF April 5, 2024 00:09
@sbomer
sbomer requested a review from a team as a code owner April 5, 2024 00:09
@codecov

codecov Bot commented Apr 5, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.44632%. Comparing base (9890da9) to head (7138aa9).
Report is 26 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #11165         +/-   ##
===================================================
+ Coverage   73.39570%   73.44632%   +0.05061%     
===================================================
  Files           3097        3098          +1     
  Lines         632131      632225         +94     
  Branches       46652       46653          +1     
===================================================
+ Hits          463957      464346        +389     
+ Misses        164791      164478        -313     
- Partials        3383        3401         +18     
Flag Coverage Δ
Debug 73.44632% <ø> (+0.05061%) ⬆️
integration 18.36087% <ø> (+0.14981%) ⬆️
production 46.91082% <ø> (+0.10222%) ⬆️
test 94.98599% <ø> (+0.00332%) ⬆️
unit 43.88113% <ø> (+0.02143%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@LakshanF LakshanF left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looking forward to the feature switch work to enable apps that don't use these types to be warning free.

sbomer added a commit to dotnet/runtime that referenced this pull request Apr 8, 2024
Together with dotnet/winforms#11165, this removes some
COM-related trim warnings in a winforms test app by disabling
support for browsing COM objects via the TypeDescriptor APIs.
@sbomer
sbomer merged commit 0e3964e into dotnet:main Apr 8, 2024
@dotnet-policy-service dotnet-policy-service Bot added this to the 9.0 Preview4 milestone Apr 8, 2024
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
Together with dotnet/winforms#11165, this removes some
COM-related trim warnings in a winforms test app by disabling
support for browsing COM objects via the TypeDescriptor APIs.
@github-actions github-actions Bot locked and limited conversation to collaborators May 10, 2024
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