Skip to content

GenAPI emits nullable attributes #33853

@ericstj

Description

@ericstj

Describe the bug

Now that the Nullable attributes are defined publicly in the framework instead of internally in the user assembly they are no longer excluded by the visibility filter. We shouldn't emit these attributes, but instead emit the nullable annotations on the C# syntax.

See #33841 for examples of the unwanted nullable attribu tes.

To Reproduce

Compile an assembly that uses nullable annotations targeting a recent build of .NET 8.0 with dotnet/runtime@d39e0c4, then run genapi on the resulting assembly.

Expect: public API that matches what was defined.
Actual: public API with explicitly references to NullableAttribute, NullableContext, etc.

Exceptions (if any)

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-GenAPICost:SLess than 4 person weeks of work per central guidancePriority:1Work that is critical for the release, but we could probably ship without

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions