Skip to content

Commit c0ac582

Browse files
authored
Make the config file name in logger little more concise. (#58255)
1 parent e0755dc commit c0ac582

File tree

1,191 files changed

+3181
-6367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,191 files changed

+3181
-6367
lines changed

src/server/editorServices.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,14 +2358,8 @@ export class ProjectService {
23582358
const result = this.configFileForOpenFiles.get(info.path);
23592359
if (result !== undefined) return result || undefined;
23602360
}
2361-
this.logger.info(`Search path: ${getDirectoryPath(info.fileName)}`);
23622361
const configFileName = this.forEachConfigFileLocation(info, (canonicalConfigFilePath, configFileName) => this.configFileExists(configFileName, canonicalConfigFilePath, info));
2363-
if (configFileName) {
2364-
this.logger.info(`For info: ${info.fileName} :: Config file name: ${configFileName}`);
2365-
}
2366-
else {
2367-
this.logger.info(`For info: ${info.fileName} :: No config files found.`);
2368-
}
2362+
this.logger.info(`getConfigFileNameForFile:: File: ${info.fileName} ProjectRootPath: ${this.openFiles.get(info.path)}:: Result: ${configFileName}`);
23692363
if (isOpenScriptInfo(info)) {
23702364
this.configFileForOpenFiles.set(info.path, configFileName || false);
23712365
}

tests/baselines/reference/tsserver/applyChangesToOpenFiles/with-applyChangedToOpenFiles-request.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ Info seq [hh:mm:ss:mss] request:
3939
"seq": 1,
4040
"type": "request"
4141
}
42-
Info seq [hh:mm:ss:mss] Search path: /a/b
43-
Info seq [hh:mm:ss:mss] For info: /a/b/app.ts :: Config file name: /a/b/tsconfig.json
42+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/app.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json
4443
Info seq [hh:mm:ss:mss] Creating configuration project /a/b/tsconfig.json
4544
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/b/tsconfig.json 2000 undefined Project: /a/b/tsconfig.json WatchType: Config file
4645
Info seq [hh:mm:ss:mss] event:
@@ -223,8 +222,7 @@ Info seq [hh:mm:ss:mss] request:
223222
"type": "request"
224223
}
225224
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a/b/file3.ts 500 undefined WatchType: Closed Script info
226-
Info seq [hh:mm:ss:mss] Search path: /a/b
227-
Info seq [hh:mm:ss:mss] For info: /a/b/file3.ts :: Config file name: /a/b/tsconfig.json
225+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/file3.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json
228226
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /a/b/tsconfig.json
229227
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /a/b/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
230228
Info seq [hh:mm:ss:mss] Project '/a/b/tsconfig.json' (Configured)
@@ -344,8 +342,7 @@ Info seq [hh:mm:ss:mss] request:
344342
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a/b/commonFile1.ts 500 undefined WatchType: Closed Script info
345343
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a/b/commonFile2.ts 500 undefined WatchType: Closed Script info
346344
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/b/file3.ts 500 undefined WatchType: Closed Script info
347-
Info seq [hh:mm:ss:mss] Search path: /a/b
348-
Info seq [hh:mm:ss:mss] For info: /a/b/commonFile1.ts :: Config file name: /a/b/tsconfig.json
345+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/commonFile1.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json
349346
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /a/b/tsconfig.json
350347
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /a/b/tsconfig.json projectStateVersion: 3 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
351348
Info seq [hh:mm:ss:mss] Project '/a/b/tsconfig.json' (Configured)
@@ -357,8 +354,7 @@ Info seq [hh:mm:ss:mss] Files (5)
357354
/a/b/file3.ts Text-3 "let xyz = 1;"
358355

359356
Info seq [hh:mm:ss:mss] -----------------------------------------------
360-
Info seq [hh:mm:ss:mss] Search path: /a/b
361-
Info seq [hh:mm:ss:mss] For info: /a/b/commonFile2.ts :: Config file name: /a/b/tsconfig.json
357+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/commonFile2.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json
362358
Info seq [hh:mm:ss:mss] Project '/a/b/tsconfig.json' (Configured)
363359
Info seq [hh:mm:ss:mss] Files (5)
364360

tests/baselines/reference/tsserver/applyChangesToOpenFiles/with-updateOpen-request.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ Info seq [hh:mm:ss:mss] request:
3939
"seq": 1,
4040
"type": "request"
4141
}
42-
Info seq [hh:mm:ss:mss] Search path: /a/b
43-
Info seq [hh:mm:ss:mss] For info: /a/b/app.ts :: Config file name: /a/b/tsconfig.json
42+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/app.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json
4443
Info seq [hh:mm:ss:mss] Creating configuration project /a/b/tsconfig.json
4544
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/b/tsconfig.json 2000 undefined Project: /a/b/tsconfig.json WatchType: Config file
4645
Info seq [hh:mm:ss:mss] event:
@@ -223,8 +222,7 @@ Info seq [hh:mm:ss:mss] request:
223222
"type": "request"
224223
}
225224
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a/b/file3.ts 500 undefined WatchType: Closed Script info
226-
Info seq [hh:mm:ss:mss] Search path: /a/b
227-
Info seq [hh:mm:ss:mss] For info: /a/b/file3.ts :: Config file name: /a/b/tsconfig.json
225+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/file3.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json
228226
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /a/b/tsconfig.json
229227
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /a/b/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
230228
Info seq [hh:mm:ss:mss] Project '/a/b/tsconfig.json' (Configured)
@@ -352,8 +350,7 @@ Info seq [hh:mm:ss:mss] request:
352350
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a/b/commonFile1.ts 500 undefined WatchType: Closed Script info
353351
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a/b/commonFile2.ts 500 undefined WatchType: Closed Script info
354352
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/b/file3.ts 500 undefined WatchType: Closed Script info
355-
Info seq [hh:mm:ss:mss] Search path: /a/b
356-
Info seq [hh:mm:ss:mss] For info: /a/b/commonFile1.ts :: Config file name: /a/b/tsconfig.json
353+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/commonFile1.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json
357354
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /a/b/tsconfig.json
358355
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /a/b/tsconfig.json projectStateVersion: 3 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
359356
Info seq [hh:mm:ss:mss] Project '/a/b/tsconfig.json' (Configured)
@@ -365,8 +362,7 @@ Info seq [hh:mm:ss:mss] Files (5)
365362
/a/b/file3.ts Text-3 "let xyz = 1;"
366363

367364
Info seq [hh:mm:ss:mss] -----------------------------------------------
368-
Info seq [hh:mm:ss:mss] Search path: /a/b
369-
Info seq [hh:mm:ss:mss] For info: /a/b/commonFile2.ts :: Config file name: /a/b/tsconfig.json
365+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/commonFile2.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json
370366
Info seq [hh:mm:ss:mss] Project '/a/b/tsconfig.json' (Configured)
371367
Info seq [hh:mm:ss:mss] Files (5)
372368

tests/baselines/reference/tsserver/autoImportProvider/Auto-importable-file-is-in-inferred-project-until-imported.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ Info seq [hh:mm:ss:mss] request:
5454
"seq": 2,
5555
"type": "request"
5656
}
57-
Info seq [hh:mm:ss:mss] Search path: /node_modules/@angular/forms
58-
Info seq [hh:mm:ss:mss] For info: /node_modules/@angular/forms/forms.d.ts :: No config files found.
57+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /node_modules/@angular/forms/forms.d.ts ProjectRootPath: undefined:: Result: undefined
5958
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
6059
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@angular/forms/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
6160
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file
@@ -256,8 +255,7 @@ Info seq [hh:mm:ss:mss] request:
256255
"seq": 3,
257256
"type": "request"
258257
}
259-
Info seq [hh:mm:ss:mss] Search path: /
260-
Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json
258+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /index.ts ProjectRootPath: undefined:: Result: /tsconfig.json
261259
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
262260
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
263261
Info seq [hh:mm:ss:mss] event:

tests/baselines/reference/tsserver/autoImportProvider/Closes-AutoImportProviderProject-when-host-project-closes.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ Info seq [hh:mm:ss:mss] request:
5454
"seq": 2,
5555
"type": "request"
5656
}
57-
Info seq [hh:mm:ss:mss] Search path: /
58-
Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json
57+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /index.ts ProjectRootPath: undefined:: Result: /tsconfig.json
5958
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
6059
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
6160
Info seq [hh:mm:ss:mss] event:
@@ -353,8 +352,7 @@ Info seq [hh:mm:ss:mss] request:
353352
"seq": 4,
354353
"type": "request"
355354
}
356-
Info seq [hh:mm:ss:mss] Search path: /random
357-
Info seq [hh:mm:ss:mss] For info: /random/random.ts :: No config files found.
355+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /random/random.ts ProjectRootPath: /random:: Result: undefined
358356
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
359357
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file
360358
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms

tests/baselines/reference/tsserver/autoImportProvider/Does-not-close-when-root-files-are-redirects-that-dont-actually-exist.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ Info seq [hh:mm:ss:mss] request:
5757
"seq": 2,
5858
"type": "request"
5959
}
60-
Info seq [hh:mm:ss:mss] Search path: /packages/a
61-
Info seq [hh:mm:ss:mss] For info: /packages/a/index.ts :: Config file name: /packages/a/tsconfig.json
60+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /packages/a/index.ts ProjectRootPath: undefined:: Result: /packages/a/tsconfig.json
6261
Info seq [hh:mm:ss:mss] Creating configuration project /packages/a/tsconfig.json
6362
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/a/tsconfig.json 2000 undefined Project: /packages/a/tsconfig.json WatchType: Config file
6463
Info seq [hh:mm:ss:mss] event:
@@ -238,8 +237,7 @@ Info seq [hh:mm:ss:mss] event:
238237
]
239238
}
240239
}
241-
Info seq [hh:mm:ss:mss] Search path: /packages/a
242-
Info seq [hh:mm:ss:mss] For info: /packages/a/tsconfig.json :: No config files found.
240+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /packages/a/tsconfig.json ProjectRootPath: undefined:: Result: undefined
243241
Info seq [hh:mm:ss:mss] Project '/packages/a/tsconfig.json' (Configured)
244242
Info seq [hh:mm:ss:mss] Files (1)
245243

tests/baselines/reference/tsserver/autoImportProvider/Does-not-create-an-auto-import-provider-if-there-are-too-many-dependencies.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ Info seq [hh:mm:ss:mss] request:
126126
"seq": 2,
127127
"type": "request"
128128
}
129-
Info seq [hh:mm:ss:mss] Search path: /
130-
Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json
129+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /index.ts ProjectRootPath: undefined:: Result: /tsconfig.json
131130
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
132131
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
133132
Info seq [hh:mm:ss:mss] event:

tests/baselines/reference/tsserver/autoImportProvider/Does-not-create-auto-import-providers-upon-opening-projects-for-find-all-references.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ Info seq [hh:mm:ss:mss] request:
6969
"seq": 2,
7070
"type": "request"
7171
}
72-
Info seq [hh:mm:ss:mss] Search path: /packages/b
73-
Info seq [hh:mm:ss:mss] For info: /packages/b/index.ts :: Config file name: /packages/b/tsconfig.json
72+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /packages/b/index.ts ProjectRootPath: undefined:: Result: /packages/b/tsconfig.json
7473
Info seq [hh:mm:ss:mss] Creating configuration project /packages/b/tsconfig.json
7574
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/b/tsconfig.json 2000 undefined Project: /packages/b/tsconfig.json WatchType: Config file
7675
Info seq [hh:mm:ss:mss] event:
@@ -232,12 +231,10 @@ Info seq [hh:mm:ss:mss] event:
232231
]
233232
}
234233
}
235-
Info seq [hh:mm:ss:mss] Search path: /packages/b
236-
Info seq [hh:mm:ss:mss] For info: /packages/b/tsconfig.json :: Config file name: /tsconfig.json
234+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /packages/b/tsconfig.json ProjectRootPath: undefined:: Result: /tsconfig.json
237235
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
238236
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
239-
Info seq [hh:mm:ss:mss] Search path: /
240-
Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: No config files found.
237+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined
241238
Info seq [hh:mm:ss:mss] Project '/packages/b/tsconfig.json' (Configured)
242239
Info seq [hh:mm:ss:mss] Files (1)
243240
@@ -628,10 +625,8 @@ Info seq [hh:mm:ss:mss] event:
628625
}
629626
}
630627
Info seq [hh:mm:ss:mss] Finding references to /packages/b/index.ts position 13 in project /tsconfig.json
631-
Info seq [hh:mm:ss:mss] Search path: /packages/a
632-
Info seq [hh:mm:ss:mss] For info: /packages/a/index.ts :: Config file name: /packages/a/tsconfig.json
633-
Info seq [hh:mm:ss:mss] Search path: /packages/a
634-
Info seq [hh:mm:ss:mss] For info: /packages/a/index.ts :: Config file name: /packages/a/tsconfig.json
628+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /packages/a/index.ts ProjectRootPath: undefined:: Result: /packages/a/tsconfig.json
629+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /packages/a/index.ts ProjectRootPath: undefined:: Result: /packages/a/tsconfig.json
635630
Info seq [hh:mm:ss:mss] Finding references to /packages/b/index.ts position 13 in project /packages/a/tsconfig.json
636631
Info seq [hh:mm:ss:mss] response:
637632
{

tests/baselines/reference/tsserver/autoImportProvider/Does-not-schedule-ensureProjectForOpenFiles-on-AutoImportProviderProject-creation.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ Info seq [hh:mm:ss:mss] request:
5151
"seq": 2,
5252
"type": "request"
5353
}
54-
Info seq [hh:mm:ss:mss] Search path: /
55-
Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json
54+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /index.ts ProjectRootPath: undefined:: Result: /tsconfig.json
5655
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
5756
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
5857
Info seq [hh:mm:ss:mss] event:

tests/baselines/reference/tsserver/autoImportProvider/Recovers-from-an-unparseable-package_json.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ Info seq [hh:mm:ss:mss] request:
5454
"seq": 2,
5555
"type": "request"
5656
}
57-
Info seq [hh:mm:ss:mss] Search path: /
58-
Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json
57+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /index.ts ProjectRootPath: undefined:: Result: /tsconfig.json
5958
Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json
6059
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file
6160
Info seq [hh:mm:ss:mss] event:

0 commit comments

Comments
 (0)