Skip to content

Track MPG body-only helper dependencies#60257

Draft
live1206 wants to merge 1 commit into
Azure:mainfrom
live1206:fix/mpg-body-helper-dependencies
Draft

Track MPG body-only helper dependencies#60257
live1206 wants to merge 1 commit into
Azure:mainfrom
live1206:fix/mpg-body-helper-dependencies

Conversation

@live1206

Copy link
Copy Markdown
Member

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:

  • collection result helpers used by pageable methods
  • pageable wrapper helpers for resource pageable return types
  • long-running operation source helpers for ArmOperation<T> return types

It also preserves collection-definition metadata when wrapping pageable operation methods.

Dependency

Draft because this depends on MTG APIs from microsoft/typespec#10976:

  • TypeProvider.BuildBodyDependencyTypes
  • TypeProvider.BuildHelperDependencyNames

The 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 minimal
  • RegenSdkLocal.ps1 -Services Azure.ResourceManager.Network -Parallel 1 completed in 00:17:23.8815065
  • dotnet build sdk/network/Azure.ResourceManager.Network/src/Azure.ResourceManager.Network.csproj --verbosity minimal
  • RegenSdkLocal.ps1 -Services Azure.ResourceManager.DataFactory -Parallel 1 completed in 00:07:49.1320426
  • dotnet build sdk/datafactory/Azure.ResourceManager.DataFactory/src/Azure.ResourceManager.DataFactory.csproj --verbosity minimal

Network 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.

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>
@github-actions github-actions Bot added CodeGen Issues that relate to code generation Mgmt This issue is related to a management-plane library. labels Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CodeGen Issues that relate to code generation Mgmt This issue is related to a management-plane library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant