Skip to content

Commit 34ac679

Browse files
committed
Try and fix up LKG
1 parent d1f6522 commit 34ac679

File tree

2 files changed

+38
-23
lines changed

2 files changed

+38
-23
lines changed

Gulpfile.js

+6-12
Original file line numberDiff line numberDiff line change
@@ -550,27 +550,20 @@ const importDefinitelyTypedTests = () => exec(process.execPath, ["scripts/import
550550
task("importDefinitelyTypedTests", series(buildImportDefinitelyTypedTests, importDefinitelyTypedTests));
551551
task("importDefinitelyTypedTests").description = "Runs the importDefinitelyTypedTests script to copy DT's tests to the TS-internal RWC tests";
552552

553-
// TODO(jakebailey): There isn't a release build anymore; figure out what to do here.
554-
// Probably just use tsc.js.
555-
556-
const buildReleaseTsc = () => buildProject("src/tsc/tsconfig.release.json");
557-
const cleanReleaseTsc = () => cleanProject("src/tsc/tsconfig.release.json");
558-
cleanTasks.push(cleanReleaseTsc);
559-
560553
const cleanBuilt = () => del("built");
561554

562555
const produceLKG = async () => {
556+
// TODO(jakebailey): there are probably more files here that are needed.
563557
const expectedFiles = [
564-
"built/local/tsc.release.js",
565-
"built/local/typescriptServices.js",
566-
"built/local/typescriptServices.d.ts",
558+
"built/local/tsc.js",
567559
"built/local/tsserver.js",
568560
"built/local/typescript.js",
569561
"built/local/typescript.d.ts",
570562
"built/local/tsserverlibrary.js",
571563
"built/local/tsserverlibrary.d.ts",
572564
"built/local/typingsInstaller.js",
573-
"built/local/cancellationToken.js"
565+
"built/local/cancellationToken.js",
566+
"built/local/watchGuard.js",
574567
].concat(libs.map(lib => lib.target));
575568
const missingFiles = expectedFiles
576569
.concat(localizationTargets)
@@ -586,7 +579,8 @@ const produceLKG = async () => {
586579
}
587580
};
588581

589-
task("LKG", series(lkgPreBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl, buildOtherOutputs, buildReleaseTsc), produceLKG));
582+
// TODO(jakebailey): dependencies on dts
583+
task("LKG", series(lkgPreBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl, buildOtherOutputs), produceLKG));
590584
task("LKG").description = "Makes a new LKG out of the built js files";
591585
task("LKG").flags = {
592586
" --built": "Compile using the built version of the compiler.",

scripts/produceLKG.ts

+32-11
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,27 @@ async function copyLocalizedDiagnostics() {
2828
const dir = await fs.readdir(source);
2929
const ignoredFolders = ["enu"];
3030

31+
// TODO(jakebailey): Instead of ignoring folders, we should keep a list of
32+
// the localizationTargets somewhere that can be used by multiple modules.
33+
ignoredFolders.push(
34+
"compiler",
35+
"deprecatedCompat",
36+
"executeCommandLine",
37+
"harness",
38+
"jsTyping",
39+
"loggedIO",
40+
"server",
41+
"services",
42+
"testRunner",
43+
"tsc",
44+
"tsserver",
45+
"tsserverlibrary",
46+
"typescript",
47+
"typingsInstaller",
48+
"typingsInstallerCore",
49+
"webServer",
50+
);
51+
3152
for (const d of dir) {
3253
const fileName = path.join(source, d);
3354
if (
@@ -44,20 +65,20 @@ async function copyTypesMap() {
4465
}
4566

4667
async function copyScriptOutputs() {
47-
await copyWithCopyright("cancellationToken.js");
48-
await copyWithCopyright("tsc.release.js", "tsc.js");
49-
await copyWithCopyright("tsserver.js");
50-
await copyFromBuiltLocal("tsserverlibrary.js"); // copyright added by build
51-
await copyFromBuiltLocal("typescript.js"); // copyright added by build
52-
await copyFromBuiltLocal("typescriptServices.js"); // copyright added by build
53-
await copyWithCopyright("typingsInstaller.js");
54-
await copyWithCopyright("watchGuard.js");
68+
// TODO(jakebailey): This does not work when unbundled.
69+
// TODO(jakebailey): Copyright is added by esbuild; maybe we should do it here?
70+
await copyFromBuiltLocal("cancellationToken.js");
71+
await copyFromBuiltLocal("tsc.js");
72+
await copyFromBuiltLocal("tsserver.js");
73+
await copyFromBuiltLocal("tsserverlibrary.js");
74+
await copyFromBuiltLocal("typescript.js");
75+
await copyFromBuiltLocal("typingsInstaller.js");
76+
await copyFromBuiltLocal("watchGuard.js");
5577
}
5678

5779
async function copyDeclarationOutputs() {
58-
await copyFromBuiltLocal("tsserverlibrary.d.ts"); // copyright added by build
59-
await copyFromBuiltLocal("typescript.d.ts"); // copyright added by build
60-
await copyFromBuiltLocal("typescriptServices.d.ts"); // copyright added by build
80+
await copyWithCopyright("tsserverlibrary.d.ts");
81+
await copyWithCopyright("typescript.d.ts");
6182
}
6283

6384
async function writeGitAttributes() {

0 commit comments

Comments
 (0)