Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 29, 2025

Backport of #120181 to release/10.0

/cc @stephentoub

Customer Impact

  • Customer reported
  • Found internally

Any warnings-as-errors or errors in code emitted by the JSON source generator breaks the build. This in particular impacts the use of [Experimental] in types that show up anywhere in the type graph of types used with the JSON source generator, because the source generator emits use of those [Experimental] members, which then results in error diagnostics blocking compilation. This in turn makes it really hard for developers (including the .NET team) to experiment in stable assemblies.

Regression

  • Yes
  • No

Testing

Manually used the new build in a project and validated that [Experimental] use goes from producing errors to building successfully.

Risk

Low. The change is simply suppressing more diagnostics in the source generated code, replacing:

#nullable disable warnings
#pragma warning disable CS0612, CS0618

which suppresses all nullability related warnings and several obsoletion-related warnings, with:

#pragma warning disable

which suppresses all diagnostics.

This is only done in release builds of the source generator, so that in debug builds we still get the same information about possible issues to be addressed.

@artl93 artl93 added the Servicing-consider Issue for next servicing release review label Sep 29, 2025
Copy link
Member

@artl93 artl93 left a comment

Choose a reason for hiding this comment

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

GA

@stephentoub stephentoub added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 29, 2025
@stephentoub
Copy link
Member

Approved offline for servicing.

I've marked it as no-merge temporarily though as we discuss a few things.

@stephentoub stephentoub closed this Oct 8, 2025
@jkotas jkotas deleted the backport/pr-120181-to-release/10.0 branch October 8, 2025 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants