Skip to content
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

Build .tsbuildinfo file when building using tsc --b #29813

Merged
merged 124 commits into from
Mar 8, 2019
Merged
Show file tree
Hide file tree
Changes from 117 commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
edfc91a
Write testcase to baseline with strict, prologues, shebangs
sheetalkamat Nov 7, 2018
607891b
Generate readable source map baselines for -b --out scenario
sheetalkamat Jan 16, 2019
6e57709
Handle shebang when using prepend nodes
sheetalkamat Jan 16, 2019
a90ff10
Tests for multiple prologues
sheetalkamat Jan 16, 2019
c739def
Handle prologues in prepend outputs
sheetalkamat Jan 17, 2019
36eae04
Handle emit helpers in --out scenario
sheetalkamat Jan 23, 2019
ff027d4
Handle triple slash refs
sheetalkamat Jan 25, 2019
0aaa880
Use bundle info to store info about prologues, emit Helpers, referenc…
sheetalkamat Jan 26, 2019
d5b5f8d
Handle --clean with .tsbuildinfo
sheetalkamat Jan 29, 2019
9dabe69
Dont assert but verify sourceMapGenerator
sheetalkamat Jan 29, 2019
36ae7be
Create tests when bundleInfo file is not present
sheetalkamat Jan 29, 2019
717dad9
Dont use tsbundleInfo to determine if bundle needs to be rebuilt
sheetalkamat Jan 29, 2019
c8ff9ac
Merge branch 'master' into prependWithBundleInfo
sheetalkamat Jan 30, 2019
00873f6
Make file generic to be .tsbuildinfo
sheetalkamat Jan 30, 2019
0d9cf96
Make the bundle info into buildInfo
sheetalkamat Jan 30, 2019
315a4dd
Merge branch 'master' into prependWithBundleInfo
sheetalkamat Jan 30, 2019
bb76259
More logs verification
sheetalkamat Jan 30, 2019
d1f3aca
Test case when final project isnt composite project
sheetalkamat Jan 31, 2019
aa74fa1
Fix UnparsedPrologue kind
sheetalkamat Jan 31, 2019
bd76940
If the project only needs prepend output to be changed, prepare to ju…
sheetalkamat Jan 30, 2019
39e37a2
Generate .tsbuildInfo if bundle uses references with prepend
sheetalkamat Jan 31, 2019
362c78e
Create prepend text sections in .buildInfo
sheetalkamat Jan 31, 2019
b15cb6b
Create nodes for unparsed text, prepend text
sheetalkamat Jan 31, 2019
38e0d4d
Add SourceMapUrl to section
sheetalkamat Jan 31, 2019
f7281e3
Use same property name for BundleFileSection and UnparsedNode for eas…
sheetalkamat Jan 31, 2019
db3a4fe
Separate out the tests for tsbuild into its own folder
sheetalkamat Jan 31, 2019
4205eaf
Baseline incremental build baselines
sheetalkamat Feb 1, 2019
3cf46f1
Dont diff with only sources in incremental compilation, diff with the…
sheetalkamat Feb 1, 2019
b7defb3
Some more reorg in test
sheetalkamat Feb 1, 2019
10f0131
Dont do base build again for each incremental scenario
sheetalkamat Feb 1, 2019
79b5992
Verify header updates
sheetalkamat Feb 1, 2019
03fa5bd
Merge branch 'master' into usePrependToSkipBuild
sheetalkamat Feb 1, 2019
66dab21
More refactoring
sheetalkamat Feb 1, 2019
a41d546
Store commonSourceDirectory
sheetalkamat Feb 1, 2019
4050378
Add source information to bundle info and use it to emit header infor…
sheetalkamat Feb 2, 2019
e3eb7bc
Add helpers from source files to the bundleInfo to be used later
sheetalkamat Feb 2, 2019
00917a4
Store pologue information in bundle info
sheetalkamat Feb 4, 2019
aa5d62a
Perform only emit on js file if no decl file change
sheetalkamat Feb 1, 2019
acec3c1
Use stored helpers to emit incrementally
sheetalkamat Feb 2, 2019
a64e5ad
Even though .d.ts doesnt change, the map file most likely changes, so…
sheetalkamat Feb 2, 2019
d9ead78
Map dts file to sections to write and fix from
sheetalkamat Feb 2, 2019
16914cc
Factor out unparsed source file for own creation
sheetalkamat Feb 4, 2019
a0a4e6b
Update test baselines
sheetalkamat Feb 4, 2019
3593685
Use prologue directive information in buildInfo to emit prologues whe…
sheetalkamat Feb 4, 2019
87bb6c9
Merge branch 'master' into usePrependToSkipBuild
sheetalkamat Feb 4, 2019
207ab9c
Since dts file doesnt change the dts bundle info doesnt change either…
sheetalkamat Feb 5, 2019
e6b74ef
Factor out baseline generation into tsbuild helper so that sample can…
sheetalkamat Feb 5, 2019
0571631
Generate baseline of .tsbuildinfo sections
sheetalkamat Feb 6, 2019
ee9d343
Generate baselines for sample
sheetalkamat Feb 5, 2019
3a28fb0
Add another test to generate baseline when sample's logic config file…
sheetalkamat Feb 7, 2019
ab7d65e
Merge branch 'master' into usePrependToSkipBuild
sheetalkamat Feb 7, 2019
ada1c3f
Fix missing comma
sheetalkamat Feb 7, 2019
9794080
Merge branch 'master' into usePrependToSkipBuild
sheetalkamat Feb 7, 2019
212cd62
Generate buildInfo for non --out and prepend options as well
sheetalkamat Feb 5, 2019
e3f8c34
Add mechanism to dump and read program to build info
sheetalkamat Feb 6, 2019
23b5b14
Fix incremental build changes declaration dir
sheetalkamat Feb 7, 2019
8f18cec
Dont emit program information in --out scenarios
sheetalkamat Feb 7, 2019
adcb79a
Emit bundle information into bundle field of buildinfo and only if bu…
sheetalkamat Feb 7, 2019
99df323
Merge branch 'master' into incrementalBuildInfo
sheetalkamat Feb 7, 2019
1d77008
Handle when no .tsbuildinfo is to be generated
sheetalkamat Feb 8, 2019
217a342
Move bundleFileInfo as printer options
sheetalkamat Feb 11, 2019
499bc70
Make printer option to be writing bunfle file info and use the result…
sheetalkamat Feb 11, 2019
b958f1c
Merge branch 'master' into incrementalBuildInfo
sheetalkamat Feb 14, 2019
a881391
Merge branch 'master' into incrementalBuildInfo
sheetalkamat Feb 20, 2019
aa773e0
Tests for strip internal
sheetalkamat Feb 11, 2019
5370422
Add test for multi level prepend
sheetalkamat Feb 14, 2019
a0f3420
Add sections to the prepend (to be later used for stripInternal)
sheetalkamat Feb 15, 2019
0cd7074
Handle emit when using prepends and the referencing project has --str…
sheetalkamat Feb 15, 2019
1c8970d
Handle synthetic references better
sheetalkamat Feb 20, 2019
d9311f9
Fix issue with .tsbuildinfo the .d.ts emit when emitting without crea…
sheetalkamat Feb 20, 2019
224f3ca
Enable other stripinternal test cases
sheetalkamat Feb 20, 2019
4bef3ac
Because we already have texts for fixing the emits, write them only i…
sheetalkamat Feb 20, 2019
d25a6e1
Combine d.ts and .js emit
sheetalkamat Feb 21, 2019
db2cfa0
Fix emit when internal propogates through multiple levels of references
sheetalkamat Feb 21, 2019
86b610d
Merge branch 'master' into incrementalBuildInfo
sheetalkamat Feb 21, 2019
32026a2
Accept public Baselines
sheetalkamat Feb 21, 2019
e9fb843
Add test to verify incremental build is same as if its built clean
sheetalkamat Feb 21, 2019
ad72aef
Correctly set sourceFileInfo for bundle when generating output withou…
sheetalkamat Feb 21, 2019
7d464b8
Redirect getProgramBuildInfo onto builder so that we can test it for …
sheetalkamat Feb 21, 2019
bc4186c
Update the programBuildInfo to be platform and change independent so …
sheetalkamat Feb 21, 2019
29862ce
Refactoring for outFile tests
sheetalkamat Feb 21, 2019
1e24cd1
Allow empty own source files
sheetalkamat Feb 22, 2019
89c4c4f
Update the message to not just mean javascript since we might need to…
sheetalkamat Feb 22, 2019
494bd92
Report error if overwriting buildInfo of another project reference
sheetalkamat Feb 22, 2019
4dc8ac7
Fix the crash found while compiling src/compiler
sheetalkamat Feb 22, 2019
22804c1
Allow away to only test baselines excluding all other file read check…
sheetalkamat Feb 22, 2019
23cd45b
Test when internal and text region dont mix well together
sheetalkamat Feb 22, 2019
a63d69d
Fix incorrect emit when internal method is inside internal interface
sheetalkamat Feb 22, 2019
2b10b68
Test that shows stripInternal of enum member prints multiple blank li…
sheetalkamat Feb 22, 2019
ab66b1e
Fix the blank lines for internal enum members with --stripInternal
sheetalkamat Feb 22, 2019
415a5db
Add test when declarationMap and sourcemap are disabled in the refere…
sheetalkamat Feb 22, 2019
e1b18ab
Merge branch 'master' into incrementalBuildInfo
sheetalkamat Feb 22, 2019
9730cfa
Dont emit sourceMapUrl from prepend text into the --out file
sheetalkamat Feb 22, 2019
9fa2815
Enable building typescript.d.ts with current source
sheetalkamat Feb 22, 2019
8b06115
For now disable the new build
sheetalkamat Feb 23, 2019
ed35741
Merge branch 'master' into incrementalBuildInfo
sheetalkamat Feb 27, 2019
d53efdf
Changes to generation of .tsbuildinfo:
sheetalkamat Feb 28, 2019
5fd745d
Update the tsconfigs
sheetalkamat Feb 28, 2019
45f53c7
Accept baselines
sheetalkamat Feb 28, 2019
46ddbff
Fix test by reverting change in textChanges that occured by mistake i…
sheetalkamat Feb 28, 2019
df9da15
Incremental false with composite not allowed
sheetalkamat Feb 28, 2019
cd195c9
Add options tsBuildInfoFile to provide name for the buildinfo file
sheetalkamat Mar 1, 2019
8b964f4
Fix incorrect message when incremental is false with composite projects
sheetalkamat Mar 1, 2019
223d428
Merge branch 'master' into incrementalBuildInfo
sheetalkamat Mar 1, 2019
026c1dd
Fix the build error
sheetalkamat Mar 1, 2019
8e7db4d
Because .tsbuildinfo is flag now, use .tsbuildinfo just like any othe…
sheetalkamat Mar 1, 2019
21ea017
Refactor the tests
sheetalkamat Mar 1, 2019
ba1dc9e
Update LKG with the branch build
sheetalkamat Mar 1, 2019
d783355
Update gulp to build using this branch
sheetalkamat Mar 1, 2019
276cb58
Accept baselines with new build system
sheetalkamat Mar 1, 2019
b879b43
Add tests to verify output of --out with modules as output
sheetalkamat Mar 5, 2019
ac55310
Fix prologue emitting in case of modules with --out scenario
sheetalkamat Mar 5, 2019
6e1e1e7
Merge branch 'master' into incrementalBuildInfo
sheetalkamat Mar 5, 2019
69f65f5
Update LKG
sheetalkamat Mar 5, 2019
67930ea
Store semantic diagnostics as well (for future tsc without build but …
sheetalkamat Mar 1, 2019
0469cc6
Update LKG
sheetalkamat Mar 5, 2019
6707172
Fix unnecessary additional deletion paths from cleanLssl target
sheetalkamat Mar 5, 2019
fbfd349
Change to debug fail instead of assert never
sheetalkamat Mar 8, 2019
990b199
Merge branch 'master' into incrementalBuildInfo
sheetalkamat Mar 8, 2019
d4cfa41
To test platform independent buildInfo baselines, move the logic to w…
sheetalkamat Mar 8, 2019
409d6c9
Add compiler version to buildInfo
sheetalkamat Mar 8, 2019
ecb2ce4
Add tests that will verify that all rebuilding with new compiler vers…
sheetalkamat Mar 8, 2019
68e28da
Build project if existing project was built with different compiler v…
sheetalkamat Mar 8, 2019
b2cda16
Update LKG
sheetalkamat Mar 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 10 additions & 32 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { src, dest, task, parallel, series, watch } = require("gulp");
const { append, transform } = require("gulp-insert");
const { browserify } = require("./scripts/build/browserify");
const { prependFile } = require("./scripts/build/prepend");
const { exec, readJson, needsUpdate, getDiffTool, getDirSize, flatten, rm } = require("./scripts/build/utils");
const { exec, readJson, needsUpdate, getDiffTool, getDirSize, rm } = require("./scripts/build/utils");
const { runConsoleTests, cleanTestDirs, writeTestConfigFile, refBaseline, localBaseline, refRwcBaseline, localRwcBaseline } = require("./scripts/build/tests");
const { buildProject, cleanProject, watchProject } = require("./scripts/build/projects");
const cmdLineOptions = require("./scripts/build/options");
Expand Down Expand Up @@ -114,18 +114,8 @@ const localPreBuild = parallel(generateLibs, series(buildScripts, generateDiagno
const preBuild = cmdLineOptions.lkg ? lkgPreBuild : localPreBuild;

const buildServices = (() => {
// flatten the services project
const flattenServicesConfig = async () => flatten("src/services/tsconfig.json", "built/local/typescriptServices.tsconfig.json", {
compilerOptions: {
"removeComments": false,
"stripInternal": true,
"declarationMap": false,
"outFile": "typescriptServices.out.js"
}
});

// build typescriptServices.out.js
const buildTypescriptServicesOut = () => buildProject("built/local/typescriptServices.tsconfig.json", cmdLineOptions);
const buildTypescriptServicesOut = () => buildProject("src/typescriptServices/tsconfig.json", cmdLineOptions);

// create typescriptServices.js
const createTypescriptServicesJs = () => src("built/local/typescriptServices.out.js")
Expand Down Expand Up @@ -167,13 +157,13 @@ const buildServices = (() => {
.pipe(dest("built/local"));

return series(
flattenServicesConfig,
buildTypescriptServicesOut,
createTypescriptServicesJs,
createTypescriptServicesDts,
createTypescriptJs,
createTypescriptDts,
createTypescriptStandaloneDts);
createTypescriptStandaloneDts,
);
})();
task("services", series(preBuild, buildServices));
task("services").description = "Builds the language service";
Expand All @@ -186,13 +176,13 @@ const cleanServices = async () => {
await cleanProject("built/local/typescriptServices.tsconfig.json");
}
await del([
"built/local/typescriptServices.tsconfig.json",
"built/local/typescriptServices.out.js",
"built/local/typescriptServices.out.d.ts",
"built/local/typescriptServices.out.tsbuildinfo",
"built/local/typescriptServices.js",
"built/local/typescript.js",
"built/local/typescript.d.ts",
"built/local/typescript_standalone.d.ts",
"built/local/typescript_standalone.d.ts"
]);
};
cleanTasks.push(cleanServices);
Expand Down Expand Up @@ -248,20 +238,8 @@ task("watch-min").flags = {
}

const buildLssl = (() => {
// flatten the server project
const flattenTsServerProject = async () => flatten("src/tsserver/tsconfig.json", "built/local/tsserverlibrary.tsconfig.json", {
exclude: ["src/tsserver/server.ts"],
compilerOptions: {
"removeComments": false,
"stripInternal": true,
"declaration": true,
"declarationMap": false,
"outFile": "tsserverlibrary.out.js"
}
});

// build tsserverlibrary.out.js
const buildServerLibraryOut = () => buildProject("built/local/tsserverlibrary.tsconfig.json", cmdLineOptions);
const buildServerLibraryOut = () => buildProject("src/tsserverlibrary/tsconfig.json", cmdLineOptions);

// create tsserverlibrary.js
const createServerLibraryJs = () => src("built/local/tsserverlibrary.out.js")
Expand All @@ -282,10 +260,10 @@ const buildLssl = (() => {
.pipe(dest("built/local"));

return series(
flattenTsServerProject,
buildServerLibraryOut,
createServerLibraryJs,
createServerLibraryDts);
createServerLibraryDts,
);
})();
task("lssl", series(preBuild, buildLssl));
task("lssl").description = "Builds language service server library";
Expand All @@ -298,9 +276,9 @@ const cleanLssl = async () => {
await cleanProject("built/local/tsserverlibrary.tsconfig.json");
}
await del([
"built/local/tsserverlibrary.tsconfig.json",
"built/local/tsserverlibrary.out.js",
"built/local/tsserverlibrary.out.d.ts",
"built/local/tsserverlibrary.out.tsbuildinfo",
"built/local/tsserverlibrary.js",
"built/local/tsserverlibrary.d.ts",
]);
Expand Down
54 changes: 54 additions & 0 deletions lib/enu/diagnosticMessages.generated.json.lcg
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,18 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_non_dry_build_would_update_output_of_project_0_6375" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A non-dry build would update output of project '{0}']]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A non-dry build would update timestamps for output of project '{0}']]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A parameter initializer is only allowed in a function or constructor implementation.]]></Val>
Expand Down Expand Up @@ -1641,6 +1653,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot update output of project '{0}' because there was error reading file '{1}']]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot use JSX unless the '--jsx' flag is provided.]]></Val>
Expand Down Expand Up @@ -1671,6 +1689,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}']]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot write file '{0}' because it would be overwritten by multiple input files.]]></Val>
Expand Down Expand Up @@ -1869,6 +1893,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Composite_projects_may_not_disable_incremental_compilation_6379" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Composite projects may not disable incremental compilation.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Computed_property_names_are_not_allowed_in_enums_1164" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Computed property names are not allowed in enums.]]></Val>
Expand Down Expand Up @@ -2421,6 +2451,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Enable_incremental_compilation_6378" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Enable incremental compilation]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Enable_project_compilation_6302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Enable project compilation]]></Val>
Expand Down Expand Up @@ -4485,6 +4521,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Project '{0}' is out of date because output of its dependency '{1}' has changed]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Project_0_is_up_to_date_6361" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Project '{0}' is up to date]]></Val>
Expand Down Expand Up @@ -5343,6 +5385,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Specify_file_to_store_incremental_compilation_information_6380" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Specify file to store incremental compilation information]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Specify_library_files_to_be_included_in_the_compilation_6079" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Specify library files to be included in the compilation.]]></Val>
Expand Down Expand Up @@ -6465,6 +6513,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_timestamps_of_project_0_6359" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output timestamps of project '{0}'...]]></Val>
Expand Down
Loading