-
Notifications
You must be signed in to change notification settings - Fork 40
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
[Bug][tcgc] getSdkUnion would merge underlying enum members to top level #379
Comments
@MaryGao, in JS, do we have a workaround for this issue? |
I don't think we have a quick workaround here because our modular logic has serveral dependencies with isFixed column, currently we just fallback to tcgc dev.17 version. Currently RLC leverages the isFixed in core and for modular we leverages the tcgc. The inconsistancy would exist if we have gaps between core isFixed and tcgc. |
Here we are only calling what |
Both your cases are by design and work as expected:
is an extensible enum. We do have plan to switch this to fxed enum, when we can confirm all emitters are treating the union correctly Flattening enum values is by design as well. @MaryGao I'm worried to be honest of what "workaround" you would do here, since both are by designed. I'm closing this issue, and we can confirm this off-line. |
The inconsistency is come from the flatten. TCGC uses |
JS has workaround for the inconsistency of whether is open for flattened union as enum. Remove |
Describe the bug
When we adopt to the latest tcgc our two cases failed and we found that
TCGC are supposed to provide consistant isFixed information, otherwise it would be a big issue for JS because RLC didn't adopt tcgc but Modular does. So it would introduce type inconsistancy between them and finally fails the compile process.
Also I think current behavior for prompting members to top level is debetable. It would lose the name info which may be useful for emitters.
Case 1: Nullable enum
Case 2: EnumeA | EnumB
The text was updated successfully, but these errors were encountered: