Skip to content

Source generators should be able to handle C# 13 extensions #102817

Open
@eiriktsarpalis

Description

@eiriktsarpalis

Source generators that accept arbitrary .NET types as inputs such as STJ, ConfigurationBinder and the logger generator should be updated so that they are able to handle type graphs containing extensions gracefully. Code produced by such generators is usually indexed by System.Type, so they often do not distinguish between different aliases of the same type. Even though some generators (such as CB) don't do this, we still need to make sure that extensions are being handled gracefully and that compatibility with the baseline reflection-based implementation is being preserved.

We need to make sure that the introduction of either implicit or explicit extensions in the type graph does not result in nondeterminstic contracts being generated (i.e. because of extension properties being defined).

cc @ericstj @tarekgh @stephentoub

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.RuntimeenhancementProduct code improvement that does NOT require public API changes/additionssource-generatorIndicates an issue with a source generator feature

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions