Incremental --build, then delete generated js file, then another incremental --build does not recreate js file
See original GitHub issueTypeScript Version: 3.4.0-dev.20190326
Search Terms:
incremental
Code
tsconfig.json:
{
"compilerOptions": {
"incremental": true
}
}
x.ts:
console.log("hello");
Expected behavior:
$ tsc --build
x.js
has been generated$ rm x.js
$ tsc --build
Expected: x.js has been regenerated
Actual behavior:
x.js still does not exist
Related Issues:
Did not find any.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:44
- Comments:37 (6 by maintainers)
Top Results From Across the Web
How to delete compiled JS files from previous typescript(.ts ...
The problem is when I, for example, rename the file boot.ts to bootstrap.ts and compile again, corresponding bootstrap.js file is created but the...
Read more >A Complete Guide To Incremental Static Regeneration (ISR ...
Incremental Static Regeneration (ISR) is a new evolution of the Jamstack, allowing you to update static content instantly without needing a ...
Read more >Improving the speed of incremental builds - Apple Developer
If compilation of a particular file takes significantly longer than other files, examine the file to see if header importation issues are causing...
Read more >Incremental Static Regeneration - Data Fetching - Next.js
When a request is made to a page that was pre-rendered at build time, it will initially show the cached page. Any requests...
Read more >Create a custom task - MSBuild - Microsoft Learn
The example also shows how to support incremental build, so that the code is generated only when the input files have changed. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A separate, but possibly related issue: deleting source
.ts
files does not remove the related.js
files. Right now, to address this, I clean the output directory before every compilation - but this makes it impossible for me to use the--incremental
flag.Thanks for the clarification, @RyanCavanaugh. Here’s my thoughts:
In the general case, I’m fine with this, even if it breaks the cache transparency, I think. But it’s pretty common to delete the entire output directory, and it’s an unnecessary small cut to have to remember to delete the build cache too compared to other tools. Perhaps checking for just the output dir leads to false confidence?
Substantially, perhaps, but the standard use case is the pack up everything in the out directory. For someone that’s not paying attention, this means they are bloating their package size.
Eh, depends on your style. moving source files is fairly common. The repo I’m in at the moment has 43 renames or deletes in the last 100 commits.
Not sure why there are scare quotes here: what’s wrong with
lastBuildOutput.filter(f => !newBuildOutput.includes(f))
?