Skip to content

Conversation

@mayaepps
Copy link
Contributor

Bug/issue #, if applicable: rdar://164748009

Summary

This updates some of the properties in the RenderNode tree to be mutable. A number of the top-level properties in RenderNode are already mutable, and making these additional properties mutable as well allows callers to modify these values.

To determine which properties it makes sense to make mutable, I followed the general pattern that if the property was created by information extracted from the source symbol (via symbol graphs), such as type information about a REST symbol, it shouldn’t be allowed to mutate. This information is unlikely to change without changing the shape of the symbol being documented. Similarly, properties that represent a unique identifier for the overall structure should also not be mutable.

Dependencies

N/A

Testing

Create a RenderNode object, and confirm that you can update one of the previously-immutable types in it, such as RenderBlockContent.Term.inlineContent without compilation errors.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • [n/a] Added tests
  • Ran the ./bin/test script and it succeeded
  • [n/a] Updated documentation if necessary

@mayaepps mayaepps requested a review from d-ronnqvist November 14, 2025 21:50
This updates some of the properties in the RenderNode tree to be mutable. A number of the top-level properties in RenderNode are already mutable, and making these additional properties mutable as well allows callers to modify these values.

rdar://164748009
@mayaepps mayaepps force-pushed the make-render-json-properties-mutable branch from acc15c9 to 28ffa0a Compare November 14, 2025 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant