Skip to content
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

Try making parenthesizeConstituentTypeOfUnionType a no-op #57900

Closed
wants to merge 3 commits into from

Conversation

jakebailey
Copy link
Member

Curious about #57890 (comment) on DT

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Mar 22, 2024
@jakebailey
Copy link
Member Author

@typescript-bot run dt
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 22, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
run dt ✅ Started 👀 Results
perf test this ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

There were interesting changes:

Branch only errors:

Package: eslint
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/eslint/eslint-tests.ts
   84:1  error  TypeScript@local expected type to be:
  (Token & { type: "Identifier"; }) | null
got:
  Token & { type: "Identifier"; } | null  @definitelytyped/expect
   85:1  error  TypeScript@local expected type to be:
  (Token & { type: "Identifier"; }) | null
got:
  Token & { type: "Identifier"; } | null  @definitelytyped/expect
   90:1  error  TypeScript@local expected type to be:
  (Token & { type: "Identifier"; }) | null
got:
  Token & { type: "Identifier"; } | null  @definitelytyped/expect
  186:1  error  TypeScript@local expected type to be:
  (Token & { type: "Identifier"; }) | null
got:
  Token & { type: "Identifier"; } | null  @definitelytyped/expect
  188:1  error  TypeScript@local expected type to be:
  (Token & { type: "Identifier"; }) | null
got:
  Token & { type: "Identifier"; } | null  @definitelytyped/expect
  198:1  error  TypeScript@local expected type to be:
  (Token & { type: "Identifier"; }) | null
got:
  Token & { type: "Identifier"; } | null  @definitelytyped/expect

✖ 6 problems (6 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: ember__array/v3
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/ember__array/v3/test/array.ts
  33:1  error  TypeScript@local expected type to be:
  ({ name: string; isHappy: boolean; } & EmberObject & { name: string; isHappy: boolean; }) | undefined
got:
  { name: string; isHappy: boolean; } & EmberObject & { name: string; isHappy: boolean; } | undefined  @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: parse
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/parse/parse-tests.ts
  1658:9  error  TypeScript@local expected type to be:
  Pointer | (ToJSON<Attributes> & JSONBaseAttributes)
got:
  Pointer | ToJSON<Attributes> & JSONBaseAttributes                  @definitelytyped/expect
  1660:9  error  TypeScript@local expected type to be:
  Pointer | (ToJSON<AttributesAllTypes> & JSONBaseAttributes)
got:
  Pointer | ToJSON<AttributesAllTypes> & JSONBaseAttributes  @definitelytyped/expect

✖ 2 problems (2 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: react/v16
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/react/v16/test/index.ts
  526:13  error  TypeScript@local expected type to be:
  (EventTarget & Element) | null
got:
  EventTarget & Element | null  @definitelytyped/expect
  534:13  error  TypeScript@local expected type to be:
  (EventTarget & Element) | null
got:
  EventTarget & Element | null  @definitelytyped/expect

✖ 2 problems (2 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: ember__array
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/ember__array/test/array.ts
  38:1  error  TypeScript@local expected type to be:
  ({ name: string; isHappy: boolean; } & EmberObject & { name: string; isHappy: boolean; }) | undefined
got:
  { name: string; isHappy: boolean; } & EmberObject & { name: string; isHappy: boolean; } | undefined  @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: react/v17
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/react/v17/test/index.ts
  525:13  error  TypeScript@local expected type to be:
  (EventTarget & Element) | null
got:
  EventTarget & Element | null  @definitelytyped/expect
  533:13  error  TypeScript@local expected type to be:
  (EventTarget & Element) | null
got:
  EventTarget & Element | null  @definitelytyped/expect

✖ 2 problems (2 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: react
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/react/test/index.ts
  495:13  error  TypeScript@local expected type to be:
  (EventTarget & Element) | null
got:
  EventTarget & Element | null  @definitelytyped/expect
  503:13  error  TypeScript@local expected type to be:
  (EventTarget & Element) | null
got:
  EventTarget & Element | null  @definitelytyped/expect

✖ 2 problems (2 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: gulp-run
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/gulp-run/gulp-run-tests.ts
  48:5  error  TypeScript@local expected type to be:
  (Error & { status: number; }) | null
got:
  Error & { status: number; } | null  @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: wordpress__editor
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/wordpress__editor/wordpress__editor-tests.tsx
  391:1  error  TypeScript@local expected type to be:
  (RenderedText<"edit"> & { is_protected: boolean; block_version: string; }) | (RenderedText<"edit"> & { is_protected: boolean; block_version: string; }) | undefined
got:
  RenderedText<"edit"> & { is_protected: boolean; block_version: string; } | RenderedText<"edit"> & { is_protected: boolean; block_version: string; } | undefined  @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.18_typescript@5.5.0-dev.20240321/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

You can check the log here.

@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v18.15.0, x64)
Memory used 295,476k (± 0.01%) 295,465k (± 0.01%) ~ 295,442k 295,499k p=0.470 n=6
Parse Time 3.19s (± 0.62%) 3.21s (± 0.64%) ~ 3.18s 3.24s p=0.413 n=6
Bind Time 1.00s (± 0.52%) 1.00s (± 0.98%) ~ 0.99s 1.01s p=0.931 n=6
Check Time 9.60s (± 0.23%) 9.64s (± 0.39%) ~ 9.57s 9.68s p=0.091 n=6
Emit Time 8.43s (± 0.77%) 8.42s (± 0.34%) ~ 8.38s 8.46s p=0.628 n=6
Total Time 22.22s (± 0.23%) 22.26s (± 0.30%) ~ 22.19s 22.36s p=0.147 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 193,717k (± 0.95%) 193,226k (± 0.99%) ~ 191,858k 195,692k p=0.936 n=6
Parse Time 1.64s (± 0.99%) 1.64s (± 0.90%) ~ 1.62s 1.66s p=0.870 n=6
Bind Time 0.87s (± 1.84%) 0.86s (± 0.95%) ~ 0.85s 0.87s p=0.065 n=6
Check Time 11.22s (± 0.59%) 11.29s (± 0.71%) ~ 11.17s 11.40s p=0.126 n=6
Emit Time 3.14s (± 0.66%) 3.13s (± 0.48%) ~ 3.11s 3.15s p=0.683 n=6
Total Time 16.88s (± 0.41%) 16.93s (± 0.52%) ~ 16.79s 17.03s p=0.297 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,408k (± 0.01%) 347,371k (± 0.01%) ~ 347,337k 347,408k p=0.054 n=6
Parse Time 3.00s (± 1.10%) 3.01s (± 0.70%) ~ 2.97s 3.03s p=0.629 n=6
Bind Time 1.11s (± 0.37%) 1.11s (± 0.46%) ~ 1.11s 1.12s p=0.595 n=6
Check Time 8.29s (± 0.35%) 8.27s (± 0.49%) ~ 8.22s 8.34s p=0.253 n=6
Emit Time 4.85s (± 0.55%) 4.85s (± 0.24%) ~ 4.83s 4.86s p=0.935 n=6
Total Time 17.25s (± 0.30%) 17.24s (± 0.22%) ~ 17.20s 17.29s p=0.872 n=6
TFS - node (v18.15.0, x64)
Memory used 302,709k (± 0.01%) 302,705k (± 0.01%) ~ 302,669k 302,755k p=0.936 n=6
Parse Time 2.41s (± 0.85%) 2.40s (± 1.04%) ~ 2.36s 2.43s p=0.685 n=6
Bind Time 1.20s (± 0.34%) 1.18s (± 0.71%) -0.01s (- 1.11%) 1.18s 1.20s p=0.018 n=6
Check Time 7.48s (± 0.41%) 7.47s (± 0.19%) ~ 7.45s 7.49s p=1.000 n=6
Emit Time 4.27s (± 0.79%) 4.29s (± 0.45%) ~ 4.26s 4.32s p=0.294 n=6
Total Time 15.35s (± 0.37%) 15.34s (± 0.33%) ~ 15.25s 15.40s p=1.000 n=6
material-ui - node (v18.15.0, x64)
Memory used 509,901k (± 0.00%) 509,890k (± 0.00%) ~ 509,869k 509,909k p=0.520 n=6
Parse Time 3.19s (± 0.47%) 3.19s (± 0.73%) ~ 3.16s 3.22s p=0.870 n=6
Bind Time 1.17s (± 0.71%) 1.18s (± 0.76%) ~ 1.17s 1.19s p=0.339 n=6
Check Time 20.48s (± 0.29%) 20.49s (± 0.31%) ~ 20.42s 20.60s p=0.871 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 24.84s (± 0.24%) 24.86s (± 0.34%) ~ 24.78s 25.00s p=0.627 n=6
mui-docs - node (v18.15.0, x64)
Memory used 1,737,530k (± 0.00%) 1,737,551k (± 0.00%) ~ 1,737,508k 1,737,587k p=0.261 n=6
Parse Time 7.78s (± 0.27%) 7.78s (± 0.45%) ~ 7.74s 7.84s p=0.629 n=6
Bind Time 2.80s (± 1.20%) 2.80s (± 0.35%) ~ 2.78s 2.81s p=0.493 n=6
Check Time 66.53s (± 0.19%) 66.63s (± 0.38%) ~ 66.36s 66.96s p=0.575 n=6
Emit Time 0.16s (± 3.29%) 0.16s (± 3.29%) ~ 0.15s 0.16s p=1.000 n=6
Total Time 77.27s (± 0.17%) 77.37s (± 0.33%) ~ 77.10s 77.75s p=0.689 n=6
self-build-src - node (v18.15.0, x64)
Memory used 2,394,391k (± 0.04%) 2,393,599k (± 0.05%) ~ 2,392,471k 2,395,076k p=0.230 n=6
Parse Time 6.07s (± 0.95%) 6.04s (± 0.37%) ~ 6.00s 6.06s p=0.064 n=6
Bind Time 2.24s (± 1.23%) 2.26s (± 0.97%) ~ 2.23s 2.29s p=0.195 n=6
Check Time 39.48s (± 0.46%) 39.47s (± 0.40%) ~ 39.25s 39.62s p=0.873 n=6
Emit Time 3.10s (± 1.40%) 3.11s (± 1.06%) ~ 3.07s 3.16s p=0.571 n=6
Total Time 50.90s (± 0.36%) 50.89s (± 0.31%) ~ 50.68s 51.07s p=0.810 n=6
self-compiler - node (v18.15.0, x64)
Memory used 415,211k (± 0.00%) 415,181k (± 0.01%) ~ 415,129k 415,219k p=0.199 n=6
Parse Time 3.42s (± 0.49%) 3.43s (± 0.84%) ~ 3.40s 3.48s p=1.000 n=6
Bind Time 1.29s (± 0.80%) 1.29s (± 0.40%) ~ 1.28s 1.29s p=0.928 n=6
Check Time 18.09s (± 0.49%) 17.98s (± 0.36%) ~ 17.89s 18.05s p=0.065 n=6
Emit Time 1.34s (± 1.15%) 1.32s (± 1.23%) ~ 1.30s 1.34s p=0.145 n=6
Total Time 24.13s (± 0.41%) 24.02s (± 0.28%) ~ 23.93s 24.09s p=0.065 n=6
vscode - node (v18.15.0, x64)
Memory used 2,889,693k (± 0.00%) 2,889,664k (± 0.00%) ~ 2,889,521k 2,889,737k p=0.471 n=6
Parse Time 10.81s (± 0.06%) 10.84s (± 0.34%) ~ 10.78s 10.88s p=0.157 n=6
Bind Time 3.45s (± 0.40%) 3.43s (± 0.24%) ~ 3.42s 3.44s p=0.183 n=6
Check Time 61.46s (± 0.30%) 61.39s (± 0.21%) ~ 61.21s 61.52s p=0.686 n=6
Emit Time 16.38s (± 0.51%) 16.40s (± 0.64%) ~ 16.26s 16.53s p=0.748 n=6
Total Time 92.09s (± 0.25%) 92.06s (± 0.24%) ~ 91.69s 92.24s p=0.810 n=6
webpack - node (v18.15.0, x64)
Memory used 408,093k (± 0.01%) 408,097k (± 0.01%) ~ 408,035k 408,166k p=1.000 n=6
Parse Time 3.90s (± 0.53%) 3.90s (± 0.39%) ~ 3.88s 3.92s p=0.511 n=6
Bind Time 1.66s (± 1.17%) 1.68s (± 0.58%) +0.02s (+ 1.41%) 1.67s 1.69s p=0.048 n=6
Check Time 16.72s (± 0.45%) 16.73s (± 0.27%) ~ 16.67s 16.79s p=1.000 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.28s (± 0.32%) 22.32s (± 0.23%) ~ 22.26s 22.39s p=0.375 n=6
xstate - node (v18.15.0, x64)
Memory used 513,102k (± 0.02%) 513,044k (± 0.02%) ~ 512,916k 513,178k p=0.423 n=6
Parse Time 3.94s (± 0.94%) 3.96s (± 0.46%) ~ 3.93s 3.98s p=0.170 n=6
Bind Time 1.85s (± 0.99%) 1.85s (± 0.72%) ~ 1.83s 1.86s p=1.000 n=6
Check Time 3.38s (± 0.37%) 3.37s (± 0.36%) ~ 3.36s 3.39s p=0.565 n=6
Emit Time 0.09s (± 6.44%) 0.09s (± 5.95%) ~ 0.08s 0.09s p=0.640 n=6
Total Time 9.26s (± 0.47%) 9.27s (± 0.25%) ~ 9.23s 9.30s p=0.199 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,881ms (± 0.19%) 2,877ms (± 0.41%) ~ 2,857ms 2,893ms p=0.575 n=6
Req 2 - geterr 6,723ms (± 0.54%) 6,703ms (± 0.47%) ~ 6,666ms 6,742ms p=0.230 n=6
Req 3 - references 401ms (± 9.16%) 391ms (± 1.56%) ~ 384ms 397ms p=0.378 n=6
Req 4 - navto 347ms (± 8.58%) 335ms (± 0.19%) ~ 334ms 336ms p=0.654 n=6
Req 5 - completionInfo count 1,357 (± 0.00%) 1,357 (± 0.00%) ~ 1,357 1,357 p=1.000 n=6
Req 5 - completionInfo 107ms (±10.75%) 102ms (± 4.26%) ~ 96ms 105ms p=0.332 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,501ms (± 1.09%) 2,504ms (± 1.34%) ~ 2,457ms 2,562ms p=0.936 n=6
Req 2 - geterr 4,105ms (± 0.25%) 4,111ms (± 0.18%) ~ 4,102ms 4,122ms p=0.225 n=6
Req 3 - references 333ms (± 0.41%) 334ms (± 0.70%) ~ 333ms 339ms p=0.800 n=6
Req 4 - navto 294ms (± 0.14%) 299ms (± 3.48%) ~ 294ms 320ms p=0.214 n=6
Req 5 - completionInfo count 1,519 (± 0.00%) 1,519 (± 0.00%) ~ 1,519 1,519 p=1.000 n=6
Req 5 - completionInfo 74ms (± 0.70%) 74ms (± 0.55%) ~ 73ms 74ms p=0.595 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,606ms (± 0.75%) 2,611ms (± 0.47%) ~ 2,587ms 2,621ms p=0.521 n=6
Req 2 - geterr 1,708ms (± 2.46%) 1,741ms (± 1.39%) ~ 1,701ms 1,774ms p=0.149 n=6
Req 3 - references 115ms (±10.83%) 117ms (± 9.60%) ~ 102ms 125ms p=0.515 n=6
Req 4 - navto 368ms (± 1.35%) 372ms (± 2.63%) ~ 361ms 390ms p=0.468 n=6
Req 5 - completionInfo count 2,079 (± 0.00%) 2,079 (± 0.00%) ~ 2,079 2,079 p=1.000 n=6
Req 5 - completionInfo 307ms (± 1.48%) 310ms (± 1.59%) ~ 303ms 316ms p=0.375 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstateTSServer - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v18.15.0, x64)
Execution time 152.32ms (± 0.17%) 152.29ms (± 0.21%) -0.04ms (- 0.03%) 151.19ms 156.32ms p=0.003 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 226.10ms (± 0.18%) 226.08ms (± 0.20%) ~ 224.62ms 238.69ms p=0.178 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 221.52ms (± 0.16%) 221.48ms (± 0.15%) ~ 219.99ms 225.89ms p=0.296 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 220.80ms (± 0.16%) 220.78ms (± 0.14%) ~ 219.32ms 222.88ms p=0.703 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@jakebailey
Copy link
Member Author

Actually not that bad

@weswigham
Copy link
Member

Only 9 breaks on DT? Really not that bad.

@@ -23,7 +23,7 @@ function f() {

function f() {
let a = 1;
let x: (/*A*/ "a" /*B*/ | /*C*/ 'b' /*D*/) | undefined;
let x: /*A*/ /*A*/ "a" /*B*/ | /*C*/ 'b' /*D*/ | undefined;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This extra /*A*/ is curious

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably we added logic to copy the leading comment range from the union itself onto the inner "a" when we added the (), but with the () no longer being added, we also no longer need to copy the comment range from the union node to the "a", since the union node isn't getting remade.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any guesses as to where that logic might be?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on how extractSymbol works, probably some of the comment suppression/copying logic for getSynthesizedDeepClone or getTypeDeepCloneUnionUndefined.

@jakebailey jakebailey closed this Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants