Skip to content

Make ConfigurationBinder source generator feature-complete #79527

@layomia

Description

@layomia

Follow up work for the configuration binding source generator (#44493, #82179).

Preview 3

  • Support objects with parameterless ctors
  • Initial collection support (readonly collections were left out)

Preview 4

Preview 5

Preview 6

Preview 7

RC 1

Stretch / tbd / validation

FX DC feedback

There may be bad UX edge cases that need to be investigated, such as :

  • The roslyn analyzers report an unused using-import from where the existing extension methods are (might be topically unlikely)
    • write the smallest possible source file that could invoke each hook and make sure that we don't have unused usings after source generator hooks the callsite.
  • Concerns around callers using static invocation syntax instead of instance/extension syntax.
    • feature not a bug
    • make sure it triggers linker warning
    • have documentation on that linker warning that leads people to using the generator. 
  • The generator might end up toggling itself on and off (by removing the calls to the existing methods)
    • have a discussion and review the triggering logic with folks from the compiler team

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions