Skip to content

ConfigFileDiagnosticEvent fires for files not selected by tsconfig #16635

Closed
@krisselden

Description

@krisselden

TypeScript Version: 2.4.0 / nightly (2.5.0-dev.201xxxxx)

Code

Reproduction:
https://github.com/krisselden/tsserver-config-file-diag-issue

Basically if a tsconfig.json uses a include/exclude instead of files to select input, tsserver will notify any change to a ts file in or below the directory containing the tsconfig even if not matched as input.

Expected behavior:
Don't fire the event for ts files that don't belong to the tsconfig.json file.

Actual behavior:
Any file ts file change emits this event.

This issue came to light due to a recent change in VS Code 1.13.0 which always opens the triggerFile for this event, causing the tsserver to create an implicit project for it since it doesn't belong to the actual project. Due to our build system staging files in tmp/ this causes tsserver to open a lot of files with the implicit project.

microsoft/vscode@0d5c9f4

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions