Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emitter needs to adopt TCGC's recent changes on nullable #4701

Open
Tracked by #4711
chunyu3 opened this issue May 13, 2024 · 3 comments
Open
Tracked by #4711

Emitter needs to adopt TCGC's recent changes on nullable #4701

chunyu3 opened this issue May 13, 2024 · 3 comments
Assignees
Labels
DPG/RLC v2.1 Post Gallium work DPG

Comments

@chunyu3
Copy link
Member

chunyu3 commented May 13, 2024

TCGC will label Nullable on property/parameter instead of type.
Codegen emitter will adapt this:

  • update emitted model, apply Nullable on property/parameter
  • update inputModel in autorest.csharp accordingly.
  • Still label Nullable in CsharpType, update the TypeFactory.cs to pass Nullable parameter when create CsharpType.
@chunyu3 chunyu3 added DPG DPG/RLC v2.1 Post Gallium work labels May 13, 2024
@ArcturusZhang ArcturusZhang changed the title tcgc label nullnable to property/parameter instead of type, Codegen need to adapt tcgc label nullable to property/parameter instead of type, Codegen need to adapt May 13, 2024
@ArcturusZhang ArcturusZhang changed the title tcgc label nullable to property/parameter instead of type, Codegen need to adapt tcgc label nullable to property/parameter instead of type, Codegen need to adopt May 13, 2024
@ArcturusZhang ArcturusZhang changed the title tcgc label nullable to property/parameter instead of type, Codegen need to adopt Emitter needs to adopt TCGC's recent changes on nullable May 13, 2024
@ArcturusZhang
Copy link
Member

we could take this opportunity to review and refine the design of our input types as well

@ArcturusZhang
Copy link
Member

Also this should fix #4314

@archerzz
Copy link
Member

Latest decision is to deprecate all nullable, and return union for nullable types in TCGC. There will be a helper function isNullable to help check if the type is nullable. For details, see Azure/typespec-azure#870

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DPG/RLC v2.1 Post Gallium work DPG
Projects
None yet
Development

No branches or pull requests

3 participants