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

feat(dpg): adopt tcgc getAllModels() #4185

Merged
merged 82 commits into from
May 7, 2024

Conversation

archerzz
Copy link
Member

@archerzz archerzz commented Feb 2, 2024

Description

  • upgrade to latest stable version of TCGC 0.41.8
  • roll back our previous hack which generate strings for client parameters of enum type
    • after discussion, we decided to keep old behavior for apiVersion for backward compatibility consideration
  • replace old emitter codes which deal with primitive compiler-provided types with new codes which handles TCGC SDK types
  • update test cases
  • fix some issues round during migration

resolve #4300

Checklist

To ensure a quick review and merge, please ensure:

  • The PR has a understandable title and description explaining the why and what.
  • The PR is opened in draft if not ready for review yet.
    • If opened in draft, please allocate sufficient time (24 hours) after moving out of draft for review
  • The branch is recent enough to not have merge conflicts upon creation.

Ready to Land?

  • Build is completely green
    • Submissions with test failures require tracking issue and approval of a CODEOWNER
  • At least one +1 review by a CODEOWNER
  • All -1 reviews are confirmed resolved by the reviewer
    • Override/Marking reviews stale must be discussed with CODEOWNERS first

Mingzhe Huang (from Dev Box) added 4 commits March 1, 2024 10:52
# Conflicts:
#	test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/ConfidentLevelsInTspModelFactory.cs
#	test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/Docs/ConfidentLevelsInTspClient.xml
#	test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/Models/BaseModel.cs
#	test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/tspCodeModel.json
#	test/TestProjects/ConfidentLevels-TypeSpec/tests/Generated/Samples/Samples_ConfidentLevelsInTspClient.cs
#	test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml
#	test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml
#	test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Element.Serialization.cs
#	test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Extension.Serialization.cs
#	test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Extension.cs
#	test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs
#	test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.Serialization.cs
#	test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelExtension.Serialization.cs
#	test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelExtension.cs
#	test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json
#	test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs
#	test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs
#	test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs
#	test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs
#	test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/ModelReaderWriterValidationTypeSpecModelFactory.cs
#	test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/AvailabilitySetData.Serialization.cs
#	test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/TrackedResourceData.Serialization.cs
# Conflicts:
#	samples/AnomalyDetector/src/Generated/tspCodeModel.json
#	src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts
#	src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts
#	src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts
#	test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json
#	test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json
#	test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json
#	test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json
#	test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json
#	test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json
#	test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json
#	test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json
#	test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json
#	test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlockItem.Serialization.cs
#	test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlockItem.cs
#	test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlocklist.Serialization.cs
#	test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlocklist.cs
#	test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json
#	test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json
#	test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json
#	test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json
#	test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json
@archerzz archerzz changed the title feat(dpg): adopt tcgg getAllModels() feat(dpg): adopt tcgc getAllModels() Mar 14, 2024
Mingzhe Huang (from Dev Box) added 3 commits April 27, 2024 23:01
# Conflicts:
#	test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesLr.cs
#	test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesUd.cs
#	test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json
# Conflicts:
#	test/CadlRanchProjects.Tests/type-union.cs
Mingzhe Huang (from Dev Box) added 2 commits May 6, 2024 11:02
@archerzz archerzz merged commit e706e10 into Azure:feature/v3 May 7, 2024
8 checks passed
archerzz pushed a commit to archerzz/typespec that referenced this pull request May 11, 2024
- upgrade TCGC to `0.41.8`
- replace old emitter codes which deal with primitive compiler-provided types with new codes which handles TCGC SDK types
- update test cases
- fix some issues round during migration

This is a backport of Azure/autorest.csharp#4185
github-merge-queue bot pushed a commit to microsoft/typespec that referenced this pull request May 11, 2024
- upgrade TCGC to `0.41.8`
- replace old emitter codes which deal with primitive compiler-provided
types with new codes which handles TCGC SDK types
- update test cases
- fix some issues round during migration

This is a backport of Azure/autorest.csharp#4185

---------

Co-authored-by: Mingzhe Huang (from Dev Box) <mingzhehuang@microsoft.com>
Co-authored-by: Arcturus Zhang <dapzhang@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt getAllModels
6 participants