Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Aug 18, 2025

Backport of #118755 to release/10.0-rc1

/cc @sbomer

Customer Impact

  • Customer reported
  • Found internally

A customer used our tooling while working on MVVM Toolkit, and was surprised to see a new trim warning show up during publish for an implicit constructor. The warning was expected to be caught by the analyzer.

Code like the following doesn't produce analyzer trim warnings even though it is calling an annotated constructor. But when publishing the app there is a warning B()'s call to A().

B b = new(); // No warnings here either

abstract class A
{
    [RequiresUnreferencedCode("blah")]
    public A()
    {
    }
}

// No warnings here
class B : A
{
}

Regression

  • Yes
  • No

Testing

This was a known analysis hole with existing analyzer test coverage. Updated the expected warning behavior for the analyzer tests.

Risk

Low. May introduce new build-time warnings for improperly annotated libraries, but the new warning is there for parity with publish-time warnings so this is mostly fixing a user experience problem (not a new class of warnings).

@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label Aug 18, 2025
@sbomer sbomer requested a review from a team August 18, 2025 17:54
@sbomer sbomer added the Servicing-consider Issue for next servicing release review label Aug 18, 2025
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

lgtm. please get a code review. we will take for consideration in 10 rc1

@artl93 artl93 added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 19, 2025
@ViktorHofer
Copy link
Member

If this one should still go into RC1, please merge asap.

@jeffschwMSFT jeffschwMSFT merged commit cbfd526 into release/10.0-rc1 Aug 21, 2025
115 of 120 checks passed
@jkotas jkotas deleted the backport/pr-118755-to-release/10.0-rc1 branch August 28, 2025 21:05
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

linkable-framework Issues associated with delivering a linker friendly framework Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants