Wrong detection of up-to-date state composite project with no included files #31288
Labels
Bug
A bug in TypeScript
Domain: tsc -b
Issues related to build mode
Fixed
A PR has been merged for this issue
Milestone
TypeScript Version: 3.5.0-dev.20190507, 3.4.4
Search Terms: composite projects
Let's say we have a composite project with the following structure:
where
src/tsconfig.json
refers tosrc/folder
andsrc/folder2
composite sub-projects,tests/tsconfig.json
refers tosrc/
and includestests/index.ts
module. Bothsrc/folder
andsrc/folder2
projects includes they localindex.ts
modules.tsconfig.json
from the root refers tosrc/
andtests/
sub-projects.So, such project we build via
./node_modules/.bin/tsc -b . --verbose
.For the first run we have the following output:
It looks fine for now. But if we compile it in the next time without any change of the code we'll get the following:
As you can see, the compiler treats
tests/tsconfig.json
project as out of date because of out of datesrc
project. But we don't change anything.It looks like the problem happens only if a project refers to another project(s) without including any file (
src/tsconfig.json
refers tosrc/folder
andsrc/folder2
and include nothing).If we add any file to
src/tsconfig.json
project no recompilation oftests
happened.Note: according #3469 (comment)
Code
Here is zip with a project I describe above, just unzip it, run
npm install
and then run twicenpm run build
.bug.zip
Expected behavior:
No recompilation in the second time if we change nothing.
Actual behavior:
Recompilation on each build even if we change nothing.
Related Issues: #3469
The text was updated successfully, but these errors were encountered: