-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Build .tsbuildinfo file when building using tsc --b #29813
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
Conversation
…st manipulate output Step 1: Update the verbose log to reflect it
src/compiler/emitter.ts
Outdated
| if (declarationMapText === text) return; | ||
| break; | ||
| default: | ||
| Debug.assertNever(name as never); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asserting to never here defeats the purpose of the assertNever function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e. this should just be Debug.fail
|
@RyanCavanaugh Added logic to start from scratch if not same compiler version as discussed in design meeting. |
|
Best feature of 3.4! |
|
Should we commit |
|
@tommedema They are like the output .js files and shouldn't be committed to version control. |
|
@tommedema don't think so, it is a cache which will be overridden by next tsc launch if code changes |
This isn't the behaviour I'm seeing using When using Should I log a new issue for this? It seems easy to repro but I can work on one if needed. |
|
Ah, thank you! |
incrementalfile with.tsbuildinfoextension is emitted.incrementalastrueand its error to specifyincrementalasfalsein the composite projecttsBuildInfoFileoptions, it uses the path specified by that to write the build information.outoroutFileoption, theoutFileWithoutExtension.tsbuildinfofile is written next to output js file.outDir, config files base file name with extension as.tsbuildinfois written inoutDir.tsbuildinfois written next to the config fileBuildInfoshown below.programin buildInfo is Builder information so we can track the file changes since that version and build incrementally even without watch (that is emitting only affected files or getting errors only from changed/affected files). This should help us get perf similar to --w incremental builds even on subsequent invokes of build (In short we are serializing information of builder program that we keep in memory during incremental builds in--wmode). Also pulled 6c5ae93 to store semantic diagnostics though in--bscenario it will always be just file name as emit happens only if there are no errors.bundlestores information to be able to emit into single file. This consists of different sections in file, eg. prologues, prepended file contents and their range's. When having project that references another project withprependastrue, this helps in faster emit when the referenced project changes but it doesn't change declaration file. Previously we would have to create program for project referencing changed output to generate new output, but this just uses section information from buildinfo file and emit new output without having to create program. This saves us time for creating program and checking errors (since the errors are not cached with --out as we cant tell change in declaration emit) and emitting all files. Having section also fixes issues like Duplicate"use strict"prologue in the generated output. #25550 to generate better output.internaldeclaration sections, so if project hasstripInternalinstead of concatenating whole string it skips out portions ofinternaland generates correct.d.ts--outsince any change means new emit and new diagnostics, so its ok to not store program information in this case and in other scenario there is nothing of importance in those other section than program so may be separating these two (reading and writing only modified field) might not be a bad decision. But will need to see how that goes.Measured perf with updating LKG from master to build this branch using
gulp localand then with this branch's build as LKG and usinggulp local