Is tsc.exe supposed to run for every project build, regardless of necessity?

Topics: General
Mar 27, 2014 at 3:29 PM
(Using TS 0.97)

We've added a small amount of typescript code to an existing web application (VS2013), and now find a long pause (~10s) at the beginning of every build, regardless of whether or not any .ts files have been modified.

This pause is caused by tsc.exe running, which seems to happen every single build, regardless of need.

I am not enough of a msbuild expert to be able to instantly unpick the log-files and target files to see if this is expected behaviour - to me I would expect that it would be looking at .ts file dates, and comparing them with .js file dates and not rebuilding if it didn't need to.

I can't really believe that the world's slowest compiler (6-7 seconds for "hello, world" here) would saddle its reputation with the world's crudest build process, so it seems I must have something misconfigured on this machine (it's not just the one project). Can anyone confirm that this is true, so that I know I really do need to look harder for the specific problem?

Thanks, Will
Mar 28, 2014 at 10:22 AM
I extended visual studio build tasks to check if any ts file needs compile, just checking .ts and .js files date.
Mar 28, 2014 at 10:42 AM
fabioparra wrote:
I extended visual studio build tasks to check if any ts file needs compile, just checking .ts and .js files date.
Interesting... Is that something you're able to share?
Mar 28, 2014 at 9:31 PM
Here is my repository https://github.com/fabioparra/TypeScriptFastBuild
Its working with typescript 0.97. I dont know if .targets file changed in current 1.0.
Apr 3, 2014 at 9:42 AM
Thanks for this - I'll give it a go.

RTM 1.0 compiler is just as depressingly slow as far as I can tell so far.

I'd love to know why the typescript playground can compile as fast as I can type, whereas the command line takes seconds and seconds of 'Type check time' even for a one-line program...