Skip to content

Shorten generated collection result names#59364

Draft
haiyuazhang wants to merge 1 commit into
Azure:mainfrom
haiyuazhang:copilot/58996-collection-result-names
Draft

Shorten generated collection result names#59364
haiyuazhang wants to merge 1 commit into
Azure:mainfrom
haiyuazhang:copilot/58996-collection-result-names

Conversation

@haiyuazhang
Copy link
Copy Markdown
Member

Fixes #58996

Summary

  • Add an MPG CollectionResultNameVisitor that compacts overlong generated CollectionResult type names with a deterministic SHA256 hash suffix.
  • Wire the visitor early so it can cover both normal pageable collection results and MPG array-response collection results.
  • Add a local Mgmt-TypeSpec repro for a long collection-result name and unit coverage for the visitor.

Validation

  • npm run test:generator
  • eng\packages\http-client-csharp-mgmt\eng\scripts\Generate.ps1 -filter Mgmt-TypeSpec
  • Verified generated local CollectionResults paths do not exceed the base-49 path-length budget.

Add an MPG visitor that compacts overlong CollectionResult type names with a deterministic hash suffix before generation emits file paths.

Add a local TypeSpec repro for a long operation name and unit coverage for the name visitor.

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 package. labels May 20, 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 package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track long generated collection-result filenames exceeding path-length limit

1 participant