Skip to content

Investigate PR 128315 analyzer-suppression follow-up; keep remaining trim suppressions#128332

Closed
Copilot wants to merge 1 commit into
mainfrom
copilot/remove-stale-trim-analyzer-suppressions
Closed

Investigate PR 128315 analyzer-suppression follow-up; keep remaining trim suppressions#128332
Copilot wants to merge 1 commit into
mainfrom
copilot/remove-stale-trim-analyzer-suppressions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 18, 2026

PR #128315 removed EnableAotAnalyzer=false from multiple test projects; this follow-up checked whether corresponding EnableTrimAnalyzer=false entries were now stale in the same files. The only pattern matches still fail under trim analysis, so this change remains intentionally no-op (no project-file edits kept).

  • Scope reviewed

    • Enumerated all files touched by PR Remove stale test analyzer suppressions #128315 where EnableAotAnalyzer=false was removed.
    • Identified the subset where EnableTrimAnalyzer=false still exists alongside that prior AOT-removal pattern:
      • System.Net.Http.WinHttpHandler.Unit.Tests.csproj
      • System.Net.Http.Functional.Tests.csproj
      • System.Security.Cryptography.Cng.Tests.csproj
      • System.Security.Cryptography.Csp.Tests.csproj
  • Outcome

    • Attempted removal of the four remaining trim suppressions.
    • Targeted project test builds surfaced trim-analyzer diagnostics in each affected project, so removals were reverted.
    • Net result: no source or project changes retained, with current suppressions confirmed as still required.
<!-- still required in current tree -->
<EnableTrimAnalyzer>false</EnableTrimAnalyzer>
Original prompt

The user referenced PR #128315 and asked to remove stale trim analyzer suppressions in the files touched by that PR.

Task:

  1. Inspect PR Remove stale test analyzer suppressions #128315 in dotnet/runtime and identify every project/test file where the PR removed an EnableAotAnalyzer suppression (e.g. removed <EnableAotAnalyzer>false</EnableAotAnalyzer>).
  2. In those same files, remove the corresponding stale trim analyzer suppression:
    <EnableTrimAnalyzer>false</EnableTrimAnalyzer>
    Do not remove unrelated analyzer settings in files that were not part of this pattern.
  3. Build/run the relevant tests or projects to verify these files still build without failures after removing the trim analyzer suppressions. At minimum, run the most targeted build/test commands available for the affected library test projects; if broader test execution is too expensive, document what was run and why.
  4. Keep the change focused: remove only the stale EnableTrimAnalyzer suppressions that correspond to files where EnableAotAnalyzer=false was removed in PR Remove stale test analyzer suppressions #128315.

Context from the referenced diff:

  • In src/libraries/System.Security.Cryptography.Csp/tests/System.Security.Cryptography.Csp.Tests.csproj, PR Remove stale test analyzer suppressions #128315 removed <EnableAotAnalyzer>false</EnableAotAnalyzer> while leaving <EnableTrimAnalyzer>false</EnableTrimAnalyzer> immediately above it. The goal is to check whether that trim suppression can also be removed, and do the same for any other files in the PR with the same AOT suppression removal pattern.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Can you kick off an agent to remove the false from the files in this PR that have removed the EnableAOTAnalyzer=false and see if this tests still build without failures? Seems like if we can remove the EnableAotAnalyzer=false we should be able to remove the EnableTrimAnalyzer

Assistant: I’ve kicked off the agent for dotnet/runtime to make that focused change and validate the relevant builds/tests.

This pull request was created from Copilot chat.

Copilot AI review requested due to automatic review settings May 18, 2026 16:53
Copilot AI review requested due to automatic review settings May 18, 2026 16:53
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Copilot AI changed the title [WIP] Remove stale trim analyzer suppressions from modified files Investigate PR 128315 analyzer-suppression follow-up; keep remaining trim suppressions May 18, 2026
Copilot AI requested a review from jtschuster May 18, 2026 17:21
@jtschuster jtschuster closed this May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants