mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Instead of computing signatures during building, compute them afterwards for verification (#51718)
This helps with finding issues with d.ts emit because of caching.
This commit is contained in:
@@ -286,8 +286,8 @@ function hasSameKeys(map1: ReadonlyCollection<string> | undefined, map2: Readonl
|
||||
/**
|
||||
* Create the state so that we can iterate on changedFiles/affected files
|
||||
*/
|
||||
function createBuilderProgramState(newProgram: Program, oldState: Readonly<ReusableBuilderProgramState> | undefined, disableUseFileVersionAsSignature: boolean | undefined): BuilderProgramState {
|
||||
const state = BuilderState.create(newProgram, oldState, disableUseFileVersionAsSignature) as BuilderProgramState;
|
||||
function createBuilderProgramState(newProgram: Program, oldState: Readonly<ReusableBuilderProgramState> | undefined): BuilderProgramState {
|
||||
const state = BuilderState.create(newProgram, oldState, /*disableUseFileVersionAsSignature*/ false) as BuilderProgramState;
|
||||
state.program = newProgram;
|
||||
const compilerOptions = newProgram.getCompilerOptions();
|
||||
state.compilerOptions = compilerOptions;
|
||||
@@ -699,7 +699,7 @@ function handleDtsMayChangeOf(
|
||||
sourceFile,
|
||||
cancellationToken,
|
||||
host,
|
||||
!host.disableUseFileVersionAsSignature
|
||||
/*useFileVersionAsSignature*/ true
|
||||
);
|
||||
// If not dts emit, nothing more to do
|
||||
if (getEmitDeclarations(state.compilerOptions)) {
|
||||
@@ -1312,7 +1312,7 @@ export function createBuilderProgram(kind: BuilderProgramKind, { newProgram, hos
|
||||
return oldProgram;
|
||||
}
|
||||
|
||||
const state = createBuilderProgramState(newProgram, oldState, host.disableUseFileVersionAsSignature);
|
||||
const state = createBuilderProgramState(newProgram, oldState);
|
||||
newProgram.getBuildInfo = bundle => getBuildInfo(state, bundle);
|
||||
|
||||
// To ensure that we arent storing any references to old program or new program without state
|
||||
|
||||
@@ -30,12 +30,6 @@ export interface BuilderProgramHost {
|
||||
* this callback if present would be used to write files
|
||||
*/
|
||||
writeFile?: WriteFileCallback;
|
||||
/**
|
||||
* disable using source file version as signature for testing
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
disableUseFileVersionAsSignature?: boolean;
|
||||
/**
|
||||
* Store the list of files that update signature during the emit
|
||||
*
|
||||
|
||||
@@ -295,7 +295,7 @@ export namespace BuilderState {
|
||||
/**
|
||||
* Creates the state of file references and signature for the new program from oldState if it is safe
|
||||
*/
|
||||
export function create(newProgram: Program, oldState?: Readonly<BuilderState>, disableUseFileVersionAsSignature?: boolean): BuilderState {
|
||||
export function create(newProgram: Program, oldState: Readonly<BuilderState> | undefined, disableUseFileVersionAsSignature: boolean): BuilderState {
|
||||
const fileInfos = new Map<Path, FileInfo>();
|
||||
const options = newProgram.getCompilerOptions();
|
||||
const isOutFile = outFile(options);
|
||||
@@ -402,6 +402,32 @@ export namespace BuilderState {
|
||||
(state.hasCalledUpdateShapeSignature ||= new Set()).add(path);
|
||||
}
|
||||
|
||||
export function computeDtsSignature(
|
||||
programOfThisState: Program,
|
||||
sourceFile: SourceFile,
|
||||
cancellationToken: CancellationToken | undefined,
|
||||
host: HostForComputeHash,
|
||||
onNewSignature: (signature: string, sourceFiles: readonly SourceFile[]) => void,
|
||||
) {
|
||||
programOfThisState.emit(
|
||||
sourceFile,
|
||||
(fileName, text, _writeByteOrderMark, _onError, sourceFiles, data) => {
|
||||
Debug.assert(isDeclarationFileName(fileName), `File extension for signature expected to be dts: Got:: ${fileName}`);
|
||||
onNewSignature(computeSignatureWithDiagnostics(
|
||||
programOfThisState,
|
||||
sourceFile,
|
||||
text,
|
||||
host,
|
||||
data,
|
||||
), sourceFiles!);
|
||||
},
|
||||
cancellationToken,
|
||||
/*emitOnlyDtsFiles*/ true,
|
||||
/*customTransformers*/ undefined,
|
||||
/*forceDtsEmit*/ true
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the shape of the signature has changed since last emit
|
||||
*/
|
||||
@@ -420,26 +446,12 @@ export namespace BuilderState {
|
||||
const prevSignature = info.signature;
|
||||
let latestSignature: string | undefined;
|
||||
if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
|
||||
programOfThisState.emit(
|
||||
sourceFile,
|
||||
(fileName, text, _writeByteOrderMark, _onError, sourceFiles, data) => {
|
||||
Debug.assert(isDeclarationFileName(fileName), `File extension for signature expected to be dts: Got:: ${fileName}`);
|
||||
latestSignature = computeSignatureWithDiagnostics(
|
||||
programOfThisState,
|
||||
sourceFile,
|
||||
text,
|
||||
host,
|
||||
data,
|
||||
);
|
||||
if (latestSignature !== prevSignature) {
|
||||
updateExportedModules(state, sourceFile, sourceFiles![0].exportedModulesFromDeclarationEmit);
|
||||
}
|
||||
},
|
||||
cancellationToken,
|
||||
/*emitOnlyDtsFiles*/ true,
|
||||
/*customTransformers*/ undefined,
|
||||
/*forceDtsEmit*/ true
|
||||
);
|
||||
computeDtsSignature(programOfThisState, sourceFile, cancellationToken, host, (signature, sourceFiles) => {
|
||||
latestSignature = signature;
|
||||
if (latestSignature !== prevSignature) {
|
||||
updateExportedModules(state, sourceFile, sourceFiles[0].exportedModulesFromDeclarationEmit);
|
||||
}
|
||||
});
|
||||
}
|
||||
// Default is to use file version as signature
|
||||
if (latestSignature === undefined) {
|
||||
@@ -468,28 +480,23 @@ export namespace BuilderState {
|
||||
export function updateExportedModules(state: BuilderState, sourceFile: SourceFile, exportedModulesFromDeclarationEmit: ExportedModulesFromDeclarationEmit | undefined) {
|
||||
if (!state.exportedModulesMap) return;
|
||||
(state.oldExportedModulesMap ||= new Map()).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
||||
if (!exportedModulesFromDeclarationEmit) {
|
||||
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
||||
return;
|
||||
}
|
||||
|
||||
let exportedModules: Set<Path> | undefined;
|
||||
exportedModulesFromDeclarationEmit.forEach(symbol => addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)));
|
||||
const exportedModules = getExportedModules(exportedModulesFromDeclarationEmit);
|
||||
if (exportedModules) {
|
||||
state.exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
||||
}
|
||||
else {
|
||||
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
||||
}
|
||||
}
|
||||
|
||||
function addExportedModule(exportedModulePaths: Path[] | undefined) {
|
||||
if (exportedModulePaths?.length) {
|
||||
if (!exportedModules) {
|
||||
exportedModules = new Set();
|
||||
}
|
||||
exportedModulePaths.forEach(path => exportedModules!.add(path));
|
||||
}
|
||||
}
|
||||
export function getExportedModules(exportedModulesFromDeclarationEmit: ExportedModulesFromDeclarationEmit | undefined) {
|
||||
let exportedModules: Set<Path> | undefined;
|
||||
exportedModulesFromDeclarationEmit?.forEach(
|
||||
symbol => getReferencedFilesFromImportedModuleSymbol(symbol).forEach(
|
||||
path => (exportedModules ??= new Set()).add(path)
|
||||
)
|
||||
);
|
||||
return exportedModules;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1433,7 +1433,6 @@ export interface System {
|
||||
|
||||
// For testing
|
||||
/** @internal */ now?(): Date;
|
||||
/** @internal */ disableUseFileVersionAsSignature?: boolean;
|
||||
/** @internal */ storeFilesChangingSignatureDuringEmit?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -7380,7 +7380,6 @@ export interface CompilerHost extends ModuleResolutionHost {
|
||||
/** @internal */getSymlinkCache?(): SymlinkCache;
|
||||
|
||||
// For testing:
|
||||
/** @internal */ disableUseFileVersionAsSignature?: boolean;
|
||||
/** @internal */ storeFilesChangingSignatureDuringEmit?: boolean;
|
||||
/** @internal */ getBuildInfo?(fileName: string, configFilePath: string | undefined): BuildInfo | undefined;
|
||||
}
|
||||
|
||||
@@ -765,7 +765,6 @@ export function createCompilerHostFromProgramHost(host: ProgramHost<any>, getCom
|
||||
getEnvironmentVariable: maybeBind(host, host.getEnvironmentVariable) || (() => ""),
|
||||
createHash: maybeBind(host, host.createHash),
|
||||
readDirectory: maybeBind(host, host.readDirectory),
|
||||
disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
|
||||
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
||||
};
|
||||
return compilerHost;
|
||||
@@ -847,7 +846,6 @@ export function createProgramHost<T extends BuilderProgram = EmitAndSemanticDiag
|
||||
writeFile: (path, data, writeByteOrderMark) => system.writeFile(path, data, writeByteOrderMark),
|
||||
createHash: maybeBind(system, system.createHash),
|
||||
createProgram: createProgram || createEmitAndSemanticDiagnosticsBuilderProgram as any as CreateProgram<T>,
|
||||
disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
|
||||
storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit,
|
||||
now: maybeBind(system, system.now),
|
||||
};
|
||||
|
||||
@@ -121,7 +121,6 @@ export function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadB
|
||||
export function createIncrementalCompilerHost(options: CompilerOptions, system = sys): CompilerHost {
|
||||
const host = createCompilerHostWorker(options, /*setParentNodes*/ undefined, system);
|
||||
host.createHash = maybeBind(system, system.createHash);
|
||||
host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
|
||||
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
||||
setGetSourceFileAsHashVersioned(host);
|
||||
changeCompilerHostLikeToUseCache(host, fileName => toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName));
|
||||
@@ -248,7 +247,6 @@ export interface ProgramHost<T extends BuilderProgram> {
|
||||
createDirectory?(path: string): void;
|
||||
writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void;
|
||||
// For testing
|
||||
disableUseFileVersionAsSignature?: boolean;
|
||||
storeFilesChangingSignatureDuringEmit?: boolean;
|
||||
now?(): Date;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
compilerOptionsToConfigJson,
|
||||
loadProjectFromFiles,
|
||||
noChangeRun,
|
||||
noChangeWithExportsDiscrepancyRun,
|
||||
replaceText,
|
||||
TestTscEdit,
|
||||
verifyTscWithEdits,
|
||||
@@ -41,12 +40,6 @@ describe("unittests:: tsbuild:: commandLine::", () => {
|
||||
];
|
||||
return edit;
|
||||
}
|
||||
function withOptionChangeAndExportExplanation(subScenario: string, ...options: readonly string[]): TestTscEdit {
|
||||
return {
|
||||
...withOptionChange(subScenario, ...options),
|
||||
discrepancyExplanation: noChangeWithExportsDiscrepancyRun.discrepancyExplanation,
|
||||
};
|
||||
}
|
||||
function nochangeWithIncrementalDeclarationFromBeforeExplaination(): TestTscEdit {
|
||||
return {
|
||||
...noChangeRun,
|
||||
@@ -129,8 +122,8 @@ describe("unittests:: tsbuild:: commandLine::", () => {
|
||||
fs: () => fs({ incremental: true }),
|
||||
commandLineArgs: ["--b", "/src/project", "--verbose"],
|
||||
edits: [
|
||||
withOptionChangeAndExportExplanation("with sourceMap", "--sourceMap"),
|
||||
withOptionChangeAndExportExplanation("should re-emit only js so they dont contain sourcemap"),
|
||||
withOptionChange("with sourceMap", "--sourceMap"),
|
||||
withOptionChange("should re-emit only js so they dont contain sourcemap"),
|
||||
withOptionChange("with declaration, emit Dts and should not emit js", "--declaration"),
|
||||
withOptionChange("with declaration and declarationMap", "--declaration", "--declarationMap"),
|
||||
nochangeWithIncrementalDeclarationFromBeforeExplaination(),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
loadProjectFromDisk,
|
||||
noChangeRun,
|
||||
noChangeWithExportsDiscrepancyRun,
|
||||
verifyTscWithEdits,
|
||||
} from "../tsc/helpers";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
@@ -80,7 +79,7 @@ const a: string = "hello";`, "utf-8"),
|
||||
const a: string = 10;`, "utf-8"),
|
||||
commandLineArgs: ["--b", "/src/tsconfig.json", "--incremental"],
|
||||
edits: [
|
||||
noChangeWithExportsDiscrepancyRun,
|
||||
noChangeRun,
|
||||
{
|
||||
subScenario: "Fix error",
|
||||
modifyFs: fs => fs.writeFileSync("/src/src/main.ts", `import { A } from "../shared/types/db";
|
||||
|
||||
@@ -8,10 +8,15 @@ import {
|
||||
TestServerHost,
|
||||
} from "../virtualFileSystemWithWatch";
|
||||
|
||||
export interface DtsSignatureData {
|
||||
signature: string | undefined;
|
||||
exportedModules: string[] | undefined;
|
||||
}
|
||||
|
||||
export type TscCompileSystem = fakes.System & {
|
||||
writtenFiles: Set<ts.Path>;
|
||||
baseLine(): { file: string; text: string; };
|
||||
disableUseFileVersionAsSignature?: boolean;
|
||||
dtsSignaures?: Map<ts.Path, Map<string, DtsSignatureData>>;
|
||||
storeFilesChangingSignatureDuringEmit?: boolean;
|
||||
};
|
||||
|
||||
@@ -23,13 +28,6 @@ export const noChangeRun: TestTscEdit = {
|
||||
subScenario: "no-change-run",
|
||||
modifyFs: ts.noop
|
||||
};
|
||||
export const noChangeWithExportsDiscrepancyRun: TestTscEdit = {
|
||||
...noChangeRun,
|
||||
discrepancyExplanation: () => [
|
||||
"Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files",
|
||||
"Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed"
|
||||
]
|
||||
};
|
||||
export const noChangeOnlyRuns = [noChangeRun];
|
||||
|
||||
export interface TestTscCompile extends TestTscCompileLikeBase {
|
||||
@@ -77,7 +75,7 @@ export function commandLineCallbacks(
|
||||
export interface TestTscCompileLikeBase extends VerifyTscCompileLike {
|
||||
diffWithInitial?: boolean;
|
||||
modifyFs?: (fs: vfs.FileSystem) => void;
|
||||
disableUseFileVersionAsSignature?: boolean;
|
||||
computeDtsSignatures?: boolean;
|
||||
environmentVariables?: Record<string, string>;
|
||||
}
|
||||
|
||||
@@ -103,7 +101,6 @@ export function testTscCompileLike(input: TestTscCompileLike) {
|
||||
|
||||
// Create system
|
||||
const sys = new fakes.System(fs, { executingFilePath: "/lib/tsc", env: environmentVariables }) as TscCompileSystem;
|
||||
if (input.disableUseFileVersionAsSignature) sys.disableUseFileVersionAsSignature = true;
|
||||
sys.storeFilesChangingSignatureDuringEmit = true;
|
||||
sys.write(`${sys.getExecutingFilePath()} ${commandLineArgs.join(" ")}\n`);
|
||||
sys.exit = exitCode => sys.exitCode = exitCode;
|
||||
@@ -203,6 +200,7 @@ export function testTscCompile(input: TestTscCompile) {
|
||||
|
||||
function additionalBaseline(sys: TscCompileSystem) {
|
||||
const { baselineSourceMap, baselineReadFileCalls, baselinePrograms: shouldBaselinePrograms, baselineDependencies } = input;
|
||||
if (input.computeDtsSignatures) storeDtsSignatures(sys, getPrograms!());
|
||||
if (shouldBaselinePrograms) {
|
||||
const baseline: string[] = [];
|
||||
baselinePrograms(baseline, getPrograms!, ts.emptyArray, baselineDependencies);
|
||||
@@ -217,6 +215,40 @@ export function testTscCompile(input: TestTscCompile) {
|
||||
}
|
||||
}
|
||||
|
||||
function storeDtsSignatures(sys: TscCompileSystem, programs: readonly CommandLineProgram[]) {
|
||||
for (const [program, builderProgram] of programs) {
|
||||
if (!builderProgram) continue;
|
||||
const buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(program.getCompilerOptions());
|
||||
if (!buildInfoPath) continue;
|
||||
sys.dtsSignaures ??= new Map();
|
||||
const dtsSignatureData = new Map<string, DtsSignatureData>();
|
||||
sys.dtsSignaures.set(`${toPathWithSystem(sys, buildInfoPath)}.readable.baseline.txt` as ts.Path, dtsSignatureData);
|
||||
const state = builderProgram.getState();
|
||||
state.hasCalledUpdateShapeSignature?.forEach(resolvedPath => {
|
||||
const file = program.getSourceFileByPath(resolvedPath);
|
||||
if (!file || file.isDeclarationFile) return;
|
||||
// Compute dts and exported map and store it
|
||||
ts.BuilderState.computeDtsSignature(
|
||||
program,
|
||||
file,
|
||||
/*cancellationToken*/ undefined,
|
||||
sys,
|
||||
(signature, sourceFiles) => {
|
||||
const exportedModules = ts.BuilderState.getExportedModules(state.exportedModulesMap && sourceFiles[0].exportedModulesFromDeclarationEmit);
|
||||
dtsSignatureData.set(relativeToBuildInfo(resolvedPath), { signature, exportedModules: exportedModules && ts.arrayFrom(exportedModules.keys(), relativeToBuildInfo) });
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
function relativeToBuildInfo(path: string) {
|
||||
const currentDirectory = program.getCurrentDirectory();
|
||||
const getCanonicalFileName = ts.createGetCanonicalFileName(program.useCaseSensitiveFileNames());
|
||||
const buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath!, currentDirectory));
|
||||
return ts.ensurePathIsNonModuleName(ts.getRelativePathFromDirectory(buildInfoDirectory, path, getCanonicalFileName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function baselinePrograms(baseline: string[], getPrograms: () => readonly CommandLineProgram[], oldPrograms: readonly (CommandLineProgram | undefined)[], baselineDependencies: boolean | undefined) {
|
||||
const programs = getPrograms();
|
||||
for (let i = 0; i < programs.length; i++) {
|
||||
@@ -676,7 +708,7 @@ function verifyTscEditDiscrepancies({
|
||||
if (modifyFs) modifyFs(fs);
|
||||
editFs(fs);
|
||||
},
|
||||
disableUseFileVersionAsSignature: true,
|
||||
computeDtsSignatures: true,
|
||||
});
|
||||
let headerAdded = false;
|
||||
for (const outputFile of ts.arrayFrom(sys.writtenFiles.keys())) {
|
||||
@@ -695,17 +727,20 @@ function verifyTscEditDiscrepancies({
|
||||
// Verify build info without affectedFilesPendingEmit
|
||||
const { buildInfo: incrementalBuildInfo, readableBuildInfo: incrementalReadableBuildInfo } = getBuildInfoForIncrementalCorrectnessCheck(incrementalBuildText);
|
||||
const { buildInfo: cleanBuildInfo, readableBuildInfo: cleanReadableBuildInfo } = getBuildInfoForIncrementalCorrectnessCheck(cleanBuildText);
|
||||
const dtsSignaures = sys.dtsSignaures?.get(outputFile);
|
||||
verifyTextEqual(incrementalBuildInfo, cleanBuildInfo, `TsBuild info text without affectedFilesPendingEmit:: ${outputFile}::`);
|
||||
// Verify file info sigantures
|
||||
verifyMapLike(
|
||||
incrementalReadableBuildInfo?.program?.fileInfos as ReadableProgramMultiFileEmitBuildInfo["fileInfos"],
|
||||
cleanReadableBuildInfo?.program?.fileInfos as ReadableProgramMultiFileEmitBuildInfo["fileInfos"],
|
||||
(key, incrementalFileInfo, cleanFileInfo) => {
|
||||
if (incrementalFileInfo.signature !== cleanFileInfo.signature && incrementalFileInfo.signature !== incrementalFileInfo.version) {
|
||||
const dtsForKey = dtsSignaures?.get(key);
|
||||
if (!incrementalFileInfo || !cleanFileInfo || incrementalFileInfo.signature !== cleanFileInfo.signature && (!dtsForKey || incrementalFileInfo.signature !== dtsForKey.signature)) {
|
||||
return [
|
||||
`Incremental signature is neither dts signature nor file version for File:: ${key}`,
|
||||
`Incremental:: ${JSON.stringify(incrementalFileInfo, /*replacer*/ undefined, 2)}`,
|
||||
`Clean:: ${JSON.stringify(cleanFileInfo, /*replacer*/ undefined, 2)}`
|
||||
`Clean:: ${JSON.stringify(cleanFileInfo, /*replacer*/ undefined, 2)}`,
|
||||
`Dts Signature:: $${JSON.stringify(dtsForKey?.signature)}`
|
||||
];
|
||||
}
|
||||
},
|
||||
@@ -718,13 +753,14 @@ function verifyTscEditDiscrepancies({
|
||||
incrementalReadableBuildInfo?.program?.exportedModulesMap,
|
||||
cleanReadableBuildInfo?.program?.exportedModulesMap,
|
||||
(key, incrementalReferenceSet, cleanReferenceSet) => {
|
||||
if (!ts.arrayIsEqualTo(incrementalReferenceSet, cleanReferenceSet) && !ts.arrayIsEqualTo(incrementalReferenceSet, (incrementalReadableBuildInfo!.program! as ReadableProgramMultiFileEmitBuildInfo).referencedMap![key])) {
|
||||
const dtsForKey = dtsSignaures?.get(key);
|
||||
if (!ts.arrayIsEqualTo(incrementalReferenceSet, cleanReferenceSet) &&
|
||||
(!dtsForKey || !ts.arrayIsEqualTo(incrementalReferenceSet, dtsForKey.exportedModules))) {
|
||||
return [
|
||||
`Incremental Reference set is neither from dts nor files reference map for File:: ${key}::`,
|
||||
`Incremental:: ${JSON.stringify(incrementalReferenceSet, /*replacer*/ undefined, 2)}`,
|
||||
`Clean:: ${JSON.stringify(cleanReferenceSet, /*replacer*/ undefined, 2)}`,
|
||||
`IncrementalReferenceMap:: ${JSON.stringify((incrementalReadableBuildInfo!.program! as ReadableProgramMultiFileEmitBuildInfo).referencedMap![key], /*replacer*/ undefined, 2)}`,
|
||||
`CleanReferenceMap:: ${JSON.stringify((cleanReadableBuildInfo!.program! as ReadableProgramMultiFileEmitBuildInfo).referencedMap![key], /*replacer*/ undefined, 2)}`,
|
||||
`DtsExportsMap:: ${JSON.stringify(dtsForKey?.exportedModules, /*replacer*/ undefined, 2)}`
|
||||
];
|
||||
}
|
||||
},
|
||||
@@ -767,32 +803,25 @@ function verifyTscEditDiscrepancies({
|
||||
if (incrementalText !== cleanText) writeNotEqual(incrementalText, cleanText, message);
|
||||
}
|
||||
|
||||
function verifyMapLike<T>(incremental: ts.MapLike<T> | undefined, clean: ts.MapLike<T> | undefined, verifyValue: (key: string, incrementalValue: T, cleanValue: T) => string[] | undefined, message: string) {
|
||||
function verifyMapLike<T>(
|
||||
incremental: ts.MapLike<T> | undefined,
|
||||
clean: ts.MapLike<T> | undefined,
|
||||
verifyValue: (key: string, incrementalValue: T | undefined, cleanValue: T | undefined) => string[] | undefined,
|
||||
message: string,
|
||||
) {
|
||||
verifyPresenceAbsence(incremental, clean, `Incremental and clean do not match:: ${message}`);
|
||||
if (!incremental || !clean) return;
|
||||
const incrementalMap = new Map(ts.getEntries(incremental));
|
||||
const cleanMap = new Map(ts.getEntries(clean));
|
||||
if (incrementalMap.size !== cleanMap.size) {
|
||||
addBaseline(
|
||||
`Incremental and clean size of maps do not match:: ${message}`,
|
||||
`Incremental: ${JSON.stringify(incremental, /*replacer*/ undefined, 2)}`,
|
||||
`Clean: ${JSON.stringify(clean, /*replacer*/ undefined, 2)}`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
cleanMap.forEach((cleanValue, key) => {
|
||||
const incrementalValue = incrementalMap.get(key);
|
||||
if (!incrementalValue) {
|
||||
addBaseline(
|
||||
`Incremental does not contain ${key} which is present in clean:: ${message}`,
|
||||
`Incremental: ${JSON.stringify(incremental, /*replacer*/ undefined, 2)}`,
|
||||
`Clean: ${JSON.stringify(clean, /*replacer*/ undefined, 2)}`,
|
||||
);
|
||||
}
|
||||
else {
|
||||
const result = verifyValue(key, incrementalMap.get(key)!, cleanValue);
|
||||
if (result) addBaseline(...result);
|
||||
}
|
||||
const result = verifyValue(key, incrementalMap.get(key), cleanValue);
|
||||
if (result) addBaseline(...result);
|
||||
});
|
||||
incrementalMap.forEach((incremetnalValue, key) => {
|
||||
if (cleanMap.has(key)) return;
|
||||
// This is value only in incremental Map
|
||||
const result = verifyValue(key, incremetnalValue, /*cleanValue*/ undefined);
|
||||
if (result) addBaseline(...result);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
loadProjectFromFiles,
|
||||
noChangeOnlyRuns,
|
||||
noChangeRun,
|
||||
noChangeWithExportsDiscrepancyRun,
|
||||
prependText,
|
||||
replaceText,
|
||||
TestTscEdit,
|
||||
@@ -123,7 +122,7 @@ describe("unittests:: tsc:: incremental::", () => {
|
||||
commandLineArgs: ["--incremental", "-p", "src"],
|
||||
modifyFs,
|
||||
edits: [
|
||||
noChangeWithExportsDiscrepancyRun,
|
||||
noChangeRun,
|
||||
{
|
||||
subScenario: "incremental-declaration-doesnt-change",
|
||||
modifyFs: fixModifyFs
|
||||
@@ -157,28 +156,21 @@ const a: string = 10;`, "utf-8"),
|
||||
|
||||
function verifyNoEmitChanges(compilerOptions: ts.CompilerOptions) {
|
||||
const discrepancyExplanation = () => [
|
||||
...noChangeWithExportsDiscrepancyRun.discrepancyExplanation!(),
|
||||
"Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files",
|
||||
"Incremental will store the past latestChangedDtsFile and emitSignatures",
|
||||
];
|
||||
const discrepancyIfNoDtsEmit = ts.getEmitDeclarations(compilerOptions) ?
|
||||
undefined :
|
||||
noChangeWithExportsDiscrepancyRun.discrepancyExplanation;
|
||||
const noChangeRunWithNoEmit: TestTscEdit = {
|
||||
...noChangeRun,
|
||||
subScenario: "No Change run with noEmit",
|
||||
commandLineArgs: ["--p", "src/project", "--noEmit"],
|
||||
discrepancyExplanation: compilerOptions.composite ?
|
||||
discrepancyExplanation :
|
||||
!compilerOptions.declaration ?
|
||||
noChangeWithExportsDiscrepancyRun.discrepancyExplanation :
|
||||
undefined,
|
||||
undefined,
|
||||
};
|
||||
const noChangeRunWithEmit: TestTscEdit = {
|
||||
...noChangeRun,
|
||||
subScenario: "No Change run with emit",
|
||||
commandLineArgs: ["--p", "src/project"],
|
||||
discrepancyExplanation: discrepancyIfNoDtsEmit,
|
||||
};
|
||||
let optionsString = "";
|
||||
for (const key in compilerOptions) {
|
||||
@@ -201,14 +193,11 @@ const a: string = 10;`, "utf-8"),
|
||||
modifyFs: fs => replaceText(fs, "/src/project/src/class.ts", "prop", "prop1"),
|
||||
discrepancyExplanation: compilerOptions.composite ?
|
||||
discrepancyExplanation :
|
||||
compilerOptions.declaration ?
|
||||
noChangeWithExportsDiscrepancyRun.discrepancyExplanation :
|
||||
undefined,
|
||||
undefined,
|
||||
},
|
||||
{
|
||||
subScenario: "Fix error and emit",
|
||||
modifyFs: fs => replaceText(fs, "/src/project/src/class.ts", "prop1", "prop"),
|
||||
discrepancyExplanation: discrepancyIfNoDtsEmit,
|
||||
},
|
||||
noChangeRunWithEmit,
|
||||
noChangeRunWithNoEmit,
|
||||
@@ -217,7 +206,6 @@ const a: string = 10;`, "utf-8"),
|
||||
{
|
||||
subScenario: "Introduce error and emit",
|
||||
modifyFs: fs => replaceText(fs, "/src/project/src/class.ts", "prop", "prop1"),
|
||||
discrepancyExplanation: discrepancyIfNoDtsEmit,
|
||||
},
|
||||
noChangeRunWithEmit,
|
||||
noChangeRunWithNoEmit,
|
||||
@@ -229,7 +217,7 @@ const a: string = 10;`, "utf-8"),
|
||||
modifyFs: fs => replaceText(fs, "/src/project/src/class.ts", "prop1", "prop"),
|
||||
discrepancyExplanation: compilerOptions.composite ?
|
||||
discrepancyExplanation :
|
||||
noChangeWithExportsDiscrepancyRun.discrepancyExplanation,
|
||||
undefined,
|
||||
},
|
||||
noChangeRunWithEmit,
|
||||
noChangeRunWithNoEmit,
|
||||
@@ -255,7 +243,7 @@ const a: string = 10;`, "utf-8"),
|
||||
modifyFs: fs => replaceText(fs, "/src/project/src/class.ts", "prop1", "prop"),
|
||||
discrepancyExplanation: compilerOptions.composite ?
|
||||
discrepancyExplanation :
|
||||
noChangeWithExportsDiscrepancyRun.discrepancyExplanation,
|
||||
undefined,
|
||||
},
|
||||
noChangeRunWithEmit,
|
||||
],
|
||||
@@ -692,12 +680,6 @@ console.log(a);`,
|
||||
];
|
||||
return edit;
|
||||
}
|
||||
function withOptionChangeAndExportExplanation(subScenario: string, ...options: readonly string[]): TestTscEdit {
|
||||
return {
|
||||
...withOptionChange(subScenario, ...options),
|
||||
discrepancyExplanation: noChangeWithExportsDiscrepancyRun.discrepancyExplanation,
|
||||
};
|
||||
}
|
||||
function nochangeWithIncrementalDeclarationFromBeforeExplaination(): TestTscEdit {
|
||||
return {
|
||||
...noChangeRun,
|
||||
@@ -794,8 +776,8 @@ console.log(a);`,
|
||||
fs: () => fs({ incremental: true }),
|
||||
commandLineArgs: ["--p", "/src/project"],
|
||||
edits: [
|
||||
withOptionChangeAndExportExplanation("with sourceMap", "--sourceMap"),
|
||||
withOptionChangeAndExportExplanation("should re-emit only js so they dont contain sourcemap"),
|
||||
withOptionChange("with sourceMap", "--sourceMap"),
|
||||
withOptionChange("should re-emit only js so they dont contain sourcemap"),
|
||||
withOptionChange("with declaration, emit Dts and should not emit js", "--declaration"),
|
||||
withOptionChange("with declaration and declarationMap", "--declaration", "--declarationMap"),
|
||||
nochangeWithIncrementalDeclarationFromBeforeExplaination(),
|
||||
|
||||
-26
@@ -1,29 +1,3 @@
|
||||
0:: with sourceMap
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./c.ts": [
|
||||
"./a.ts"
|
||||
],
|
||||
"./d.ts": [
|
||||
"./b.ts"
|
||||
]
|
||||
}
|
||||
Clean: {}
|
||||
1:: should re-emit only js so they dont contain sourcemap
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./c.ts": [
|
||||
"./a.ts"
|
||||
],
|
||||
"./d.ts": [
|
||||
"./b.ts"
|
||||
]
|
||||
}
|
||||
Clean: {}
|
||||
4:: no-change-run
|
||||
Clean build tsbuildinfo will have compilerOptions {}
|
||||
Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option declaration and declarationMap
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
0:: no-change-run
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"../src/main.ts": [
|
||||
"../shared/types/db.ts"
|
||||
]
|
||||
}
|
||||
Clean: {}
|
||||
-26
@@ -1,29 +1,3 @@
|
||||
0:: with sourceMap
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./c.ts": [
|
||||
"./a.ts"
|
||||
],
|
||||
"./d.ts": [
|
||||
"./b.ts"
|
||||
]
|
||||
}
|
||||
Clean: {}
|
||||
1:: should re-emit only js so they dont contain sourcemap
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./c.ts": [
|
||||
"./a.ts"
|
||||
],
|
||||
"./d.ts": [
|
||||
"./b.ts"
|
||||
]
|
||||
}
|
||||
Clean: {}
|
||||
4:: no-change-run
|
||||
Clean build tsbuildinfo will have compilerOptions {}
|
||||
Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option declaration and declarationMap
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
0:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files
|
||||
Incremental will store the past latestChangedDtsFile and emitSignatures
|
||||
TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt::
|
||||
@@ -148,8 +146,6 @@ IncrementalBuild:
|
||||
"version": "FakeTSVersion"
|
||||
}
|
||||
1:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files
|
||||
Incremental will store the past latestChangedDtsFile and emitSignatures
|
||||
TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt::
|
||||
@@ -297,8 +293,6 @@ IncrementalBuild:
|
||||
"version": "FakeTSVersion"
|
||||
}
|
||||
2:: Introduce error but still noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files
|
||||
Incremental will store the past latestChangedDtsFile and emitSignatures
|
||||
TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt::
|
||||
@@ -547,26 +541,7 @@ IncrementalBuild:
|
||||
},
|
||||
"version": "FakeTSVersion"
|
||||
}
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
5:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files
|
||||
Incremental will store the past latestChangedDtsFile and emitSignatures
|
||||
TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt::
|
||||
@@ -714,8 +689,6 @@ IncrementalBuild:
|
||||
"version": "FakeTSVersion"
|
||||
}
|
||||
6:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files
|
||||
Incremental will store the past latestChangedDtsFile and emitSignatures
|
||||
TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt::
|
||||
@@ -863,8 +836,6 @@ IncrementalBuild:
|
||||
"version": "FakeTSVersion"
|
||||
}
|
||||
10:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files
|
||||
Incremental will store the past latestChangedDtsFile and emitSignatures
|
||||
TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt::
|
||||
@@ -1100,8 +1071,6 @@ IncrementalBuild:
|
||||
"version": "FakeTSVersion"
|
||||
}
|
||||
11:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files
|
||||
Incremental will store the past latestChangedDtsFile and emitSignatures
|
||||
TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt::
|
||||
@@ -1337,8 +1306,6 @@ IncrementalBuild:
|
||||
"version": "FakeTSVersion"
|
||||
}
|
||||
13:: Fix error and no emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files
|
||||
Incremental will store the past latestChangedDtsFile and emitSignatures
|
||||
TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt::
|
||||
@@ -1499,26 +1466,7 @@ IncrementalBuild:
|
||||
},
|
||||
"version": "FakeTSVersion"
|
||||
}
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
15:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files
|
||||
Incremental will store the past latestChangedDtsFile and emitSignatures
|
||||
TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt::
|
||||
@@ -1666,8 +1614,6 @@ IncrementalBuild:
|
||||
"version": "FakeTSVersion"
|
||||
}
|
||||
16:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files
|
||||
Incremental will store the past latestChangedDtsFile and emitSignatures
|
||||
TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt::
|
||||
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
2:: Introduce error but still noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
13:: Fix error and no emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
-340
@@ -1,340 +0,0 @@
|
||||
0:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
1:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
3:: Fix error and emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
4:: No Change run with emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
5:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
6:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
7:: No Change run with emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
8:: Introduce error and emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
9:: No Change run with emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
10:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
11:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
12:: No Change run with emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
13:: Fix error and no emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
14:: No Change run with emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
15:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
16:: No Change run with noEmit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
17:: No Change run with emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
-19
@@ -1,6 +1,4 @@
|
||||
2:: Fix error and no emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files
|
||||
Incremental will store the past latestChangedDtsFile and emitSignatures
|
||||
TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt::
|
||||
@@ -160,21 +158,4 @@ IncrementalBuild:
|
||||
"latestChangedDtsFile": "FakeFileName"
|
||||
},
|
||||
"version": "FakeTSVersion"
|
||||
}
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
2:: Fix error and no emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
0:: No Change run with emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
2:: Fix error and no emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
3:: No Change run with emit
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"./src/directuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
],
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
],
|
||||
"./src/indirectuse.ts": [
|
||||
"./src/indirectclass.ts"
|
||||
]
|
||||
}
|
||||
Clean: {
|
||||
"./src/indirectclass.ts": [
|
||||
"./src/class.ts"
|
||||
]
|
||||
}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
0:: no-change-run
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"../src/main.ts": [
|
||||
"../shared/types/db.ts"
|
||||
]
|
||||
}
|
||||
Clean: {}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
0:: no-change-run
|
||||
Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files
|
||||
Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed
|
||||
Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt
|
||||
Incremental: {
|
||||
"../src/main.ts": [
|
||||
"../shared/types/db.ts"
|
||||
]
|
||||
}
|
||||
Clean: {}
|
||||
Reference in New Issue
Block a user