mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 10:41:56 -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
|
||||
]
|
||||
)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,3 +1,77 @@
|
||||
//// [/src/logic/.tsbuildinfo]
|
||||
{
|
||||
"js": [],
|
||||
"dts": [],
|
||||
"commonSourceDirectory": "/src/logic/",
|
||||
"sources": {},
|
||||
"program": {
|
||||
"fileInfos": {
|
||||
"/lib/lib.d.ts": {
|
||||
"version": "38840781448",
|
||||
"signature": "38840781448"
|
||||
},
|
||||
"/lib/lib.es5.d.ts": {
|
||||
"version": "-157947125741",
|
||||
"signature": "-157947125741"
|
||||
},
|
||||
"/lib/lib.dom.d.ts": {
|
||||
"version": "-1086375748659",
|
||||
"signature": "-1086375748659"
|
||||
},
|
||||
"/lib/lib.webworker.importscripts.d.ts": {
|
||||
"version": "16827914512",
|
||||
"signature": "16827914512"
|
||||
},
|
||||
"/lib/lib.scripthost.d.ts": {
|
||||
"version": "-7856822451",
|
||||
"signature": "-7856822451"
|
||||
},
|
||||
"/src/core/index.ts": {
|
||||
"version": "-13851440507",
|
||||
"signature": "-13851440507"
|
||||
},
|
||||
"/src/core/anothermodule.ts": {
|
||||
"version": "7652028357",
|
||||
"signature": "7652028357"
|
||||
},
|
||||
"/src/logic/index.ts": {
|
||||
"version": "-5786964698",
|
||||
"signature": "-6548680073"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"composite": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "/src/logic/decls",
|
||||
"sourceMap": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"skipDefaultLibCheck": true,
|
||||
"configFilePath": "/src/logic/tsconfig.json"
|
||||
},
|
||||
"referencedMap": {
|
||||
"/src/logic/index.ts": [
|
||||
"/src/core/index.d.ts",
|
||||
"/src/core/anothermodule.d.ts"
|
||||
]
|
||||
},
|
||||
"exportedModulesMap": {
|
||||
"/src/logic/index.ts": [
|
||||
"/src/core/anothermodule.d.ts"
|
||||
]
|
||||
},
|
||||
"semanticDiagnosticsPerFile": [
|
||||
"/lib/lib.d.ts",
|
||||
"/lib/lib.es5.d.ts",
|
||||
"/lib/lib.dom.d.ts",
|
||||
"/lib/lib.webworker.importscripts.d.ts",
|
||||
"/lib/lib.scripthost.d.ts",
|
||||
"/src/core/index.ts",
|
||||
"/src/core/anothermodule.ts",
|
||||
"/src/logic/index.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
//// [/src/logic/decls/index.d.ts]
|
||||
export declare function getSecondsInDay(): number;
|
||||
import * as mod from '../core/anotherModule';
|
||||
@@ -20,3 +94,87 @@ export declare const m: typeof mod;
|
||||
}
|
||||
|
||||
|
||||
//// [/src/tests/.tsbuildinfo]
|
||||
{
|
||||
"js": [],
|
||||
"dts": [],
|
||||
"commonSourceDirectory": "/src/tests/",
|
||||
"sources": {},
|
||||
"program": {
|
||||
"fileInfos": {
|
||||
"/lib/lib.d.ts": {
|
||||
"version": "38840781448",
|
||||
"signature": "38840781448"
|
||||
},
|
||||
"/lib/lib.es5.d.ts": {
|
||||
"version": "-157947125741",
|
||||
"signature": "-157947125741"
|
||||
},
|
||||
"/lib/lib.dom.d.ts": {
|
||||
"version": "-1086375748659",
|
||||
"signature": "-1086375748659"
|
||||
},
|
||||
"/lib/lib.webworker.importscripts.d.ts": {
|
||||
"version": "16827914512",
|
||||
"signature": "16827914512"
|
||||
},
|
||||
"/lib/lib.scripthost.d.ts": {
|
||||
"version": "-7856822451",
|
||||
"signature": "-7856822451"
|
||||
},
|
||||
"/src/core/index.ts": {
|
||||
"version": "-13851440507",
|
||||
"signature": "-13851440507"
|
||||
},
|
||||
"/src/core/anothermodule.ts": {
|
||||
"version": "7652028357",
|
||||
"signature": "7652028357"
|
||||
},
|
||||
"/src/logic/index.ts": {
|
||||
"version": "-6548680073",
|
||||
"signature": "-6548680073"
|
||||
},
|
||||
"/src/tests/index.ts": {
|
||||
"version": "12336236525",
|
||||
"signature": "-9209611"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"composite": true,
|
||||
"declaration": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"skipDefaultLibCheck": true,
|
||||
"configFilePath": "/src/tests/tsconfig.json"
|
||||
},
|
||||
"referencedMap": {
|
||||
"/src/logic/index.ts": [
|
||||
"/src/core/anothermodule.d.ts"
|
||||
],
|
||||
"/src/tests/index.ts": [
|
||||
"/src/core/index.d.ts",
|
||||
"/src/logic/decls/index.d.ts",
|
||||
"/src/core/anothermodule.d.ts"
|
||||
]
|
||||
},
|
||||
"exportedModulesMap": {
|
||||
"/src/logic/index.ts": [
|
||||
"/src/core/anothermodule.d.ts"
|
||||
],
|
||||
"/src/tests/index.ts": [
|
||||
"/src/core/anothermodule.d.ts"
|
||||
]
|
||||
},
|
||||
"semanticDiagnosticsPerFile": [
|
||||
"/lib/lib.d.ts",
|
||||
"/lib/lib.es5.d.ts",
|
||||
"/lib/lib.dom.d.ts",
|
||||
"/lib/lib.webworker.importscripts.d.ts",
|
||||
"/lib/lib.scripthost.d.ts",
|
||||
"/src/core/index.ts",
|
||||
"/src/core/anothermodule.ts",
|
||||
"/src/logic/index.ts",
|
||||
"/src/tests/index.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user