Skip to content

Enforce warnings as errors for reflection-free acceptance builds - #10449

Merged
Evangelink merged 1 commit into
mainfrom
dev/amauryleve/reflection-free-warnings-as-errors
Aug 5, 2026
Merged

Enforce warnings as errors for reflection-free acceptance builds#10449
Evangelink merged 1 commit into
mainfrom
dev/amauryleve/reflection-free-warnings-as-errors

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

  • promote compiler and MSBuild warnings to errors in ReflectionFree acceptance builds
  • make the reflection-free mode own this contract instead of relying on the shared CLI default
  • exercise the mode-specific warning settings in regular acceptance asset builds

Validation

  • built Microsoft.Testing.TestInfrastructure.csproj with 0 warnings and 0 errors
  • ran build.cmd -c Release -pack with 0 warnings and 0 errors
  • ran MSTest.Acceptance.IntegrationTests.InconclusiveTests: 24 passed, including all 8 AotSourceGeneration cases

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 17e64d8a-9615-4707-bfe2-bc1e4d614589
Copilot AI balanced review requested due to automatic review settings August 5, 2026 09:53

Copilot AI 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.

🟢 Ready to approve

The focused changes correctly preserve existing behavior while making reflection-free warning enforcement explicit.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Enforces warning-free reflection-free acceptance builds through mode-specific MSBuild arguments.

Changes:

  • Adds compiler and MSBuild warning promotion for AotSourceGeneration.
  • Disables the shared warning default to verify the mode-owned contract.
File summaries
File Description
AcceptanceSourceGen.cs Adds reflection-free warning promotion arguments.
TestAssetFixtureBase.cs Exercises mode-specific warning settings during asset builds.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@Evangelink
Evangelink enabled auto-merge (squash) August 5, 2026 09:57
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🧵 Parallel-safety audit — PR #10449

Nothing audited here touches process-global state, shared filesystem paths, or [ResourceLock] / [DoNotParallelize] declarations. Nothing to flag for parallel-safety.

The two changed files (AcceptanceSourceGen.cs, TestAssetFixtureBase.cs in test/Utilities/Microsoft.Testing.TestInfrastructure) are shared build-argument/test-asset helper infrastructure, not test classes: no [TestMethod]/[DataTestMethod], no [TestInitialize]/[ClassInitialize]/[AssemblyInitialize] lifecycle members, no [ResourceLock]/[DoNotParallelize]/[Parallelize] declarations, and no assembly parallelization configuration were added, removed, or modified. The changes only add a conditional warningsAsErrorsArg string to an existing MSBuild-argument builder and a warnAsError parameter to an existing DotnetCli.RunAsync call — no new mutation of environment variables, current directory, culture, console state, or shared static fields, and no new/changed filesystem paths.

No test assembly's parallelization state changed in this PR, so no scope table applies.

Re-run with /parallel-audit.

🤖 Automated content by GitHub Copilot. Generated by the Parallel-safety audit on PR (on open / sync) workflow. · auto · 33.4 AIC · ⌖ 0.665 AIC · ⊞ 24.7K · [◷]( · )

@Evangelink Evangelink added the state/needs-review Awaiting review from the team. label Aug 5, 2026
@Evangelink
Evangelink merged commit 140977a into main Aug 5, 2026
34 checks passed
@Evangelink
Evangelink deleted the dev/amauryleve/reflection-free-warnings-as-errors branch August 5, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-review Awaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants