diff --git a/src/compiler/program.ts b/src/compiler/program.ts index dcf97f7b97c..3b9b3a60761 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -63,7 +63,6 @@ import { DiagnosticWithLocation, directorySeparator, DirectoryStructureHost, - emitDetachedComments, emitFileNamesIsEqual, emitFiles, EmitHost, @@ -316,6 +315,7 @@ import { trace, tracing, tryCast, + tsFixRootDirSignal, TypeChecker, typeDirectiveIsEqualTo, TypeReferenceDirectiveResolutionCache, @@ -2177,6 +2177,7 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro sourceFile.fileName, "!!! Sheetal CommonDir computed: " + commonSourceDirectory + " commonDir in 6.0 : " + commonDir60, ); + tsFixRootDirSignal("allFilesDontBelong", commonSourceDirectory, commonDir60); }); } } @@ -4464,6 +4465,7 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro "\n outputPaths:: " + JSON.stringify(outputPaths) + "\n Output paths in 6.0: " + JSON.stringify(outputPaths60), )); + tsFixRootDirSignal("outputPathsChange", getCommonSourceDirectory(), commonDir60); } } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 4a54b8aa30f..51871749158 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -6628,6 +6628,12 @@ export function sourceFileMayBeEmitted(sourceFile: SourceFile, host: SourceFileM return true; } +/**@internal */ +export function tsFixRootDirSignal(kind: string, rootDir: string, rootDir60: string): void { + throw new Error(`TS_FIX_ROOTDIR_SIGNAL:: ${kind}:: 5.9:: ${rootDir} 6.0:: ${rootDir60} `); +} + +/** @internal */ export function sourceFileMayBeEmitted60(sourceFile: SourceFile, host: SourceFileMayBeEmittedHost, forceDtsEmit?: boolean): boolean { const options = host.getCompilerOptions(); // Js files are emitted only if option is enabled