microsoft / microsoft/TypeScript

PluginModule.onConfigurationChanged not called when plugin config in tsconfig.json changes

Open
#28,969 3 comments 0 reactions 1 assignee View on GitHub

@sheetalkamat is already working on this.

Since Dec 11, 2018.

Domain: LS: TSServer Experience Enhancement Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

TypeScript Version: 3.3.0-dev.20181208

Search Terms:

plugin configuration change
onConfigurationChanged

Expected behavior:

PluginModule.onConfigurationChanged is called when the configuration of the plugin in tsconfig.json changes. The Project already watches the tsconfig.json and therefore knows when the config of a plugin changes.

Actual behavior:

PluginModule.onConfigurationChanged is only called when the client sends a ConfigurePlugin command.

Related Issues:
#15915 is basically the same issue from 1,5 years ago. Back then it was decided this is working as intended and a plugin is responsible for watching the config file.
In the meantime onConfigurationChanged was introduced in #28106. Since ConfigurePlugin command is supposed to override any config in tsconfig.json, a plugin that watches for config file changes would need special handling to account for that fact.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.