Reinforced.Typings icon indicating copy to clipboard operation
Reinforced.Typings copied to clipboard

Only overwrite generated .ts file if changed

Open nvirth opened this issue 5 years ago • 2 comments

Please in case the output .ts files already exist, only overwrite them if their content changed since the previous build. It seems Visual Studio build checks the files' last modified date to detect changes. Including the generated .ts files in a .csproj makes that project always rebuild

nvirth avatar Nov 27 '19 13:11 nvirth

It seems Visual Studio build checks the files' last modified date to detect changes.

That is actualyl strange because it should use something like file system watcher and it works regardless of modification date, but okay.

pavel-b-novikov avatar Nov 29 '19 09:11 pavel-b-novikov

dont know about Visual Studio, but Visual Studio Code re-analyzes all of the deleted/readded typescript files.

And since the generated ones can easily be into hundreds, its Typescript engine often crashes from too much work and reports the files as non existing, filling the source code with red squigglies and disabling typesafety.

So updating files only if they've changed would let Visual Studio Code take a bit of a rest in this case and not work itself into a crashed state.

ReinisV avatar Dec 23 '21 12:12 ReinisV