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

Consolidate InputPrimitiveType, InputDateTimeType, InputDurationType, InputEnumType and InputIntrinsicType with TCGC #4707

Merged

Conversation

ArcturusZhang
Copy link
Member

@ArcturusZhang ArcturusZhang commented May 14, 2024

Fixes #4683
Fixes #4712
Fixes #4713
Fixes #4714
Fixes #4131

Description

This PR introduces the following types:

  1. Use the SdkTypeKinds from TCGC as our kind for all input types (you should see related changes in the emitter and the generator)
    1. Related: since the kind is now from TCGC, the "encode" information is no longer bundled with the kind like we used to have such as DateTimeISO8601. This part fixes Duplicate information in our input type and serialization system #4131
  2. Move datetime type and duration type out of InputPrimitiveType to align current design of TCGC. This part fixes DateTime and Duration are standalone types in TCGC #4713
  3. Remove InputIntrinsicType. Only unknown is meaningful to us and in TCGC it is a built-in type with the kind of any. Issue has been open for them to rename this to unknown. This part fixes Intrinsic types are not meaningful except unknown #4712
  4. Unify property names in enum type (EnumValueType => ValueType, AllowedValues => Values), minor change.
  5. ValueType (formal EnumValueType) is now a InputPrimitiveType instead of just a string.

Checklist

To ensure a quick review and merge, please ensure:

  • The PR has a understandable title and description explaining the why and what.
  • The PR is opened in draft if not ready for review yet.
    • If opened in draft, please allocate sufficient time (24 hours) after moving out of draft for review
  • The branch is recent enough to not have merge conflicts upon creation.

Ready to Land?

  • Build is completely green
    • Submissions with test failures require tracking issue and approval of a CODEOWNER
  • At least one +1 review by a CODEOWNER
  • All -1 reviews are confirmed resolved by the reviewer
    • Override/Marking reviews stale must be discussed with CODEOWNERS first

Copy link
Member

@archerzz archerzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ArcturusZhang ArcturusZhang changed the title trying to consolidate the input types with the types from tcgc Consolidate InputPrimitiveType, InputDateTimeType, InputDurationType, InputEnumType and InputIntrinsicType with TCGC May 31, 2024
Copy link
Member

@live1206 live1206 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to sync shared core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants