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] Adopt getAllOperation #3994

Closed
22 of 23 tasks
Tracked by #4299
archerzz opened this issue Dec 1, 2023 · 0 comments
Closed
22 of 23 tasks
Tracked by #4299

[TCGC] Adopt getAllOperation #3994

archerzz opened this issue Dec 1, 2023 · 0 comments
Assignees
Labels
DPG/RLC v2.1 Post Gallium work DPG

Comments

@archerzz
Copy link
Member

archerzz commented Dec 1, 2023

Per https://github.com/Azure/typespec-azure/issues/2745

Tasks

  1. feature lib:tcgc
    iscai-msft
  2. DPG DPG/RLC v2.1
    archerzz
  3. design:proposed lib:tcgc
  4. bug lib:tcgc
    tadelesh
  5. feature lib:tcgc
    iscai-msft
  6. feature lib:tcgc
    iscai-msft
  7. feature lib:tcgc
  8. design:needed lib:http triaged:core
  9. bug lib:tcgc
    iscai-msft
  10. bug lib:tcgc
    iscai-msft
  11. feature lib:tcgc
  12. bug
    archerzz
  13. bug lib:tcgc
  14. bug lib:tcgc
    archerzz
  15. feature lib:tcgc
    tadelesh
  16. bug lib:tcgc
    archerzz
  17. bug lib:tcgc
  18. bug lib:tcgc
  19. bug
  20. bug lib:tcgc
    tadelesh
  21. bug lib:tcgc
    iscai-msft
  22. bug lib:tcgc
    archerzz
@archerzz archerzz self-assigned this Dec 1, 2023
@chunyu3 chunyu3 added DPG DPG/RLC v2.1 Post Gallium work labels Dec 4, 2023
@archerzz archerzz changed the title [TCGC] Early Adoption of getAllOperation [TCGC] Adoption of getAllOperation May 7, 2024
@archerzz archerzz changed the title [TCGC] Adoption of getAllOperation [TCGC] Adopt getAllOperation May 7, 2024
archerzz added a commit to archerzz/autorest.csharp that referenced this issue Jun 18, 2024
This is a prerequisite change for Azure#3994 The null check for client description is meaningless, because `ClientBuilder` will add a default description anyway: https://github.com/Azure/autorest.csharp/blob/4d55b600ee877e68675297546e70a765fb679039/src/AutoRest.CSharp/Common/Output/Builders/ClientBuilder.cs#L28-L31
Right now in our emitter, we will set `description` to an empty string: https://github.com/Azure/autorest.csharp/blob/4d55b600ee877e68675297546e70a765fb679039/src/TypeSpec.Extension/Emitter.Csharp/src/lib/client-model-builder.ts#L281
But in TCGC, the `description` will be null.

So, let's remove this meaningless check.
archerzz added a commit that referenced this issue Jun 20, 2024
This is a prerequisite change for #3994 The null check for client description is meaningless, because `ClientBuilder` will add a default description anyway: https://github.com/Azure/autorest.csharp/blob/4d55b600ee877e68675297546e70a765fb679039/src/AutoRest.CSharp/Common/Output/Builders/ClientBuilder.cs#L28-L31
Right now in our emitter, we will set `description` to an empty string: https://github.com/Azure/autorest.csharp/blob/4d55b600ee877e68675297546e70a765fb679039/src/TypeSpec.Extension/Emitter.Csharp/src/lib/client-model-builder.ts#L281
But in TCGC, the `description` will be null.

So, let's remove this meaningless check.
ArcturusZhang added a commit that referenced this issue Jun 27, 2024
* refactor(dpg): remove unnecessary `Creatable` property

This is a prerequisite of #3994
`Creatable` is not used in generator. See:
- `TypeSpecInputClientConverter`: https://github.com/Azure/autorest.csharp/blob/feature/v3/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputClientConverter.cs
- `InputClient`: https://github.com/Azure/autorest.csharp/blob/feature/v3/src/AutoRest.CSharp/Common/Input/InputTypes/InputClient.cs

Let's remove it.

* try to revert the problematic change

* try to add it into peer dep

---------

Co-authored-by: Dapeng Zhang <[email protected]>
archerzz pushed a commit to archerzz/typespec that referenced this issue Jul 17, 2024
- update emitter logic to derive operation defintions from TCGC instead of raw compiler result
- update `ExampleMockValueBuilder` to get constant value from `InputLiteralType`
- add implicit conversion operation from `InputLiteralType` to `InputConstant`
- update unit test cases
- minor error message improvment

part of Azure/autorest.csharp#3994
github-merge-queue bot pushed a commit to microsoft/typespec that referenced this issue Jul 31, 2024
- update emitter logic to derive operation definitions from TCGC instead
of raw compiler output
- temporarily work around the mis-use of `InputParameter.DefaultValue`
for constant values
- add conversion from `InputLiteralType.Value` to
`InputParameter.DefaultValue` in converter
- add implicit conversion operation from `InputLiteralType` to
`InputConstant`
- update unit test cases
- minor error message improvement

part of Azure/autorest.csharp#3994

---------

Co-authored-by: Mingzhe Huang (from Dev Box) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DPG/RLC v2.1 Post Gallium work DPG
Projects
None yet
Development

No branches or pull requests

2 participants