Skip to content

Commit

Permalink
Add TODOs in Gulpfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Sep 13, 2022
1 parent 529ac2b commit e1cf7e2
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ const cmdLineOptions = require("./scripts/build/options");
const copyright = "CopyrightNotice.txt";
const cleanTasks = [];

const testRunner = "./built/local/testRunner/_namespaces/Harness.js";

const buildScripts = () => buildProject("scripts");
task("scripts", buildScripts);
task("scripts").description = "Builds files in the 'scripts' folder.";
Expand Down Expand Up @@ -119,6 +121,12 @@ const localPreBuild = parallel(generateLibs, series(buildScripts, generateDiagno
const preBuild = cmdLineOptions.lkg ? lkgPreBuild : localPreBuild;

const buildServices = (() => {
// TODO(jakebailey): fix this for modules
return cb => {
console.log("!!!TODO!!! buildServices");
cb();
};

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

Expand Down Expand Up @@ -252,6 +260,12 @@ task("watch-min").flags = {
};

const buildLssl = (() => {
// TODO(jakebailey): fix this for modules
return cb => {
console.log("!!!TODO!!! buildLssl");
cb();
};

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

Expand Down Expand Up @@ -424,8 +438,8 @@ task("watch-local").flags = {
const preTest = parallel(buildTsc, buildTests, buildServices, buildLssl);
preTest.displayName = "preTest";

const runTests = () => runConsoleTests("built/local/run.js", "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ false);
task("runtests", series(preBuild, preTest, runTests));
const runTests = () => runConsoleTests(testRunner, "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ false);
task("runtests", series(/*preBuild, preTest,*/ runTests)); // TODO(jakebailey): fix this for modules
task("runtests").description = "Runs the tests using the built run.js file.";
task("runtests").flags = {
"-t --tests=<regex>": "Pattern for tests to run.",
Expand All @@ -443,8 +457,8 @@ task("runtests").flags = {
" --shardId": "1-based ID of this shard (default: 1)",
};

const runTestsParallel = () => runConsoleTests("built/local/run.js", "min", /*runInParallel*/ cmdLineOptions.workers > 1, /*watchMode*/ false);
task("runtests-parallel", series(preBuild, preTest, runTestsParallel));
const runTestsParallel = () => runConsoleTests(testRunner, "min", /*runInParallel*/ cmdLineOptions.workers > 1, /*watchMode*/ false);
task("runtests-parallel", series(/*preBuild, preTest,*/ runTestsParallel)); // TODO(jakebailey): fix this for modules
task("runtests-parallel").description = "Runs all the tests in parallel using the built run.js file.";
task("runtests-parallel").flags = {
" --light": "Run tests in light mode (fewer verifications, but tests run faster).",
Expand Down Expand Up @@ -592,10 +606,10 @@ task("publish-nightly").description = "Runs `npm publish --tag next` to create a
// write some kind of trigger file that indicates build completion that we could listen for instead.
const watchRuntests = () => watch(["built/local/*.js", "tests/cases/**/*.ts", "tests/cases/**/tsconfig.json"], { delay: 5000 }, async () => {
if (cmdLineOptions.tests || cmdLineOptions.failed) {
await runConsoleTests("built/local/run.js", "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ true);
await runConsoleTests(testRunner, "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ true);
}
else {
await runConsoleTests("built/local/run.js", "min", /*runInParallel*/ true, /*watchMode*/ true);
await runConsoleTests(testRunner, "min", /*runInParallel*/ true, /*watchMode*/ true);
}
});
task("watch", series(preBuild, preTest, parallel(watchLib, watchDiagnostics, watchServices, watchLssl, watchTests, watchRuntests)));
Expand Down

0 comments on commit e1cf7e2

Please sign in to comment.