Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler Watch Mode does not re-compile if extended tsconfig changes. #40564

Closed
12wrigja opened this issue Sep 15, 2020 · 2 comments
Closed

Compiler Watch Mode does not re-compile if extended tsconfig changes. #40564

12wrigja opened this issue Sep 15, 2020 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@12wrigja
Copy link

TypeScript Version: Version 4.1.0-dev.20200914

Search Terms:
Watch mode, tsserver watch, watch
Code

/// main/tsconfig.json

{"extends": "../configs/tsconfig_editor.json"}

/// configs/tsconfig_editor.json

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node"
  },
  "files": [
          "../main/test.ts"
  ]
}

/// main/test.ts

console.log('hello world');

/// main/test1.ts

console.log('hello world 1');

I ran tsc from the main directory like so:

./node_modules/typescript/bin/tsc -w -p tsconfig.json

test is compiled just fine.

I then edit configs/tsconfig_editor.json and add an entry for test1.ts into the files list.

Expected behavior:

tsc notices that the extended config has changed and recompiles, also compiling test1.ts.

Actual behavior:

tsc does nothing.

My actual issue lies with vscode's language services integration (that doesn't update the language service results when the underlying extended config is changed by our build system), but it seems that this codepath (based on skimming the tsserver source) is broken here too. Looking at the tsserver logs, it seems a watch is setup for main/tsconfig.json but not for the file it extends from.

@sheetalkamat
Copy link
Member

Duplicate of #17753

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Sep 16, 2020
@typescript-bot
Copy link
Collaborator

This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants