Skip to content

Conversation

@heaths
Copy link
Member

@heaths heaths commented Feb 7, 2026

Other half of the fix for Azure/azure-sdk-for-rust#3692

@heaths heaths requested a review from LarryOsterman February 7, 2026 02:12
@heaths heaths requested a review from tjprescott as a code owner February 7, 2026 02:12
@heaths heaths requested a review from RickWinter February 7, 2026 02:12
@heaths heaths requested a review from AlitzelMendez as a code owner February 7, 2026 02:12
@heaths heaths requested a review from jhendrixMSFT February 7, 2026 02:12
@heaths heaths requested a review from helen229 as a code owner February 7, 2026 02:12
@heaths heaths requested a review from antkmsft February 7, 2026 02:12
Copilot AI review requested due to automatic review settings February 7, 2026 02:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the rust-api-parser to support Rustdoc JSON format version 45 by aligning the TypeScript model definitions and token generation logic with upstream rustdoc-types schema changes.

Changes:

  • Bumped embedded rustdoc type definitions to FORMAT_VERSION = 45 and updated rustdoc-types crate dependency to 0.41.0.
  • Updated token rendering to use the new Path.path field (replacing Path.name) across type/trait formatting.
  • Added handling scaffolding for the new PreciseCapturingArg type used by "use" bounds in generics.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/apiview/parsers/rust-api-parser/src/process-items/utils/typeToReviewTokens.ts Updates type token rendering to use Path.path and adjusts impl-trait "use" rendering.
tools/apiview/parsers/rust-api-parser/src/process-items/utils/processGenerics.ts Updates trait path rendering and adds PreciseCapturingArg extraction for "use" bounds.
tools/apiview/parsers/rust-api-parser/src/process-items/utils/generateDocReviewLine.ts Removes an unused map callback parameter.
tools/apiview/parsers/rust-api-parser/src/process-items/processImpl.ts Updates trait display to use trait.path; adds an eslint suppression for an unused helper parameter.
tools/apiview/parsers/rust-api-parser/src/main.ts Cleans up an unused import after schema updates.
tools/apiview/parsers/rust-api-parser/rustdoc-types/output/rustdoc-types.ts Regenerates/updates rustdoc JSON type model for v45 (incl. Path.path, PreciseCapturingArg, new fields).
tools/apiview/parsers/rust-api-parser/rustdoc-types/Cargo.toml Bumps rustdoc-types dependency to 0.41.0.
tools/apiview/parsers/rust-api-parser/rustdoc-types/Cargo.lock Lockfile update for rustdoc-types bump.
tools/apiview/parsers/rust-api-parser/package.json Bumps npm package version to 1.2.0.
tools/apiview/parsers/rust-api-parser/package-lock.json Lockfile update corresponding to version/dependency graph changes.
tools/apiview/parsers/rust-api-parser/CHANGELOG.md Adds 1.2.0 changelog entry describing the rustdoc-types/MSRV alignment.
Files not reviewed (1)
  • tools/apiview/parsers/rust-api-parser/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

tools/apiview/parsers/rust-api-parser/src/process-items/utils/typeToReviewTokens.ts:156

  • In the qualified_path branch, type.qualified_path.trait is optional (see rustdoc-types: trait?: Path), but the code unconditionally accesses type.qualified_path.trait.args. This will throw at runtime for inherent associated types (when trait is undefined). Guard this call (e.g., only emit trait generic args when trait is present).
        Value: type.qualified_path.trait ? type.qualified_path.trait.path + "::" : "",
        HasSuffixSpace: false,
      },
      ...processGenericArgs(type.qualified_path.trait.args),
      { Kind: TokenKind.TypeName, Value: type.qualified_path.name, HasSuffixSpace: false },

@heaths
Copy link
Member Author

heaths commented Feb 7, 2026

@maririos @weshaggard @hallipr @danieljurek who do we talk to about getting a new version of the rust-api-parser uploaded to APIView? I'm guessing we have to build it manually. I've tested it locally against the same version of one of our crates after also making changes to our tool in the SDK repo. See Azure/azure-sdk-for-rust#3697. That should go in first, too.

@heaths heaths merged commit e155048 into Azure:main Feb 9, 2026
23 checks passed
@heaths heaths deleted the rust-issue3692 branch February 9, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants