Closed
Description
TypeScript Version: nightly (2.2.0-dev.201xxxxx)
tsc incremental compilation rewrites all compiled files on docker volume (docker for windows)
To reproduce it:
- install docker for windows or try with your instlaled docker
- create dir and make
npm init
npm install typescript@next
- create two files
1.ts
and2.ts
with some code. - run tsc in docker
docker run --rm -v FULL_PATH_TO_YOUR_DIR:/app -w /app mhart/alpine-node:7.1.0 ./node_modules/.bin/tsc -w
- see that tsc created both files
1.js
and2.js
- wait some minute then change the code of only
1.ts
- tsc will recompile
- see the date for
1.js
and2.js
, you will see that2.js
too has been rewritten, though it should not be the case (it is not the case if you run tsc without docker windows)
This happens due to this check:
https://github.com/Microsoft/TypeScript/blob/e4b81d03311ae157486dd2ebbd7d381996066174/src/compiler/program.ts#L148
and that ts.getModifiedTime
returns strange result, probably this is not a typescript issue, but docker/node, but an issue for typescript users.
Btw what is a reason to check time modified, isn't the hash is just enough?
Windows 10, docker for windows 1.12.5 (this the same case should be for docker for mac)