-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Namespace refactoring Implementation #47670
Labels
Client
This issue points to a problem in the data-plane of the library.
CodeGen
Issues that relate to code generation
feature-request
This issue requires a new behavior in the product in order be resolved.
Comments
This was referenced Oct 23, 2024
Story of this feature is https://gist.github.com/srnagar/a695faa1a4d8a5dbf44af826f05916f0 |
github-merge-queue bot
pushed a commit
to microsoft/typespec
that referenced
this issue
Feb 7, 2025
Fixes #5442 Fixes #5471 Fixes #5563 Fixes Azure/azure-sdk-for-net#47670 This PR contains the following: 1. now we honor the namespace defined in typespec for both model and clients (short for "namespace is namespace" feature) 2. <del>removes the `namespace` configuration from the emitter because we no longer need it. Azure generator still needs this, we will add it back in azure emitter (temporary until azure generator decides how to deal with it)</del> 3. removes the `use-model-namespace` configuration from the emitter because we no longer need it. Azure generator still needs this, we will add it back in azure emitter (temporary until azure generator decides how to deal with it) 4. reports diagnostic when there are conflicts between namespace segments and subclient names. Because this change changes the namespace of literally everything, there are quite a few file changed. Majority of them are the generated files changed for the namespace. We also have a piece of logic that automatically renames the client `Models` to `ModelsOps` in our emitter. We should not have it in the emitter any way. This part is removed. Azure part needs it, therefore we will add the same logic back in azure generator. Update: I have to add the configuration `namespace` back because `autorest.csharp` is still strongly coupled with this configuration, removing it causes massive changes on that side. Therefore I decided that we keep it here for now, we still write its value to configuration.json for backward compatibility, but MGC will not read it nor use it.
github-merge-queue bot
pushed a commit
to microsoft/typespec
that referenced
this issue
Feb 7, 2025
Fixes #5442 Fixes #5471 Fixes #5563 Fixes Azure/azure-sdk-for-net#47670 This PR contains the following: 1. now we honor the namespace defined in typespec for both model and clients (short for "namespace is namespace" feature) 2. <del>removes the `namespace` configuration from the emitter because we no longer need it. Azure generator still needs this, we will add it back in azure emitter (temporary until azure generator decides how to deal with it)</del> 3. removes the `use-model-namespace` configuration from the emitter because we no longer need it. Azure generator still needs this, we will add it back in azure emitter (temporary until azure generator decides how to deal with it) 4. reports diagnostic when there are conflicts between namespace segments and subclient names. Because this change changes the namespace of literally everything, there are quite a few file changed. Majority of them are the generated files changed for the namespace. We also have a piece of logic that automatically renames the client `Models` to `ModelsOps` in our emitter. We should not have it in the emitter any way. This part is removed. Azure part needs it, therefore we will add the same logic back in azure generator. Update: I have to add the configuration `namespace` back because `autorest.csharp` is still strongly coupled with this configuration, removing it causes massive changes on that side. Therefore I decided that we keep it here for now, we still write its value to configuration.json for backward compatibility, but MGC will not read it nor use it.
github-merge-queue bot
pushed a commit
to microsoft/typespec
that referenced
this issue
Feb 7, 2025
Fixes #5442 Fixes #5471 Fixes #5563 Fixes Azure/azure-sdk-for-net#47670 This PR contains the following: 1. now we honor the namespace defined in typespec for both model and clients (short for "namespace is namespace" feature) 2. <del>removes the `namespace` configuration from the emitter because we no longer need it. Azure generator still needs this, we will add it back in azure emitter (temporary until azure generator decides how to deal with it)</del> 3. removes the `use-model-namespace` configuration from the emitter because we no longer need it. Azure generator still needs this, we will add it back in azure emitter (temporary until azure generator decides how to deal with it) 4. reports diagnostic when there are conflicts between namespace segments and subclient names. Because this change changes the namespace of literally everything, there are quite a few file changed. Majority of them are the generated files changed for the namespace. We also have a piece of logic that automatically renames the client `Models` to `ModelsOps` in our emitter. We should not have it in the emitter any way. This part is removed. Azure part needs it, therefore we will add the same logic back in azure generator. Update: I have to add the configuration `namespace` back because `autorest.csharp` is still strongly coupled with this configuration, removing it causes massive changes on that side. Therefore I decided that we keep it here for now, we still write its value to configuration.json for backward compatibility, but MGC will not read it nor use it.
dmnorc
pushed a commit
to dmnorc/typespec
that referenced
this issue
Feb 18, 2025
Fixes microsoft#5442 Fixes microsoft#5471 Fixes microsoft#5563 Fixes Azure/azure-sdk-for-net#47670 This PR contains the following: 1. now we honor the namespace defined in typespec for both model and clients (short for "namespace is namespace" feature) 2. <del>removes the `namespace` configuration from the emitter because we no longer need it. Azure generator still needs this, we will add it back in azure emitter (temporary until azure generator decides how to deal with it)</del> 3. removes the `use-model-namespace` configuration from the emitter because we no longer need it. Azure generator still needs this, we will add it back in azure emitter (temporary until azure generator decides how to deal with it) 4. reports diagnostic when there are conflicts between namespace segments and subclient names. Because this change changes the namespace of literally everything, there are quite a few file changed. Majority of them are the generated files changed for the namespace. We also have a piece of logic that automatically renames the client `Models` to `ModelsOps` in our emitter. We should not have it in the emitter any way. This part is removed. Azure part needs it, therefore we will add the same logic back in azure generator. Update: I have to add the configuration `namespace` back because `autorest.csharp` is still strongly coupled with this configuration, removing it causes massive changes on that side. Therefore I decided that we keep it here for now, we still write its value to configuration.json for backward compatibility, but MGC will not read it nor use it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Client
This issue points to a problem in the data-plane of the library.
CodeGen
Issues that relate to code generation
feature-request
This issue requires a new behavior in the product in order be resolved.
No description provided.
The text was updated successfully, but these errors were encountered: