Update codegen for breaking changes in pageable methods#758
Merged
jhendrixMSFT merged 3 commits intomainfrom Dec 11, 2025
Merged
Update codegen for breaking changes in pageable methods#758jhendrixMSFT merged 3 commits intomainfrom
jhendrixMSFT merged 3 commits intomainfrom
Conversation
Updated code model to have discrete types for ClientMethodOptions, PagerOptions, and PollerOptions from azure_core. The constructor for Pager now requires a PagerContinuationKind argument that's used to determine the emitted generic type parameters.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the code generation for pageable methods to support breaking changes in the azure_core library. The changes introduce discrete types for method options and update the Pager API to use a constructor that requires a continuation kind parameter.
Key Changes:
- Introduced discrete types (
ClientMethodOptions,PagerOptions,PollerOptions) to replace genericExternalTypeusage - Updated
Pagerto include continuation kind as a generic type parameter when using continuation tokens - Replaced
Pager::from_callbackwithPager::newand wrapped async callbacks inBox::pin
Reviewed changes
Copilot reviewed 8 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/typespec-rust/src/codemodel/types.ts |
Added new type definitions for ClientMethodOptions, PagerOptions, PollerOptions with PagerContinuationKind support |
packages/typespec-rust/src/tcgcadapter/adapter.ts |
Updated method options creation to use new discrete types and set continuation kind for token-based paging |
packages/typespec-rust/src/codegen/helpers.ts |
Updated type declaration generation to emit correct generic parameters for Pager and PagerOptions based on continuation kind |
packages/typespec-rust/src/codegen/clients.ts |
Updated pageable method body generation to use Pager::new and Box::pin(async move) |
packages/typespec-rust/src/codegen/use.ts |
Added logic to import format types when using continuation token strategy |
packages/typespec-rust/test/**/*.rs |
Updated all generated test files with new Pager signatures and PagerOptions type parameters |
packages/typespec-rust/test/Cargo.toml |
Updated azure_core dependency to compatible version |
packages/typespec-rust/package.json |
Bumped version to 0.32.0 |
packages/typespec-rust/CHANGELOG.md |
Documented breaking changes |
antkmsft
approved these changes
Dec 11, 2025
heaths
approved these changes
Dec 11, 2025
heaths
approved these changes
Dec 11, 2025
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.
Updated code model to have discrete types for ClientMethodOptions, PagerOptions, and PollerOptions from azure_core.
The constructor for Pager now requires a PagerContinuationKind argument that's used to determine the emitted generic type parameters.