-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Changes in .ts files are ignored on 2nd and next builds for indirect includes (--build) #49655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Possibly related: #49543? |
This is working as intended. You can use
|
On first compiler run, the I tried to use Please note that in my case it is not desirable to include all files using glob pattern like "*" as there are more builds, and each should output only files that are actually imported from the "main" file. |
second run shows that based on your config, index.ts and index.js are uptodate and hence project is not built. You can run |
This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
Bug Report
π Search Terms
I tried many searches but did not find this issue. Though this issue looks related #49527
π Version & Regression Information
This behaviors occurs at least on 4.7.4 and 4.8.0-beta.
β― Playground Link
I was not able to setup Bug Workbench playground because I was not able to make it work with
@files
switch, even if it is documented it should work.π» Code
π Actual behavior
tsc --build
, it builds successfully, producingindex.ts
andutils.ts
, and skips files which are not imported, if any.pi
constant or make syntactic error inutils.ts
file.π Expected behavior
There is another scenario which behave the same way. When instead of
files
theincluded
options is used, but pointing only to folder whereindex.ts
files is. Theutils.ts
has to be in different folder.Originally I started investigating regression in 4.8.0-beta on existing project which uses incremental build and only one "index" file in the files tsconfig option. There the first build passes OK, but after I change code or make error in a file, the build finishes without doing any work (reporting error or emitting code). Also the 2nd and all next builds are very quick - less than 1s. Where for 4.7.4 it took several seconds. Yet in the case of the full project the 4.7.4 (and many previous versions) behaves as expected, which is not in case of this simplified code. So there might be more special cases of this issue.
The text was updated successfully, but these errors were encountered: