Skip to content

Commit 8cd3af8

Browse files
committed
Revert "Some logging for debugging further"
This reverts commit e1ba8a8.
1 parent e1ba8a8 commit 8cd3af8

File tree

210 files changed

+3
-3471
lines changed

Some content is hidden

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

210 files changed

+3
-3471
lines changed

src/compiler/sys.ts

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,15 +1120,10 @@ namespace ts {
11201120
recursive,
11211121
inodeWatching ?
11221122
callbackChangingToMissingFileSystemEntry :
1123-
(eventName, relativeFileName) => {
1124-
1125-
sysLog(`sysLog:: watchPresentFileSystemEntry:: ${fileOrDirectory} ${entryKind} ${eventName}:: ${relativeFileName}`);
1126-
callback(eventName, relativeFileName);
1127-
}
1123+
callback
11281124
);
11291125
// Watch the missing file or directory or error
11301126
presentWatcher.on("error", () => {
1131-
sysLog(`sysLog:: watchPresentFileSystemEntry:: on Error ${fileOrDirectory} ${entryKind} rename, ""`);
11321127
callback("rename", "");
11331128
updateWatcher(watchMissingFileSystemEntry);
11341129
});
@@ -1145,11 +1140,7 @@ namespace ts {
11451140
}
11461141

11471142
function callbackChangingToMissingFileSystemEntry(event: "rename" | "change", relativeName: string | undefined) {
1148-
sysLog(`sysLog:: callbackChangingToMissingFileSystemEntry:: ${fileOrDirectory} ${entryKind} ${event}:: ${relativeName} ${inodeWatching} ${lastDirectoryPart} ${lastDirectoryPartWithDirectorySeparator}`);
1149-
if (relativeName && endsWith(relativeName, "~")) {
1150-
relativeName = relativeName.slice(0, relativeName.length - 1);
1151-
sysLog(`sysLog:: callbackChangingToMissingFileSystemEntry:: changed the relative name to ${relativeName}`);
1152-
}
1143+
if (relativeName && endsWith(relativeName, "~")) relativeName = relativeName.slice(0, relativeName.length - 1);
11531144
callback(event, relativeName);
11541145
// because relativeName is not guaranteed to be correct we need to check on each rename with few combinations
11551146
// Eg on ubuntu while watching app/node_modules the relativeName is "node_modules" which is neither relative nor full path
@@ -1173,10 +1164,7 @@ namespace ts {
11731164
function watchPresentFileSystemEntryWithFsWatchFile(): FileWatcher {
11741165
return watchFile(
11751166
fileOrDirectory,
1176-
createFileWatcherCallback((eventName, relativeFileName) => {
1177-
sysLog(`sysLog:: watchPresentFileSystemEntryWithFsWatchFile:: ${fileOrDirectory} ${entryKind} ${eventName}:: ${relativeFileName}`);
1178-
callback(eventName, relativeFileName);
1179-
}),
1167+
createFileWatcherCallback(callback),
11801168
fallbackPollingInterval,
11811169
fallbackOptions
11821170
);
@@ -1190,9 +1178,7 @@ namespace ts {
11901178
return watchFile(
11911179
fileOrDirectory,
11921180
(_fileName, eventKind) => {
1193-
sysLog(`sysLog:: watchMissingFileSystemEntry:: ${fileOrDirectory} ${entryKind} ${_fileName}:: ${eventKind}`);
11941181
if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
1195-
sysLog(`sysLog:: watchMissingFileSystemEntry:: Callback :: rename, "" and will update the watcher`);
11961182
callback("rename", "");
11971183
// Call the callback for current file or directory
11981184
// For now it could be callback for the inner directory creation,

tests/baselines/reference/tsbuildWatch/demo/updates-with-bad-reference.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,6 @@ export function lastElementOf<T>(arr: T[]): T | undefined {
433433

434434

435435
Output::
436-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/demo/core 1 change:: utilities.ts
437-
438436
>> Screen clear
439437
[12:01:07 AM] File change detected. Starting incremental compilation...
440438

tests/baselines/reference/tsbuildWatch/demo/updates-with-circular-reference.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ Input::
216216

217217

218218
Output::
219-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/demo/core 1 change:: tsconfig.json
220-
221219
>> Screen clear
222220
[12:00:52 AM] File change detected. Starting incremental compilation...
223221

tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,6 @@ Input::
278278

279279

280280
Output::
281-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 change:: package.json
282-
283281
>> Screen clear
284282
[12:01:17 AM] File change detected. Starting incremental compilation...
285283

@@ -372,8 +370,6 @@ Input::
372370

373371

374372
Output::
375-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 change:: package.json
376-
377373
>> Screen clear
378374
[12:01:24 AM] File change detected. Starting incremental compilation...
379375

@@ -418,7 +414,6 @@ File '/user/username/projects/myproject/packages/pkg2/build/const.ts' does not e
418414
File '/user/username/projects/myproject/packages/pkg2/build/const.tsx' does not exist.
419415
File '/user/username/projects/myproject/packages/pkg2/build/const.d.ts' exist - use it as a name resolution result.
420416
======== Module name './const.js' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/build/const.d.ts'. ========
421-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg1 1 change:: build/index.js
422417
[12:01:30 AM] Found 0 errors. Watching for file changes.
423418

424419

tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ Input::
269269

270270

271271
Output::
272-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg1 1 change:: package.json
273-
274272
>> Screen clear
275273
[12:01:11 AM] File change detected. Starting incremental compilation...
276274

@@ -391,8 +389,6 @@ Input::
391389

392390

393391
Output::
394-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg1 1 change:: package.json
395-
396392
>> Screen clear
397393
[12:01:18 AM] File change detected. Starting incremental compilation...
398394

@@ -436,7 +432,6 @@ File '/user/username/projects/myproject/packages/pkg2/build/const.d.cts' exist -
436432
File '/a/lib/package.json' does not exist.
437433
File '/a/package.json' does not exist.
438434
File '/package.json' does not exist.
439-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg1 1 change:: build/index.js
440435
[12:01:24 AM] Found 0 errors. Watching for file changes.
441436

442437

@@ -504,8 +499,6 @@ Input::
504499

505500

506501
Output::
507-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg1 1 change:: package.json
508-
509502
>> Screen clear
510503
[12:01:28 AM] File change detected. Starting incremental compilation...
511504

@@ -630,12 +623,6 @@ export type { TheNum } from './const.cjs';
630623
//// [/user/username/projects/myproject/packages/pkg2/index.ts] deleted
631624

632625
Output::
633-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 change:: package.json
634-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 rename:: index.ts
635-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 change::
636-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 rename:: index.cts
637-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 change::
638-
639626
>> Screen clear
640627
[12:01:39 AM] File change detected. Starting incremental compilation...
641628

@@ -655,16 +642,8 @@ File '/user/username/projects/myproject/packages/pkg2/const.cts' exist - use it
655642
File '/a/lib/package.json' does not exist.
656643
File '/a/package.json' does not exist.
657644
File '/package.json' does not exist.
658-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 rename:: build/index.cjs
659-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 change:: build
660-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 rename:: build/index.d.cts
661-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 change:: build
662-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 change:: build/tsconfig.tsbuildinfo
663645
[12:01:50 AM] Updating unchanged output timestamps of project '/user/username/projects/myproject/packages/pkg2/tsconfig.json'...
664646

665-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 change:: build/const.cjs
666-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 change:: build/const.d.cts
667-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject/packages/pkg2 1 change:: build/tsconfig.tsbuildinfo.readable.baseline.txt
668647

669648

670649
Program root files: ["/user/username/projects/myproject/packages/pkg2/const.cts","/user/username/projects/myproject/packages/pkg2/index.cts"]

tests/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted-with-incremental.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ Input::
129129
//// [/user/username/projects/myproject/a.js] file written with same contents
130130

131131
Output::
132-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject 1 change:: a.js
133-
134132
>> Screen clear
135133
[12:00:35 AM] File change detected. Starting incremental compilation...
136134

@@ -179,17 +177,13 @@ const x = 10;
179177

180178

181179
Output::
182-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject 1 change:: a.js
183-
184180
>> Screen clear
185181
[12:00:42 AM] File change detected. Starting incremental compilation...
186182

187183
[12:00:43 AM] Project 'tsconfig.json' is out of date because output file 'b.js' does not exist
188184

189185
[12:00:44 AM] Building project '/user/username/projects/myproject/tsconfig.json'...
190186

191-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject 1 change:: tsconfig.tsbuildinfo
192-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject 1 change:: tsconfig.tsbuildinfo.readable.baseline.txt
193187
[12:00:51 AM] Found 0 errors. Watching for file changes.
194188

195189

tests/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ Input::
8181
//// [/user/username/projects/myproject/a.js] file written with same contents
8282

8383
Output::
84-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject 1 change:: a.js
85-
8684
>> Screen clear
8785
[12:00:31 AM] File change detected. Starting incremental compilation...
8886

@@ -131,8 +129,6 @@ const x = 10;
131129

132130

133131
Output::
134-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/myproject 1 change:: a.js
135-
136132
>> Screen clear
137133
[12:00:38 AM] File change detected. Starting incremental compilation...
138134

tests/baselines/reference/tsbuildWatch/noEmitOnError/does-not-emit-any-files-on-error-with-incremental.js

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ Input::
9898
//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents
9999

100100
Output::
101-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: src/main.ts
102-
103101
>> Screen clear
104102
[12:00:39 AM] File change detected. Starting incremental compilation...
105103

@@ -159,33 +157,13 @@ const a = {
159157

160158

161159
Output::
162-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: src/main.ts
163-
164160
>> Screen clear
165161
[12:00:46 AM] File change detected. Starting incremental compilation...
166162

167163
[12:00:47 AM] Project 'tsconfig.json' is out of date because output file 'dev-build/shared/types/db.js' does not exist
168164

169165
[12:00:48 AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'...
170166

171-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 rename:: dev-build
172-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change::
173-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 rename:: dev-build/shared
174-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build
175-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 rename:: dev-build/shared/types
176-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/shared
177-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 rename:: dev-build/shared/types/db.js
178-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/shared/types
179-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 rename:: dev-build/src
180-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build
181-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 rename:: dev-build/src/main.js
182-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/src
183-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 rename:: dev-build/src/other.js
184-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/src
185-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 rename:: dev-build/tsconfig.tsbuildinfo
186-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build
187-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 rename:: dev-build/tsconfig.tsbuildinfo.readable.baseline.txt
188-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build
189167
[12:01:09 AM] Found 0 errors. Watching for file changes.
190168

191169

@@ -315,8 +293,6 @@ const a: string = 10;
315293

316294

317295
Output::
318-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: src/main.ts
319-
320296
>> Screen clear
321297
[12:01:13 AM] File change detected. Starting incremental compilation...
322298

@@ -329,8 +305,6 @@ sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 c
329305
2 const a: string = 10;
330306
   ~
331307

332-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/tsconfig.tsbuildinfo
333-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/tsconfig.tsbuildinfo.readable.baseline.txt
334308
[12:01:22 AM] Found 1 error. Watching for file changes.
335309

336310

@@ -450,8 +424,6 @@ Input::
450424
//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents
451425

452426
Output::
453-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: src/main.ts
454-
455427
>> Screen clear
456428
[12:01:27 AM] File change detected. Starting incremental compilation...
457429

@@ -509,22 +481,15 @@ const a: string = "hello";
509481

510482

511483
Output::
512-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: src/main.ts
513-
514484
>> Screen clear
515485
[12:01:34 AM] File change detected. Starting incremental compilation...
516486

517487
[12:01:35 AM] Project 'tsconfig.json' is out of date because oldest output 'dev-build/shared/types/db.js' is older than newest input 'src/main.ts'
518488

519489
[12:01:36 AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'...
520490

521-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/src/main.js
522-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/tsconfig.tsbuildinfo
523491
[12:01:44 AM] Updating unchanged output timestamps of project '/user/username/projects/noEmitOnError/tsconfig.json'...
524492

525-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/shared/types/db.js
526-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/src/other.js
527-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/tsconfig.tsbuildinfo.readable.baseline.txt
528493
[12:01:48 AM] Found 0 errors. Watching for file changes.
529494

530495

@@ -634,8 +599,6 @@ Input::
634599
//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents
635600

636601
Output::
637-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: src/main.ts
638-
639602
>> Screen clear
640603
[12:01:52 AM] File change detected. Starting incremental compilation...
641604

@@ -645,10 +608,6 @@ sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 c
645608

646609
[12:01:56 AM] Updating unchanged output timestamps of project '/user/username/projects/noEmitOnError/tsconfig.json'...
647610

648-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/shared/types/db.js
649-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/src/main.js
650-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/src/other.js
651-
sysLog:: watchPresentFileSystemEntry:: /user/username/projects/noemitonerror 1 change:: dev-build/tsconfig.tsbuildinfo
652611
[12:01:57 AM] Found 0 errors. Watching for file changes.
653612

654613

0 commit comments

Comments
 (0)