Track MPG body-only helper dependencies#60257
Draft
live1206 wants to merge 1 commit into
Draft
Conversation
Preserve collection result, pageable wrapper, and operation source helper dependencies used only in generated method bodies so MTG pruning does not delete required files. Depends on Microsoft.TypeSpec.Generator BodyDependencyTypes/HelperDependencyNames support from microsoft/typespec#10976. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Track MPG-generated dependencies that are only referenced from method bodies so MTG hybrid post-processing does not prune required helper files.
This adds body dependency metadata for:
ArmOperation<T>return typesIt also preserves collection-definition metadata when wrapping pageable operation methods.
Dependency
Draft because this depends on MTG APIs from microsoft/typespec#10976:
TypeProvider.BuildBodyDependencyTypesTypeProvider.BuildHelperDependencyNamesThe related MTG fixes have been pushed to the existing TypeSpec PR branch.
Validation
Validated locally with the TypeSpec PR branch wired as project references:
dotnet build eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Azure.Generator.Management.csproj --verbosity minimalRegenSdkLocal.ps1 -Services Azure.ResourceManager.Network -Parallel 1completed in00:17:23.8815065dotnet build sdk/network/Azure.ResourceManager.Network/src/Azure.ResourceManager.Network.csproj --verbosity minimalRegenSdkLocal.ps1 -Services Azure.ResourceManager.DataFactory -Parallel 1completed in00:07:49.1320426dotnet build sdk/datafactory/Azure.ResourceManager.DataFactory/src/Azure.ResourceManager.DataFactory.csproj --verbosity minimalNetwork and DataFactory regenerated SDK output had no public API listing diffs. DataFactory had no deleted generated files; Network no longer deleted the helper files that caused the original build failure.