Use native file type mappings for TypeScript-side classification - #14711
Open
Colen Garoutte-Carson (Colengms) wants to merge 5 commits into
Open
Use native file type mappings for TypeScript-side classification#14711Colen Garoutte-Carson (Colengms) wants to merge 5 commits into
Colen Garoutte-Carson (Colengms) wants to merge 5 commits into
Conversation
Colen Garoutte-Carson (Colengms)
marked this pull request as ready for review
August 27, 2026 19:19
Colen Garoutte-Carson (Colengms)
requested a review
from a team
as a code owner
August 27, 2026 19:19
Copilot started reviewing on behalf of
Sean McManus (sean-mcmanus)
August 28, 2026 01:03
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 2
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
Extension/src/LanguageServer/client.ts — The legacy-binary fallback compares the original-case suffix with a lowercase built-in set.… |
|
Extension/src/LanguageServer/client.ts — In a multi-root workspace, this may be an inactive folder client when its asynchronous… |
What changed in this PR
Introduces native-driven file classification to keep TypeScript behavior aligned with the language server.
Changes:
- Adds an atomic file-type registry with bootstrap defaults and language fallback.
- Routes build, debug, and watcher classification through native mappings.
- Adds language associations and focused classification tests.
| File | Description |
|---|---|
Extension/src/fileType.ts |
Implements the file-type registry. |
Extension/src/common.ts |
Uses registry-backed predicates. |
Extension/src/LanguageServer/client.ts |
Receives mappings and updates watcher behavior. |
Extension/src/LanguageServer/cppBuildTaskProvider.ts |
Uses language-aware classification. |
Extension/src/Debugger/configurationProvider.ts |
Updates build/debug eligibility checks. |
Extension/package.json |
Registers additional C++ extensions. |
Extension/test/unit/fileType.test.ts |
Tests mapping and fallback behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot started reviewing on behalf of
Colen Garoutte-Carson (Colengms)
August 28, 2026 01:42
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 2
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
Extension/src/Debugger/configurationProvider.ts — This extension check prevents the registry from enabling detected build/debug tasks for an… |
|
Extension/src/LanguageServer/cppBuildTaskProvider.ts — The new classifier can identify an extensionless exact filename (or an otherwise unregistered… |
Issues resolved since last review (2)
| Severity | Finding |
|---|---|
Extension/src/LanguageServer/client.ts — In a multi-root workspace, this may be an inactive folder client when its asynchronous… View resolved comment |
|
Extension/src/LanguageServer/client.ts — The legacy-binary fallback compares the original-case suffix with a lowercase built-in set.… View resolved comment |
Copilot started reviewing on behalf of
Colen Garoutte-Carson (Colengms)
August 28, 2026 01:50
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: None
Issues resolved since last review (2)
| Severity | Finding |
|---|---|
Extension/src/LanguageServer/cppBuildTaskProvider.ts — The new classifier can identify an extensionless exact filename (or an otherwise unregistered… View resolved comment |
|
Extension/src/Debugger/configurationProvider.ts — This extension check prevents the registry from enabling detected build/debug tasks for an… View resolved comment |
Sean McManus (sean-mcmanus)
left a comment
Contributor
There was a problem hiding this comment.
Reviewed together with the corresponding native protocol change.
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.

Summary
Use the effective mappings published by the native language server as the primary source of truth for TypeScript file classification.
This prevents hardcoded extension lists from drifting from native behavior and avoids forwarding changes for non-C/C++ files to the browse database.
package.jsononly augments VS Code’s language-association registry. VS Code’s built-in C++ language contribution already registers the standard extensions, so this package need only add associations that are missing or that cpptools wants to guarantee independently.Changes
.cppm..Ccompatibility behavior.Validation
yarn compilegit diff --checkDepends on the corresponding native protocol PR. The extension remains compatible with older native binaries through its bootstrap mappings.