Skip to content

[api] Fix a couple type cache issues - #64408

Merged
Andrew Branch (andrewbranch) merged 2 commits into
microsoft:mainfrom
andrewbranch:api-type-cache-fixes
Sep 23, 2026
Merged

Andrew Branch (andrewbranch) merged 2 commits into
microsoft:mainfrom
andrewbranch:api-type-cache-fixes

Conversation

@andrewbranch

Copy link
Copy Markdown
Member

I wrote these instructions in #64397; following up to make sure existing stuff actually follows them.

Copilot AI balanced review requested due to automatic review settings September 23, 2026 16:22
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Sep 23, 2026
@typescript-automation typescript-automation Bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Sep 23, 2026

- Does the public method take arguments, like `type.getProperty(name)`?
- Add the method on `Type`
- Add an equivalent method on `Checker`

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I included this because of #63917, but I think it's irrelevant with the new batching stuff.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably, but #64266 would help a bit more.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The index-type cache fix lacks request-count regression coverage, and its new guidance excludes the discriminator-based pattern implemented here.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 Medium severity · 1 Low severity

Open (3)
What changed in this PR

This PR fixes API type-cache consistency and removes the redundant index-type protocol endpoint.

Changes:

  • Cache constituent type arrays in sync and async clients.
  • Delegate checker index-type lookups to cacheable Type methods.
  • Update protocol definitions, tests, and API-client guidance.
File Description
.github/​skills/​api-client/​SKILL.md Documents checker delegation guidance.
tsc/​internal/​api/​session.go Removes the redundant request handler.
tsc/​internal/​api/​proto.go Removes the obsolete protocol method.
packages/​typescript/​src/​api/​proto.generated.ts Updates generated protocol types.
packages/​typescript/​src/​api/​sync/​api.ts Adds caching and checker delegation.
packages/​typescript/​src/​api/​async/​api.ts Mirrors cache fixes asynchronously.
packages/​typescript/​test/​sync/​api.test.ts Tests constituent-array identity.
packages/​typescript/​test/​async/​api.test.ts Tests async constituent-array identity.
Comment thread packages/typescript/src/api/sync/api.ts Resolved
Comment thread .github/skills/api-client/SKILL.md Resolved
@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Sep 23, 2026
@andrewbranch
Andrew Branch (andrewbranch) added this pull request to the merge queue Sep 23, 2026
Merged via the queue into microsoft:main with commit 13ab32d Sep 23, 2026
29 checks passed
@andrewbranch
Andrew Branch (andrewbranch) deleted the api-type-cache-fixes branch September 23, 2026 17:41
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Sep 23, 2026
@jakebailey Jake Bailey (jakebailey) added the Domain: Performance Performance related label Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team Domain: Performance Performance related For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

5 participants