Skip to content

Fix dependency property generator default value emission - #817

Merged
Arlodotexe merged 14 commits into
mainfrom
user/sergiopedri/dependency-property-generator-fixes
Sep 15, 2026
Merged

Arlodotexe merged 14 commits into
mainfrom
user/sergiopedri/dependency-property-generator-fixes

Conversation

@Sergio0694

Copy link
Copy Markdown
Member

Summary

Fixes two dependency property generator emitter defects:

  • Place cached property initializers after the property's closing brace, rather than inside the accessor block (CS1014).
  • Use a static lambda to adapt default factories whose return values require boxing (CS0407), while preserving direct method groups for object and reference returns.
  • Include the boxing requirement in the incremental model so factory return-type changes invalidate generated output.

Regression coverage

  • Compile and emit generated assemblies for cached int, int?, bool, and string properties, with and without initializers.
  • Cover value, nullable, object, reference, and constrained/unconstrained generic factory returns across all four property-changed callback combinations and generic/non-generic containing classes.
  • Cover incremental invalidation when a factory changes between int and object returns.
  • Correct the existing snapshots and add a dedicated emit assertion, preserving snapshot-only support for existing invalid-input fixtures.

Scope

Organized into two commits: emitter fixes with corrected snapshots, followed by compilation and incrementality regression coverage. No SDK, package, feed, project-file, or CsWinRT multi-targeting changes.

Sergio0694 and others added 2 commits September 9, 2026 09:11
Place cached property initializers after the property block and adapt default factories that require boxing while preserving reference-returning method groups.

Co-Authored-By: Copilot App <223556219+Copilot@users.noreply.github.com>
Emit generated assemblies for cached defaults and factory return types across generic containers and metadata callbacks. Cover incremental invalidation when factory return types change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Sergio0694
Sergio0694 force-pushed the user/sergiopedri/dependency-property-generator-fixes branch from fa210ef to 7da546b Compare September 9, 2026 16:11
Sergio0694 and others added 2 commits September 14, 2026 11:31
Place cached property initializers after the property block and adapt default factories that require boxing while preserving reference-returning method groups.

Co-Authored-By: Copilot App <223556219+Copilot@users.noreply.github.com>
Emit generated assemblies for cached defaults and factory return types across generic containers and metadata callbacks. Cover incremental invalidation when factory return types change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Sergio0694
Sergio0694 force-pushed the user/sergiopedri/dependency-property-generator-fixes branch from 7da546b to d905597 Compare September 14, 2026 18:31
@Sergio0694
Sergio0694 marked this pull request as ready for review September 14, 2026 18:31
Sergio0694 and others added 2 commits September 14, 2026 12:50
…giopedri/dependency-property-generator-fixes
Add a sample documentation page with front matter for discovery, complete setup and feature guidance, and unwrapped prose. Link the experiment list to the new documentation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Scope TKSMPL0014 suppression to the DependencyPropertyGenerator samples project while retaining existing NoWarn entries.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Arlodotexe
Arlodotexe merged commit b707db1 into main Sep 15, 2026
23 of 24 checks passed
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.

3 participants