Skip to content

Commit cabf72b

Browse files
committed
Revert "Passing --force option to build, builds project from start"
This reverts commit 434fa94.
1 parent 434fa94 commit cabf72b

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

src/compiler/tsbuild.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,6 @@ namespace ts {
11781178
}
11791179

11801180
function getOldProgram(proj: ResolvedConfigFileName, parsed: ParsedCommandLine) {
1181-
if (options.force) return undefined;
11821181
const value = builderPrograms.getValue(proj);
11831182
if (value) return value;
11841183
return readBuilderProgram(parsed.options, readFileWithCache) as any as T;

src/testRunner/unittests/tsbuild/sample.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,14 @@ namespace ts {
168168
});
169169

170170
describe("can detect when and what to rebuild", () => {
171-
function initializeWithBuild(opts?: BuildOptions) {
171+
function initializeWithBuild() {
172172
const fs = projFs.shadow();
173173
const host = new fakes.SolutionBuilderHost(fs);
174174
const builder = createSolutionBuilder(host, ["/src/tests"], { verbose: true });
175175
builder.buildAllProjects();
176176
host.clearDiagnostics();
177177
tick();
178-
builder.resetBuildContext(opts ? { ...opts, verbose: true } : undefined);
178+
builder.resetBuildContext();
179179
return { fs, host, builder };
180180
}
181181

@@ -254,20 +254,6 @@ namespace ts {
254254
[Diagnostics.Building_project_0, "/src/tests/tsconfig.json"],
255255
);
256256
});
257-
258-
it("rebuilds from start if --f is passed", () => {
259-
const { host, builder } = initializeWithBuild({ force: true });
260-
builder.buildAllProjects();
261-
host.assertDiagnosticMessages(
262-
getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json", "src/logic/tsconfig.json", "src/tests/tsconfig.json"),
263-
[Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, "src/core/tsconfig.json", "src/core/anotherModule.ts", "src/core/anotherModule.js"],
264-
[Diagnostics.Building_project_0, "/src/core/tsconfig.json"],
265-
[Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, "src/logic/tsconfig.json"],
266-
[Diagnostics.Building_project_0, "/src/logic/tsconfig.json"],
267-
[Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, "src/tests/tsconfig.json"],
268-
[Diagnostics.Building_project_0, "/src/tests/tsconfig.json"]
269-
);
270-
});
271257
});
272258

273259
describe("downstream-blocked compilations", () => {

0 commit comments

Comments
 (0)