Skip to content

Conversation

@RyanCavanaugh
Copy link
Member

Candidate fix for #59180

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

@typescript-bot test it
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 15, 2024

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

Command Status Results
test top400 ✅ Started 👀 Results
user test this ✅ Started ✅ Results
run dt ✅ Started 👀 Results
perf test this faster ✅ Started 👀 Results
pack this ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 15, 2024

Hey @RyanCavanaugh, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/162748/artifacts?artifactName=tgz&fileId=D951FD8CE6429B6195027CC74D670D17C1AF05E0507ECC326C32D13DEB48906502&fileName=/typescript-5.6.0-insiders.20240715.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.6.0-pr-59287-2".;

@typescript-bot
Copy link
Collaborator

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

There were interesting changes:

Branch only errors:

Package: json-merge-patch
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/json-merge-patch/json-merge-patch-tests.ts
  14:5  error  TypeScript@local expected type to be:
  { a: string; b?: undefined; } | { b: string; a?: undefined; }
got:
  { a: string; b?: never; } | { b: string; a?: never; }                                                              @definitelytyped/expect
  26:5  error  TypeScript@local expected type to be:
  { a: string; b: string; } | { a: string; b?: undefined; }
got:
  { a: string; b: string; } | { a: string; b?: never; }                                                                  @definitelytyped/expect
  32:5  error  TypeScript@local expected type to be:
  { a: any; b?: undefined; } | { b: string; a?: undefined; }
got:
  { a: any; b?: never; } | { b: string; a?: never; }                                                                    @definitelytyped/expect
  62:5  error  TypeScript@local expected type to be:
  { a: { b: { c: string; }; }; d: string; } | { a: { b: string; }; d?: undefined; }
got:
  { a: { b: { c: string; }; }; d: string; } | { a: { b: string; }; d?: never; }                  @definitelytyped/expect
  68:5  error  TypeScript@local expected type to be:
  { a: { b: { c: string; }; d: string; }; } | { a: { b: { c: string; }; d?: undefined; }; }
got:
  { a: { b: { c: string; }; d: string; }; } | { a: { b: { c: string; }; d?: never; }; }  @definitelytyped/expect

✖ 5 problems (5 errors, 0 warnings)

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

Package: plotly.js
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/plotly.js/test/index-tests.ts
  63:20  error  TypeScript@local compile error: 
Conversion of type '{ mode: "markers"; x: (string | number)[]; y: (string | number)[]; text: (string | number)[]; marker: { size: (string | number)[]; sizemode: "area"; sizeref: number; pattern: { shape: "/"; }; }; type: "scatter"; transforms: ({ ...; } | ... 1 more ... | { ...; })[]; width: number; }' to type 'PlotData' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Type '{ mode: "markers"; x: (string | number)[]; y: (string | number)[]; text: (string | number)[]; marker: { size: (string | number)[]; sizemode: "area"; sizeref: number; pattern: { shape: "/"; }; }; type: "scatter"; transforms: ({ ...; } | ... 1 more ... | { ...; })[]; width: number; }' is missing the following properties from type 'PlotData': z, i, j, k, and 110 more  @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

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

You can check the log here.

@typescript-bot
Copy link
Collaborator

@RyanCavanaugh
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
Compiler-Unions - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,242 ~ ~ ~ p=1.000 n=6
Memory used 193,403k (± 0.98%) 192,916k (± 0.74%) ~ 192,133k 195,789k p=1.000 n=6
Parse Time 1.30s (± 0.63%) 1.30s (± 0.69%) ~ 1.29s 1.31s p=0.550 n=6
Bind Time 0.71s 0.71s ~ ~ ~ p=1.000 n=6
Check Time 9.47s (± 0.32%) 9.45s (± 0.27%) ~ 9.41s 9.49s p=0.145 n=6
Emit Time 2.74s (± 0.36%) 2.74s (± 0.67%) ~ 2.72s 2.76s p=0.935 n=6
Total Time 14.22s (± 0.23%) 14.20s (± 0.21%) ~ 14.16s 14.23s p=0.123 n=6
angular-1 - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 944,120 944,120 ~ ~ ~ p=1.000 n=6
Types 407,047 407,047 ~ ~ ~ p=1.000 n=6
Memory used 1,218,405k (± 0.01%) 1,218,351k (± 0.01%) ~ 1,218,256k 1,218,454k p=0.173 n=6
Parse Time 6.71s (± 0.29%) 6.71s (± 0.42%) ~ 6.68s 6.76s p=0.745 n=6
Bind Time 1.86s (± 0.40%) 1.87s (± 0.44%) ~ 1.85s 1.87s p=0.082 n=6
Check Time 30.63s (± 0.25%) 30.61s (± 0.49%) ~ 30.44s 30.87s p=0.688 n=6
Emit Time 13.60s (± 0.25%) 13.57s (± 0.87%) ~ 13.34s 13.66s p=0.871 n=6
Total Time 52.80s (± 0.18%) 52.76s (± 0.35%) ~ 52.50s 53.07s p=0.470 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,249,830 2,249,745 -85 (- 0.00%) ~ ~ p=0.001 n=6
Types 937,437 937,372 -65 (- 0.01%) ~ ~ p=0.001 n=6
Memory used 2,165,019k (± 0.00%) 2,165,113k (± 0.00%) +94k (+ 0.00%) 2,165,016k 2,165,157k p=0.030 n=6
Parse Time 7.84s (± 0.22%) 7.84s (± 0.32%) ~ 7.81s 7.87s p=0.505 n=6
Bind Time 2.76s (± 0.62%) 2.76s (± 0.54%) ~ 2.74s 2.78s p=0.682 n=6
Check Time 84.82s (± 0.44%) 84.63s (± 0.45%) ~ 84.15s 85.25s p=0.378 n=6
Emit Time 0.17s (± 3.32%) 0.17s (± 4.47%) ~ 0.16s 0.18s p=0.476 n=6
Total Time 95.59s (± 0.38%) 95.40s (± 0.41%) ~ 94.90s 96.05s p=0.298 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,063 1,226,062 -1 (- 0.00%) ~ ~ p=0.001 n=6
Types 261,603 261,602 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,338,719k (± 0.01%) 2,338,565k (± 0.02%) ~ 2,338,103k 2,339,196k p=0.378 n=6
Parse Time 5.10s (± 0.81%) 5.07s (± 0.84%) ~ 5.02s 5.13s p=0.297 n=6
Bind Time 1.90s (± 0.52%) 1.90s (± 1.04%) ~ 1.88s 1.92s p=0.624 n=6
Check Time 34.05s (± 0.43%) 34.03s (± 0.26%) ~ 33.95s 34.18s p=0.810 n=6
Emit Time 3.23s (± 0.71%) 3.27s (± 2.18%) ~ 3.19s 3.40s p=0.261 n=6
Total Time 44.30s (± 0.41%) 44.28s (± 0.21%) ~ 44.16s 44.43s p=0.688 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,063 1,226,062 -1 (- 0.00%) ~ ~ p=0.001 n=6
Types 261,603 261,602 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,413,369k (± 0.01%) 2,413,086k (± 0.02%) ~ 2,412,514k 2,413,682k p=0.471 n=6
Parse Time 6.29s (± 0.51%) 6.34s (± 0.60%) +0.05s (+ 0.82%) 6.30s 6.39s p=0.045 n=6
Bind Time 2.03s (± 1.72%) 2.02s (± 1.20%) ~ 2.00s 2.06s p=0.809 n=6
Check Time 40.58s (± 0.23%) 40.49s (± 0.24%) ~ 40.35s 40.65s p=0.173 n=6
Emit Time 3.92s (± 0.53%) 3.89s (± 1.63%) ~ 3.82s 4.01s p=0.128 n=6
Total Time 52.80s (± 0.12%) 52.72s (± 0.22%) ~ 52.51s 52.84s p=0.230 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 258,307 258,307 ~ ~ ~ p=1.000 n=6
Types 104,794 104,794 ~ ~ ~ p=1.000 n=6
Memory used 427,161k (± 0.04%) 427,115k (± 0.01%) ~ 427,056k 427,170k p=0.810 n=6
Parse Time 4.11s (± 0.13%) 4.11s (± 0.73%) ~ 4.08s 4.15s p=0.934 n=6
Bind Time 1.63s (± 0.90%) 1.62s (± 0.99%) ~ 1.59s 1.63s p=0.802 n=6
Check Time 22.06s (± 0.39%) 22.04s (± 0.16%) ~ 21.99s 22.09s p=0.936 n=6
Emit Time 2.01s (± 1.24%) 2.02s (± 1.15%) ~ 1.99s 2.06s p=0.373 n=6
Total Time 29.80s (± 0.29%) 29.80s (± 0.12%) ~ 29.75s 29.85s p=0.747 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 35 35 ~ ~ ~ p=1.000 n=6
Symbols 224,565 224,565 ~ ~ ~ p=1.000 n=6
Types 93,734 93,734 ~ ~ ~ p=1.000 n=6
Memory used 369,568k (± 0.04%) 369,635k (± 0.03%) ~ 369,436k 369,801k p=0.298 n=6
Parse Time 3.43s (± 1.52%) 3.43s (± 0.72%) ~ 3.39s 3.46s p=1.000 n=6
Bind Time 1.94s (± 0.39%) 1.94s (± 0.39%) ~ 1.93s 1.95s p=1.000 n=6
Check Time 19.16s (± 0.26%) 19.09s (± 0.39%) ~ 18.96s 19.15s p=0.106 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.52s (± 0.36%) 24.46s (± 0.28%) ~ 24.35s 24.55s p=0.228 n=6
vscode - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,891,299 2,891,230 -69 (- 0.00%) ~ ~ p=0.001 n=6
Types 978,316 978,270 -46 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 3,055,158k (± 0.00%) 3,055,140k (± 0.00%) ~ 3,055,105k 3,055,236k p=0.810 n=6
Parse Time 13.66s (± 0.36%) 13.65s (± 0.35%) ~ 13.59s 13.71s p=0.747 n=6
Bind Time 4.18s (± 0.39%) 4.18s (± 0.25%) ~ 4.16s 4.19s p=0.802 n=6
Check Time 73.36s (± 0.68%) 73.12s (± 0.28%) ~ 72.88s 73.38s p=0.748 n=6
Emit Time 23.61s (± 0.81%) 23.60s (± 0.39%) ~ 23.43s 23.68s p=0.521 n=6
Total Time 114.81s (± 0.31%) 114.55s (± 0.27%) ~ 114.24s 114.92s p=0.229 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 267,280 267,280 ~ ~ ~ p=1.000 n=6
Types 108,834 108,834 ~ ~ ~ p=1.000 n=6
Memory used 411,845k (± 0.03%) 411,796k (± 0.03%) ~ 411,722k 411,992k p=0.378 n=6
Parse Time 4.77s (± 0.31%) 4.74s (± 0.39%) -0.03s (- 0.59%) 4.72s 4.77s p=0.032 n=6
Bind Time 2.09s (± 0.49%) 2.09s (± 0.63%) ~ 2.08s 2.11s p=0.929 n=6
Check Time 20.80s (± 0.82%) 20.68s (± 0.41%) ~ 20.57s 20.80s p=0.128 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 27.66s (± 0.64%) 27.52s (± 0.27%) ~ 27.41s 27.60s p=0.066 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 510,479 510,479 ~ ~ ~ p=1.000 n=6
Types 161,598 161,597 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 448,148k (± 0.04%) 448,161k (± 0.07%) ~ 447,609k 448,559k p=0.575 n=6
Parse Time 3.90s (± 0.52%) 3.90s (± 0.56%) ~ 3.87s 3.93s p=0.568 n=6
Bind Time 1.46s (± 0.80%) 1.45s (± 0.52%) ~ 1.44s 1.46s p=0.383 n=6
Check Time 21.10s (± 0.37%) 21.14s (± 0.47%) ~ 20.98s 21.27s p=0.423 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 26.46s (± 0.34%) 26.48s (± 0.38%) ~ 26.31s 26.59s p=0.377 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@RyanCavanaugh Here are the results of running the user tests with tsc comparing main and refs/pull/59287/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

@RyanCavanaugh Here are the results of running the top 400 repos with tsc comparing main and refs/pull/59287/merge:

Something interesting changed - please have a look.

Details

ag-grid/ag-grid

31 of 110 projects failed to build with the old tsc and were ignored

enterprise-modules/viewport-row-model/tsconfig.watch.json

enterprise-modules/viewport-row-model/tsconfig.types.watch.json

enterprise-modules/status-bar/tsconfig.watch.json

enterprise-modules/status-bar/tsconfig.types.watch.json

enterprise-modules/sparklines/tsconfig.watch.json

enterprise-modules/sparklines/tsconfig.types.watch.json

enterprise-modules/side-bar/tsconfig.watch.json

enterprise-modules/side-bar/tsconfig.types.watch.json

enterprise-modules/set-filter/tsconfig.watch.json

enterprise-modules/set-filter/tsconfig.types.watch.json

enterprise-modules/server-side-row-model/tsconfig.watch.json

enterprise-modules/server-side-row-model/tsconfig.types.watch.json

enterprise-modules/row-grouping/tsconfig.watch.json

enterprise-modules/row-grouping/tsconfig.types.watch.json

enterprise-modules/rich-select/tsconfig.watch.json

enterprise-modules/rich-select/tsconfig.types.watch.json

enterprise-modules/range-selection/tsconfig.watch.json

enterprise-modules/range-selection/tsconfig.types.watch.json

enterprise-modules/multi-filter/tsconfig.watch.json

enterprise-modules/multi-filter/tsconfig.types.watch.json

enterprise-modules/master-detail/tsconfig.watch.json

enterprise-modules/master-detail/tsconfig.types.watch.json

enterprise-modules/filter-tool-panel/tsconfig.watch.json

enterprise-modules/filter-tool-panel/tsconfig.types.watch.json

enterprise-modules/core/tsconfig.watch.json

enterprise-modules/core/tsconfig.types.watch.json

enterprise-modules/advanced-filter/tsconfig.watch.json

enterprise-modules/advanced-filter/tsconfig.types.watch.json

heyxyz/hey

1 of 14 projects failed to build with the old tsc and were ignored

apps/web/tsconfig.json

jhipster/generator-jhipster

tsconfig.types.json

tsconfig.spec.json

tsconfig.json

labring/FastGPT

1 of 8 projects failed to build with the old tsc and were ignored

projects/app/tsconfig.json

@RyanCavanaugh
Copy link
Member Author

FastGPT break is likely indicative of the others, where in this example

const obj = Math.random() > 0.5 ? { b: "hello" } : { a: "ok", b: 42 };
if (obj.a) {
  let n: number = obj.b;
}

we no longer consider a: "ok" | a?: never to be a discriminant on obj

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

2 participants