Skip to content

tsc --watch gives diagnostic if file renamed #19989

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

Closed
ghost opened this issue Nov 13, 2017 · 2 comments
Closed

tsc --watch gives diagnostic if file renamed #19989

ghost opened this issue Nov 13, 2017 · 2 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@ghost
Copy link

ghost commented Nov 13, 2017

TypeScript Version: 2.7.0-dev.20171112
Tested on Linux Mint 18.

Code

Create a project with a tsconfig.json of just {} and an empty file src/a.ts.
Run tsc --watch.
Rename a.ts to b.ts.

Expected behavior:

No error.

Actual behavior:

error TS6053: File '/home/andy/sample/ts/src/a.ts' not found.

CC @sheetalkamat

@sheetalkamat
Copy link
Member

@Andy-MS can you please tryout drop from PR #21243 which adds multiple options using environment variables TSC_WATCHFILE and TSC_WATCHDIRECTORY. The drop is built and shared at localBuilt.zip

The different options are explained in #21243 (comment) . Experience and feedback about these options is appreciated and would help us make decision on which strategy to go as default.

@ghost
Copy link
Author

ghost commented Jan 25, 2018

I tried it out and that fixes this issue with the default settings.
Could you add a warning if the option passed to TSC_WATCHFILE or TSC_WATCHDIRECTORY is invalid? Hard to tell if trying to set those is making any difference.

@sheetalkamat sheetalkamat added the Fixed A PR has been merged for this issue label Mar 9, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

2 participants