Log per-project FAR and update baselines (#47781)

This commit is contained in:
Andrew Casey
2022-02-07 16:10:01 -08:00
committed by GitHub
parent d8ac54bfb1
commit 1b6fb99efe
31 changed files with 79 additions and 1 deletions

View File

@@ -370,7 +370,8 @@ namespace ts.server {
function combineProjectOutputForReferences(
projects: Projects,
defaultProject: Project,
initialLocation: DocumentPosition
initialLocation: DocumentPosition,
logger: Logger,
): readonly ReferencedSymbol[] {
const outputs: ReferencedSymbol[] = [];
@@ -379,6 +380,7 @@ namespace ts.server {
defaultProject,
initialLocation,
(project, location, getMappedLocation) => {
logger.info(`Finding references to ${location.fileName} position ${location.pos} in project ${project.getProjectName()}`);
for (const outputReferencedSymbol of project.getLanguageService().findReferences(location.fileName, location.pos) || emptyArray) {
const mappedDefinitionFile = getMappedLocation(project, documentSpanLocation(outputReferencedSymbol.definition));
const definition: ReferencedSymbolDefinitionInfo = mappedDefinitionFile === undefined ?
@@ -1588,6 +1590,7 @@ namespace ts.server {
projects,
this.getDefaultProject(args),
{ fileName: args.file, pos: position },
this.logger,
);
if (!simplifiedResult) return references;