Understand cleanup SDK strategy for generated code
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 144
Description
For management plane, automation is deleting the SDK code from the location in the repo, so deprecated APIs or previous customizations don't affect the automatic generation.
Looks like languages have different approaches of how and when they do it. The purpose of this issue is to map the specific scenarios including data plane, and decide how we should we approach this in the new AI model.
For management plane:
| Language | Delete SDK | How | Reason |
|----------|------------|----------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| Java | Yes | Delete files containing `// Code generated by Microsoft (R)` | Helps clean up management-plane modules when APIs/models are deprecated; avoids issues with partial updates in data-plane |
| Go | Yes | Delete generated code, tests, and samples | To remove deprecated or obsolete generated content |
| JavaScript | Yes | Delete generated code, tests, and samples | Same as Go |
| .NET | Yes | Emitter/codegen has a flag to delete files in the Generated folder | Facilitates cleanup due to separate folders for generated and handwritten code |
| Python | Partial | Delete generated tests and samples | File structure allows replacement to handle most cases; full deletion not necessary (better to delete the generated SDK folder entirely to make sure outdated files are removed) (left by @msyyc ) |
For data plane:
| Language | Delete SDK | How | Reason |
|-------------|------------|-----|--------|
| Java | No delete, just file overwrite | | |
| Go | No delete, just file overwrite | | |
| JavaScript | No delete, just file overwrite | | |
| .NET | No delete, just file overwrite | | |
| Python | No delete, just file overwrite | | |
Contributor guide
Assessment
This issue has not been assessed yet.