icerpc / icerpc-csharp

A C# RPC framework built for QUIC, with bidirectional streaming, first-class async/await, and Protobuf support.
https://docs.icerpc.dev
Apache License 2.0
107 stars 13 forks source link

Generate required fields for mapped structs? #4023

Closed bernardnormier closed 3 months ago

bernardnormier commented 3 months ago

As a follow-up to #4022, we should consider generating required for struct fields too.

See: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-11.0/required-members

bernardnormier commented 3 months ago

After experimenting with the syntax, I think it's indeed better to generate required for non-nullable reference struct fields.