mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 22:51:17 -05:00
Fix incremental build changes declaration dir
This commit is contained in:
@@ -209,6 +209,19 @@ namespace ts {
|
||||
}
|
||||
});
|
||||
|
||||
if (oldCompilerOptions &&
|
||||
(oldCompilerOptions.outDir !== compilerOptions.outDir ||
|
||||
oldCompilerOptions.declarationDir !== compilerOptions.declarationDir ||
|
||||
(oldCompilerOptions.outFile || oldCompilerOptions.out) !== (compilerOptions.outFile || compilerOptions.out))) {
|
||||
// Add all files to affectedFilesPendingEmit since emit changed
|
||||
state.affectedFilesPendingEmit = concatenate(state.affectedFilesPendingEmit, newProgram.getSourceFiles().map(f => f.path));
|
||||
if (state.affectedFilesPendingEmitIndex === undefined) {
|
||||
state.affectedFilesPendingEmitIndex = 0;
|
||||
}
|
||||
Debug.assert(state.seenAffectedFiles === undefined);
|
||||
state.seenAffectedFiles = createMap<true>();
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
@@ -564,7 +564,30 @@ class someClass { }`),
|
||||
[Diagnostics.Building_project_0, "/src/logic/tsconfig.json"],
|
||||
[Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/tests/tsconfig.json", "src/tests/index.js", "src/logic"],
|
||||
[Diagnostics.Building_project_0, "/src/tests/tsconfig.json"],
|
||||
]
|
||||
],
|
||||
expectedReadFiles: getReadFilesMap(
|
||||
[
|
||||
// Configs
|
||||
"/src/core/tsconfig.json",
|
||||
"/src/logic/tsconfig.json",
|
||||
"/src/tests/tsconfig.json",
|
||||
|
||||
// Source files
|
||||
"/src/logic/index.ts",
|
||||
"/src/tests/index.ts",
|
||||
|
||||
// Modules of generated files
|
||||
"/src/core/anotherModule.d.ts",
|
||||
"/src/core/index.d.ts",
|
||||
"/src/logic/decls/index.d.ts",
|
||||
|
||||
// build info
|
||||
"/src/logic/.tsbuildinfo",
|
||||
"/src/tests/.tsbuildinfo",
|
||||
|
||||
"/src/tests/index.d.ts", // to check if d.ts has changed
|
||||
]
|
||||
)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user