Skip to content

Fix unnecessary new lines in output represented incorrectly in the baselines #40751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/harness/virtualFileSystemWithWatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1203,9 +1203,11 @@ interface Array<T> { length: number; [n: number]: T; }`
}

function baselineOutputs(baseline: string[], output: readonly string[], start: number, end = output.length) {
let baselinedOutput: string[] | undefined;
for (let i = start; i < end; i++) {
baseline.push(output[i].replace(/Elapsed::\s[0-9]+ms/g, "Elapsed:: *ms"));
(baselinedOutput ||= []).push(output[i].replace(/Elapsed::\s[0-9]+ms/g, "Elapsed:: *ms"));
}
if (baselinedOutput) baseline.push(baselinedOutput.join(""));
}

export type TestServerHostTrackingWrittenFiles = TestServerHost & { writtenFiles: ESMap<Path, number>; };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ Output::
>> Screen clear
[12:00:23 AM] Starting compilation in watch mode...


tsconfig.json:7:9 - error TS1005: ',' expected.

7 "b.ts"
   ~~~~~~


[12:00:24 AM] Found 1 error. Watching for file changes.


Expand Down Expand Up @@ -90,13 +88,11 @@ Output::
>> Screen clear
[12:00:28 AM] File change detected. Starting incremental compilation...


tsconfig.json:8:9 - error TS1005: ',' expected.

8 "b.ts"
   ~~~~~~


[12:00:29 AM] Found 1 error. Watching for file changes.


Expand Down Expand Up @@ -136,13 +132,11 @@ Output::
>> Screen clear
[12:00:33 AM] File change detected. Starting incremental compilation...


tsconfig.json:8:9 - error TS1005: ',' expected.

8 "b.ts"
   ~~~~~~


[12:00:34 AM] Found 1 error. Watching for file changes.


Expand Down Expand Up @@ -180,13 +174,11 @@ Output::
>> Screen clear
[12:00:38 AM] File change detected. Starting incremental compilation...


tsconfig.json:8:9 - error TS1005: ',' expected.

8 "b.ts"
   ~~~~~~


[12:00:39 AM] Found 1 error. Watching for file changes.


Expand Down Expand Up @@ -226,7 +218,6 @@ Output::
>> Screen clear
[12:00:43 AM] File change detected. Starting incremental compilation...


[12:00:54 AM] Found 0 errors. Watching for file changes.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,74 +148,59 @@ Output::
>> Screen clear
[12:00:46 AM] Starting compilation in watch mode...


[12:00:47 AM] Projects in this build:
* core/tsconfig.json
* animals/tsconfig.json
* zoo/tsconfig.json
* tsconfig.json


[12:00:48 AM] Project 'core/tsconfig.json' is out of date because output file 'lib/core/utilities.js' does not exist


[12:00:49 AM] Building project '/user/username/projects/demo/core/tsconfig.json'...


animals/index.ts:1:20 - error TS6059: File '/user/username/projects/demo/animals/animal.ts' is not under 'rootDir' '/user/username/projects/demo/core'. 'rootDir' is expected to contain all source files.

1 import Animal from './animal';
   ~~~~~~~~~~


animals/index.ts:1:20 - error TS6307: File '/user/username/projects/demo/animals/animal.ts' is not listed within the file list of project '/user/username/projects/demo/core/tsconfig.json'. Projects must list all files or use an 'include' pattern.

1 import Animal from './animal';
   ~~~~~~~~~~


animals/index.ts:4:32 - error TS6059: File '/user/username/projects/demo/animals/dog.ts' is not under 'rootDir' '/user/username/projects/demo/core'. 'rootDir' is expected to contain all source files.

4 import { createDog, Dog } from './dog';
   ~~~~~~~


animals/index.ts:4:32 - error TS6307: File '/user/username/projects/demo/animals/dog.ts' is not listed within the file list of project '/user/username/projects/demo/core/tsconfig.json'. Projects must list all files or use an 'include' pattern.

4 import { createDog, Dog } from './dog';
   ~~~~~~~


core/utilities.ts:1:1 - error TS6133: 'A' is declared but its value is never read.

1 import * as A from '../animals';
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


core/utilities.ts:1:20 - error TS6059: File '/user/username/projects/demo/animals/index.ts' is not under 'rootDir' '/user/username/projects/demo/core'. 'rootDir' is expected to contain all source files.

1 import * as A from '../animals';
   ~~~~~~~~~~~~


core/utilities.ts:1:20 - error TS6307: File '/user/username/projects/demo/animals/index.ts' is not listed within the file list of project '/user/username/projects/demo/core/tsconfig.json'. Projects must list all files or use an 'include' pattern.

1 import * as A from '../animals';
   ~~~~~~~~~~~~


[12:00:57 AM] Project 'animals/tsconfig.json' can't be built because its dependency 'core' has errors


[12:00:58 AM] Skipping build of project '/user/username/projects/demo/animals/tsconfig.json' because its dependency '/user/username/projects/demo/core' has errors


[12:00:59 AM] Project 'zoo/tsconfig.json' can't be built because its dependency 'animals' was not built


[12:01:00 AM] Skipping build of project '/user/username/projects/demo/zoo/tsconfig.json' because its dependency '/user/username/projects/demo/animals' was not built


[12:01:01 AM] Found 7 errors. Watching for file changes.


Expand Down Expand Up @@ -401,55 +386,45 @@ Output::
>> Screen clear
[12:01:05 AM] File change detected. Starting incremental compilation...


[12:01:06 AM] Project 'core/tsconfig.json' is out of date because output file 'lib/core/utilities.js' does not exist


[12:01:07 AM] Building project '/user/username/projects/demo/core/tsconfig.json'...


animals/index.ts:1:20 - error TS6059: File '/user/username/projects/demo/animals/animal.ts' is not under 'rootDir' '/user/username/projects/demo/core'. 'rootDir' is expected to contain all source files.

1 import Animal from './animal';
   ~~~~~~~~~~


animals/index.ts:1:20 - error TS6307: File '/user/username/projects/demo/animals/animal.ts' is not listed within the file list of project '/user/username/projects/demo/core/tsconfig.json'. Projects must list all files or use an 'include' pattern.

1 import Animal from './animal';
   ~~~~~~~~~~


animals/index.ts:4:32 - error TS6059: File '/user/username/projects/demo/animals/dog.ts' is not under 'rootDir' '/user/username/projects/demo/core'. 'rootDir' is expected to contain all source files.

4 import { createDog, Dog } from './dog';
   ~~~~~~~


animals/index.ts:4:32 - error TS6307: File '/user/username/projects/demo/animals/dog.ts' is not listed within the file list of project '/user/username/projects/demo/core/tsconfig.json'. Projects must list all files or use an 'include' pattern.

4 import { createDog, Dog } from './dog';
   ~~~~~~~


core/utilities.ts:2:1 - error TS6133: 'A' is declared but its value is never read.

2 import * as A from '../animals';
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


core/utilities.ts:2:20 - error TS6059: File '/user/username/projects/demo/animals/index.ts' is not under 'rootDir' '/user/username/projects/demo/core'. 'rootDir' is expected to contain all source files.

2 import * as A from '../animals';
   ~~~~~~~~~~~~


core/utilities.ts:2:20 - error TS6307: File '/user/username/projects/demo/animals/index.ts' is not listed within the file list of project '/user/username/projects/demo/core/tsconfig.json'. Projects must list all files or use an 'include' pattern.

2 import * as A from '../animals';
   ~~~~~~~~~~~~


[12:01:11 AM] Found 7 errors. Watching for file changes.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,17 @@ Output::
>> Screen clear
[12:00:46 AM] Starting compilation in watch mode...


[12:00:47 AM] Projects in this build:
* animals/tsconfig.json
* zoo/tsconfig.json
* core/tsconfig.json
* tsconfig.json


error TS6202: Project references may not form a circular graph. Cycle detected: /user/username/projects/demo/tsconfig.json
/user/username/projects/demo/core/tsconfig.json
/user/username/projects/demo/zoo/tsconfig.json
/user/username/projects/demo/animals/tsconfig.json


[12:00:48 AM] Found 1 error. Watching for file changes.


Expand Down Expand Up @@ -220,25 +217,18 @@ Output::
>> Screen clear
[12:00:52 AM] File change detected. Starting incremental compilation...


[12:00:53 AM] Project 'core/tsconfig.json' is out of date because output file 'lib/core/utilities.js' does not exist


[12:00:54 AM] Building project '/user/username/projects/demo/core/tsconfig.json'...


[12:01:06 AM] Project 'animals/tsconfig.json' is out of date because output file 'lib/animals/animal.js' does not exist


[12:01:07 AM] Building project '/user/username/projects/demo/animals/tsconfig.json'...


[12:01:25 AM] Project 'zoo/tsconfig.json' is out of date because output file 'lib/zoo/zoo.js' does not exist


[12:01:26 AM] Building project '/user/username/projects/demo/zoo/tsconfig.json'...


[12:01:36 AM] Found 0 errors. Watching for file changes.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,13 @@ Output::
>> Screen clear
[12:00:31 AM] Starting compilation in watch mode...


[12:00:32 AM] Projects in this build:
* tsconfig.json


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


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


src/main.ts:4:1 - error TS1005: ',' expected.

4 ;
Expand All @@ -65,7 +61,6 @@ Output::
   ~
The parser expected to find a '}' to match the '{' token here.


[12:00:35 AM] Found 1 error. Watching for file changes.


Expand Down Expand Up @@ -108,13 +103,10 @@ Output::
>> Screen clear
[12:00:39 AM] File change detected. Starting incremental compilation...


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


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


src/main.ts:4:1 - error TS1005: ',' expected.

4 ;
Expand All @@ -125,7 +117,6 @@ Output::
   ~
The parser expected to find a '}' to match the '{' token here.


[12:00:42 AM] Found 1 error. Watching for file changes.


Expand Down Expand Up @@ -173,13 +164,10 @@ Output::
>> Screen clear
[12:00:46 AM] File change detected. Starting incremental compilation...


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


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


[12:01:07 AM] Found 0 errors. Watching for file changes.


Expand Down Expand Up @@ -296,19 +284,15 @@ Output::
>> Screen clear
[12:01:11 AM] File change detected. Starting incremental compilation...


[12:01:12 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'


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


src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'.

2 const a: string = 10;
   ~


[12:01:17 AM] Found 1 error. Watching for file changes.


Expand Down Expand Up @@ -418,19 +402,15 @@ Output::
>> Screen clear
[12:01:21 AM] File change detected. Starting incremental compilation...


[12:01:22 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'


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


src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'.

2 const a: string = 10;
   ~


[12:01:24 AM] Found 1 error. Watching for file changes.


Expand Down Expand Up @@ -476,16 +456,12 @@ Output::
>> Screen clear
[12:01:28 AM] File change detected. Starting incremental compilation...


[12:01:29 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'


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


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


[12:01:39 AM] Found 0 errors. Watching for file changes.


Expand Down Expand Up @@ -585,16 +561,12 @@ Output::
>> Screen clear
[12:01:43 AM] File change detected. Starting incremental compilation...


[12:01:44 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'


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


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


[12:01:48 AM] Found 0 errors. Watching for file changes.


Expand Down
Loading