Skip to content

Resolve required keyword order for partial reactive properties. - #240

Merged
glennawatson merged 2 commits into
mainfrom
FixForRequiredKeyword
May 27, 2025
Merged

Resolve required keyword order for partial reactive properties.#240
glennawatson merged 2 commits into
mainfrom
FixForRequiredKeyword

Conversation

@ChrisPulman

Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

Fixes #237

What is the current behavior?

#237

What is the new behavior?

Documentation Updates:

  • Updated README.md to document new [Reactive] attribute features, including initializer support, SetModifier, Inheritance, and UseRequired options. These new features enhance flexibility in defining reactive properties.

New Features for Property Generation:

  • Added support for required partial properties in InternalTestViewModel, allowing developers to define required properties with the [Reactive] attribute.

Source Generator Enhancements:

  • Updated ReactiveGenerator.Execute.cs to use propertySymbol.IsRequired for determining if a property is required, replacing the previous approach of relying on attribute arguments. This ensures better alignment with C# language features.
  • Adjusted property syntax generation in ReactiveGenerator.Execute.cs to reorder modifiers for consistency, placing UseRequired before partialModifier.

What might this PR break?

Previous releases would have failed to compile, therefore no expected changes

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

@glennawatson
glennawatson merged commit 70f7ba3 into main May 27, 2025
@glennawatson
glennawatson deleted the FixForRequiredKeyword branch May 27, 2025 11:11
@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: required partial value type property emits code doesn't compile

2 participants