Skip to content

tsc --build --watch (with or without --incremental) touches all files causing problems for downstream toolingΒ #46661

Closed
@jfstephe

Description

@jfstephe

Bug Report

πŸ”Ž Search Terms

touch watch timestamp

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about timestamp/touch

⏯ 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fix AvailableA PR has been opened for this issueFixedA PR has been merged for this issueSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions