-
Notifications
You must be signed in to change notification settings - Fork 27
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 generates incorrect cross-language definition IDs #849
Comments
two problems here:
|
|
@iscai-msft is correct, in order for the cross-language ID to be "cross-language" you can't apply language specific customizations. The only source of truth is the TypeSpec, so the cross-langauge ID should always correspond to the TypeSpec ID. If you can't trace something back to pure TypeSpec then there would be no cross-language ID. So if you had, for example, a decorator that created some kind of helper operation, there's be no cross-language ID for that helper, but it would only exist in Python. |
I have no idea how my fork of branch @timotheeguerin, @markcowl: Any ideas? https://github.com/mikeharder/typespec-azure/commit/3af118a4a6a6a0dacfcd8f37847091948d9d3b37 |
I think it happened when I merged upstream to my fork: Which I think means, this may keep getting re-closed when anybody merges their fork. Which means, you can't really re-open an issue if it was closed by a commit to main. @tadelesh: I recommend you open an new issue and close this one. |
@mikeharder ok. thanks for reminder. |
replaced by #961 |
Describe the bug
See: https://apiview.dev/Assemblies/Review/e3195e5ca7954296b4e68393eb084773#ModelClient.generateImages
The cross-language definition ID for this operation should be
ModelClient.getChatCompletions
. However, TCGC is transforming the TypeSpec through it's client decorators and so forth and generating an ID ofCustomizations.Client1.create
. The method to generate the cross-language definition ID should not apply any such customizations.The whole point of the cross-language definition ID is to be the same no matter the language. If a client.tsp applies different customizations for different languages then there's no way those IDs will match.
Reproduction
Checklist
The text was updated successfully, but these errors were encountered: