-
Notifications
You must be signed in to change notification settings - Fork 12.8k
tsc --build --watch (with or without --incremental) touches all files causing problems for downstream tooling #46661
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
Comments
Itβs not unnecessary: 7b290fd
Sounds like this is used to tell future invocations of tsc that outputs are up-to-date, allowing work to be skipped. |
@andrewbranch thanks for responding. I'm not disputing that this is how it works, merely that perhaps there are better ways that don't affect downstream operations. This issue definitely exists. tsc may be working as intended, but not as it is needed to or IMHO should. Could the incremental data not contain information to remove the need to do this (for example)? |
Iβm curious if youβre having issues with anything besides Karma. Also what does it mean for them to be βcompletely killedβ? |
Hi, yeah I should have elaborated. Karma watch seems to be based on timestamps, so when one typescript file changes, tsc --watch touches all files and then karma change notifications happen for ALL files (this is really, several minutes sometimes, slow). I completely understand that karma should be better in this, however the root cause as I see it is that tsc shouldn't be touching files that it doesn't need to. There may be several other tools that have this same problem. |
Weβve opened #46677 to track experiments with this. It may be a while before we can get to it, so I would encourage you to subscribe there (@typescript-bot will eventually close this issue). Weβre unfortunately at a temporary shortage of people who have a deep understanding of our watch/build/incremental mode stuff, but itβs something we know we need to give more attention to when we can. I just wanted to convey that this is expected behavior for now, but weβre listening to feedback, but also you may want to investigate some workarounds in the short term. Thanks for understanding! |
Awesome thanks. |
Please also note that we are running on docker which is I suspect a contributing factor to the performance issue for downstream tooling. |
This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
If you'd be would be willing to try out tomorrow's nightly build, we'd appreciate the feedback! |
Bug Report
π Search Terms
touch watch timestamp
π Version & Regression Information
β― Playground Link
N/A
π» Code
tsc --build --watch
π Actual behavior
Given a TSC output including:
-rw-r--r-- 1 root root 28561 Nov 3 13:25 app.js
-rw-r--r-- 1 root root 11643 Nov 3 13:25 app.js.map
Change a single file that isn't app.ts results in:
-rw-r--r-- 1 root root 28561 Nov 3 13:37 app.js
-rw-r--r-- 1 root root 11643 Nov 3 13:37 app.js.map
This completely kills downstream tools (e.g. the karma testing tool, when it is watching the output) that are watching the files for changes. Yes these could do a better job but the cause just seems so unnecessary and avoidable (especially with the --incremental option!).
π Expected behavior
-rw-r--r-- 1 root root 28561 Nov 3 13:25 app.js
-rw-r--r-- 1 root root 11643 Nov 3 13:25 app.js.map
Changes to TS files don't result in any changes to any JS file that didn't have it's TS file changed
-rw-r--r-- 1 root root 28561 Nov 3 13:25 app.js
-rw-r--r-- 1 root root 11643 Nov 3 13:25 app.js.map
I've tried with and without the --incremental flag and no joy.
The text was updated successfully, but these errors were encountered: