Skip to content

Commit c148de0

Browse files
committed
Restore self-compilation using built compiler in CI tests
1 parent 38e1f6f commit c148de0

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

Diff for: Gulpfile.mjs

+3
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ const buildSrc = () => buildProject("src");
125125

126126
task("build-src", series(preSrc, buildSrc));
127127

128+
const cleanSrc = () => cleanProject("src");
129+
task("clean-src", series(preSrc, cleanSrc));
130+
128131
/**
129132
* @param {string} entrypoint
130133
* @param {string} output

Diff for: scripts/build/projects.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ProjectQueue {
3131

3232
const execTsc = (/** @type {string[]} */ ...args) =>
3333
exec(process.execPath,
34-
[resolve(findUpRoot(), cmdLineOptions.lkg ? "./lib/tsc" : "./built/local/tsc"),
34+
[resolve(findUpRoot(), cmdLineOptions.lkg ? "./lib/tsc.js" : "./built/local/tsc.js"),
3535
"-b", ...args],
3636
{ hidePrompt: true });
3737

Diff for: scripts/build/tests.mjs

+11-11
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,17 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, _wa
122122
errorStatus = exitCode;
123123
error = new Error(`Process exited with status code ${errorStatus}.`);
124124
}
125-
// else if (cmdLineOptions.ci && runJs.startsWith("built")) {
126-
// // finally, do a sanity check and build the compiler with the built version of itself
127-
// log.info("Starting sanity check build...");
128-
// // Cleanup everything except lint rules (we'll need those later and would rather not waste time rebuilding them)
129-
// await exec("gulp", ["clean-tsc", "clean-services", "clean-tsserver", "clean-lssl", "clean-tests"]);
130-
// const { exitCode } = await exec("gulp", ["local", "--lkg=false"]);
131-
// if (exitCode !== 0) {
132-
// errorStatus = exitCode;
133-
// error = new Error(`Sanity check build process exited with status code ${errorStatus}.`);
134-
// }
135-
// }
125+
else if (cmdLineOptions.ci && runJs.startsWith("built")) {
126+
// finally, do a sanity check and build the compiler with the built version of itself
127+
log.info("Starting sanity check build...");
128+
// Cleanup everything except lint rules (we'll need those later and would rather not waste time rebuilding them)
129+
await exec("gulp", ["clean-src"]);
130+
const { exitCode } = await exec("gulp", ["build-src", "--built"]);
131+
if (exitCode !== 0) {
132+
errorStatus = exitCode;
133+
error = new Error(`Sanity check build process exited with status code ${errorStatus}.`);
134+
}
135+
}
136136
}
137137
catch (e) {
138138
errorStatus = undefined;

0 commit comments

Comments
 (0)