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

[tcgc] refine logic to iterate over all user-defined namespaces #2222

Merged
merged 9 commits into from
Mar 5, 2025

Conversation

iscai-msft
Copy link
Contributor

No description provided.

@microsoft-github-policy-service microsoft-github-policy-service bot added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Feb 14, 2025
@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 14, 2025

All changed packages have been documented.

  • @azure-tools/typespec-client-generator-core
Show changes

@azure-tools/typespec-client-generator-core - fix ✏️

Recurse over namespaces to get all user defined namespaces"

@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 14, 2025

You can try these changes here

🛝 Playground 🌐 Website

@tadelesh
Copy link
Member

tadelesh commented Feb 26, 2025

could you please also update the code here:

for (const client of listClients(context)) {

it is missing in the original pr.

@iscai-msft
Copy link
Contributor Author

could you please also update the code here:

for (const client of listClients(context)) {

it is missing in the original pr.

the reason for this pr is to remove the need to iterate over listClients. The root issue was I used to stop once I saw a namespace that wasn't user defined (which would stop at just Azure. and not continue recursing). With the new code, I keep recursing, so I will find the necessary clients

@tadelesh
Copy link
Member

could you please also update the code here:

for (const client of listClients(context)) {

it is missing in the original pr.

the reason for this pr is to remove the need to iterate over listClients. The root issue was I used to stop once I saw a namespace that wasn't user defined (which would stop at just Azure. and not continue recursing). With the new code, I keep recursing, so I will find the necessary clients

yes, i understand this pr's work. but my ask is actually from the original pr's comment: #2179 (comment). there is something miss in that pr.

@tadelesh
Copy link
Member

and i'm think of if current impl could support versioning?

@tadelesh
Copy link
Member

@weidongxu-microsoft could you help to test this version to see if all orphan model is calculated?

@iscai-msft iscai-msft enabled auto-merge March 5, 2025 14:29
@iscai-msft iscai-msft added this pull request to the merge queue Mar 5, 2025
Merged via the queue into main with commit 25c68ce Mar 5, 2025
23 checks passed
@iscai-msft iscai-msft deleted the tcgc/findClientNamespaces branch March 5, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants