Skip to content

Mark RenderFragment serialization API as experimental - #68230

Merged
dariatiurina merged 1 commit into
dotnet:mainfrom
dariatiurina:make-rf-serialization-experimental
Aug 6, 2026
Merged

dariatiurina merged 1 commit into
dotnet:mainfrom
dariatiurina:make-rf-serialization-experimental

Conversation

@dariatiurina

@dariatiurina dariatiurina commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Mark RenderFragment serialization API as experimental

Marks the public RenderTreeBuilder.SetAttributeValue API as experimental.

Description

Per the API review for #66828, the RenderTreeBuilder.SetAttributeValue(int frameIndex, object? value) method should ship as experimental. It is a low-level infrastructure API, and marking it experimental allows its shape to change in the future without a breaking change.

The API remains public and functionally unchanged; callers outside the framework now receive the ASP0032 experimental diagnostic and must explicitly opt in.

Breaking Changes

None. SetAttributeValue is an unshipped (preview) API. Consumers who reference it will now see the ASP0032 experimental warning and need to acknowledge it, but there is no source or behavioral break for shipped APIs.

Fixes #66828

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.

Pull request overview

This pull request marks the RenderTreeBuilder.SetAttributeValue API (used to support RenderFragment serialization across render mode boundaries) as experimental, so external consumers get an explicit diagnostic when they call it.

Changes:

  • Annotate RenderTreeBuilder.SetAttributeValue(int frameIndex, object? value) with [Experimental("ASP0032", ...)].
  • Suppress the new ASP0032 warning at the internal call site in RenderFragmentCapture.
  • Extend the diagnostics documentation to include ASP0032.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Components/Shared/src/RenderFragmentCapture.cs Suppresses ASP0032 around the internal usage of SetAttributeValue.
src/Components/Components/src/Rendering/RenderTreeBuilder.cs Marks SetAttributeValue as experimental via ExperimentalAttribute using diagnostic ID ASP0032.
docs/list-of-diagnostics.md Updates the documented ASP diagnostic range and adds the ASP0032 entry.

@dariatiurina dariatiurina self-assigned this Aug 5, 2026
@dariatiurina
dariatiurina marked this pull request as ready for review August 5, 2026 14:29
@dariatiurina
dariatiurina requested a review from a team as a code owner August 5, 2026 14:29
@dariatiurina
dariatiurina requested a review from ilonatommy August 5, 2026 14:29
@ilonatommy ilonatommy added this to the 11.0-rc1 milestone Aug 5, 2026
@ilonatommy ilonatommy added area-blazor Includes: Blazor, Razor Components feature-rendering Features dealing with how blazor renders components labels Aug 5, 2026
@dariatiurina
dariatiurina merged commit 968922c into dotnet:main Aug 6, 2026
46 checks passed
@dariatiurina
dariatiurina deleted the make-rf-serialization-experimental branch September 29, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components feature-rendering Features dealing with how blazor renders components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API Proposal: RenderFragment serialization

3 participants