Skip to content

Commit

Permalink
Merge pull request #31270 from ajafff/getParsedCommandLine-path
Browse files Browse the repository at this point in the history
parseProjectReferenceConfigFile: always set SourceFile.path
  • Loading branch information
sheetalkamat committed May 6, 2019
2 parents cc0e5a0 + 3c2f368 commit 6c4876a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/compiler/program.ts
Expand Up @@ -2688,6 +2688,7 @@ namespace ts {
return undefined;
}
sourceFile = Debug.assertDefined(commandLine.options.configFile);
Debug.assert(!sourceFile.path || sourceFile.path === sourceFilePath);
addFileToFilesByName(sourceFile, sourceFilePath, /*redirectedPath*/ undefined);
}
else {
Expand All @@ -2699,11 +2700,12 @@ namespace ts {
projectReferenceRedirects.set(sourceFilePath, false);
return undefined;
}
sourceFile.path = sourceFilePath;
sourceFile.resolvedPath = sourceFilePath;
sourceFile.originalFileName = refPath;
commandLine = parseJsonSourceFileConfigFileContent(sourceFile, configParsingHost, basePath, /*existingOptions*/ undefined, refPath);
}
sourceFile.path = sourceFilePath;
sourceFile.resolvedPath = sourceFilePath;
sourceFile.originalFileName = refPath;

const resolvedRef: ResolvedProjectReference = { commandLine, sourceFile };
projectReferenceRedirects.set(sourceFilePath, resolvedRef);
if (commandLine.projectReferences) {
Expand Down

0 comments on commit 6c4876a

Please sign in to comment.