-
Notifications
You must be signed in to change notification settings - Fork 51
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
[tcgc] do not replace operation with @override
when listOperationsInOperationGroup
#1858
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
changeKind: fix | ||
packages: | ||
- "@azure-tools/typespec-client-generator-core" | ||
--- | ||
|
||
do not replace operation with `@override` when `listOperationsInOperationGroup` | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -586,7 +586,7 @@ export function listOperationsInOperationGroup( | |
for (const op of current.operations.values()) { | ||
// Skip templated operations | ||
if (!isTemplateDeclarationOrInstance(op)) { | ||
operations.push(getOverriddenClientMethod(context, op) ?? op); | ||
operations.push(op); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this the decided way to proceed until every language can fully support overrides? I feel it would be better to still return these instead of the original, and we could tell emitter authors that it's overridden, and we can point back to the original operation as well There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ahh i see, approving |
||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it only affect
listOperationsInOperationGroup
?Java emitter currently list
SdkServiceMethod
underclient.methods
.From the context, this seems also should not be the
@override
operation --SdkServiceMethod
should have the signature of the override operation inSdkServiceMethod
, while having the signature of the original/overrided operation inSdkServiceOperation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is just a bug for previous
@override
impl. forSdkServiceMethod
it will use the@override
operation, forSdkServiceOperation
it will use the original operation, these two logic is right for the impl.