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

Properly propagate ObjectFlags.NonInferrableType, clean up non-inferrable code paths #49887

Merged
merged 13 commits into from
Jul 15, 2022

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Jul 13, 2022

Fixes #43962

The original bug required two changes to fix:

  • The NonInferrableType flag needs to be propagated from aliasTypeArguments to the type they're used in, but this was missed in at least one place.
  • Inference returns silentNeverType as its marker type to say "don't infer from this", but it only checked for source === silentNeverType, which doesn't work when you use that type in another type. So this needs to be NonInferrableType too.

The rest of the changes are cleanups and documentation improvements.

  • It turns out that nonInferrableType is redundant with silentNeverType, and there are other types like anyFunctionType, autoType, and autoArrayType which are also used as marker types for this same purpose. They all can just use the flag without any changes in behavior.
  • nonInferrableAnyType looks like it should be NonInferrableType, but making it have that flag breaks things. It turns out that if you just use anyType, nothing breaks.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Jul 13, 2022
@jakebailey

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

src/compiler/checker.ts Outdated Show resolved Hide resolved
@@ -17196,6 +17191,7 @@ namespace ts {
result.mapper = mapper;
result.aliasSymbol = aliasSymbol || type.aliasSymbol;
result.aliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper);
result.objectFlags |= result.aliasTypeArguments ? getPropagatingFlagsOfTypes(result.aliasTypeArguments, /*excludeKinds*/ 0) : 0;
Copy link
Member

Choose a reason for hiding this comment

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

Huh, this is interesting because this is redundant for TypeReference anonymous types (since those internally collect propagating flags from their type arguments), but required for any other anonymous object type with an alias. Go figure. I wonder if we should be propagating these object flags through conditional types, too... We already preserve them through intersections and unions. (We probably should be, since conditionals are "smart unions"...)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I think they should. Right now I'm trying to go by hand to every createAnonymousType, createObjectType,... etc and see if there's anything missed, and it's a bit daunting because there's like 100 of them to verify, and nothing I've changed so far as actually changed any test.

I want to have something I can run while I'm debugging that'll observe each type during inference and walk down to see if there was a NonInferrableType flag that was missed, but I get stuck in stack overflows, so I don't quite know how I can do my sanity check.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think for this PR, I'm inclined to not try and go everywhere and add some more flag propagation without a way for me to check these; I just don't trust that I'm getting it right, and I don't have any way to observe the result.

This PR at least improves the one case I can test, and has a good amount of cleanup, so I'm happy with it (but I'll rerun the testing since I changed the structure of this quite a bit).

@jakebailey jakebailey marked this pull request as ready for review July 13, 2022 21:28
@jakebailey
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 13, 2022

Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at dd6bdaf. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 13, 2022

Heya @jakebailey, I've started to run the extended test suite on this PR at dd6bdaf. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 13, 2022

Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at dd6bdaf. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 13, 2022

Heya @jakebailey, I've started to run the perf test suite on this PR at dd6bdaf. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

Heya @jakebailey, I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here.

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

Assuming rwc and DT are good, this seems like a good consolidation.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - main..refs/pull/49887/merge

fp-ts

2 of 4 projects failed to build with the old tsc

dtslint/ts3.5/tsconfig.json

@jakebailey
Copy link
Member Author

Hm, those fp-ts things seem relevant. I was hoping those would go away, but I guess not.

@jakebailey
Copy link
Member Author

Yeah, the actual fix in this PR breaks fp-ts's Either type, which looks a lot like one of the other types I saw break when I was working on propagating flags. I'll port a test.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - main..49887
Metric main 49887 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 359,686k (± 0.02%) 359,625k (± 0.01%) -61k (- 0.02%) 359,515k 359,745k
Parse Time 2.09s (± 0.35%) 2.08s (± 0.42%) -0.00s (- 0.24%) 2.06s 2.10s
Bind Time 0.90s (± 0.98%) 0.90s (± 1.12%) -0.01s (- 0.78%) 0.88s 0.93s
Check Time 5.99s (± 0.34%) 6.01s (± 0.40%) +0.01s (+ 0.25%) 5.95s 6.07s
Emit Time 6.11s (± 0.75%) 6.11s (± 0.30%) +0.00s (+ 0.07%) 6.08s 6.17s
Total Time 15.09s (± 0.36%) 15.10s (± 0.18%) +0.01s (+ 0.07%) 15.06s 15.19s
Compiler-Unions - node (v10.16.3, x64)
Memory used 206,703k (± 0.03%) 206,670k (± 0.04%) -34k (- 0.02%) 206,501k 206,933k
Parse Time 0.83s (± 0.69%) 0.83s (± 0.48%) +0.00s (+ 0.12%) 0.82s 0.84s
Bind Time 0.53s (± 1.76%) 0.52s (± 2.11%) -0.01s (- 0.95%) 0.51s 0.55s
Check Time 7.09s (± 0.32%) 7.13s (± 0.48%) +0.04s (+ 0.54%) 7.06s 7.22s
Emit Time 2.50s (± 1.25%) 2.50s (± 0.70%) -0.00s (- 0.16%) 2.47s 2.56s
Total Time 10.95s (± 0.36%) 10.98s (± 0.35%) +0.03s (+ 0.26%) 10.90s 11.09s
Monaco - node (v10.16.3, x64)
Memory used 343,991k (± 0.02%) 343,968k (± 0.02%) -22k (- 0.01%) 343,710k 344,077k
Parse Time 1.60s (± 0.37%) 1.60s (± 0.78%) +0.00s (+ 0.25%) 1.57s 1.63s
Bind Time 0.77s (± 0.68%) 0.78s (± 2.10%) +0.01s (+ 1.04%) 0.76s 0.84s
Check Time 5.95s (± 0.47%) 5.98s (± 0.53%) +0.03s (+ 0.52%) 5.88s 6.03s
Emit Time 3.24s (± 0.40%) 3.27s (± 0.77%) +0.02s (+ 0.77%) 3.22s 3.33s
Total Time 11.56s (± 0.21%) 11.63s (± 0.51%) +0.07s (+ 0.61%) 11.53s 11.76s
TFS - node (v10.16.3, x64)
Memory used 305,162k (± 0.02%) 305,156k (± 0.02%) -6k (- 0.00%) 305,082k 305,253k
Parse Time 1.27s (± 0.59%) 1.28s (± 0.58%) +0.01s (+ 0.47%) 1.27s 1.30s
Bind Time 0.72s (± 0.51%) 0.73s (± 0.61%) +0.00s (+ 0.41%) 0.72s 0.74s
Check Time 5.40s (± 0.43%) 5.42s (± 0.62%) +0.03s (+ 0.50%) 5.34s 5.49s
Emit Time 3.42s (± 1.08%) 3.41s (± 0.89%) -0.01s (- 0.41%) 3.34s 3.47s
Total Time 10.82s (± 0.45%) 10.84s (± 0.43%) +0.02s (+ 0.23%) 10.72s 10.93s
material-ui - node (v10.16.3, x64)
Memory used 469,401k (± 0.01%) 469,401k (± 0.01%) +0k (+ 0.00%) 469,271k 469,566k
Parse Time 1.82s (± 0.69%) 1.83s (± 0.75%) +0.01s (+ 0.44%) 1.81s 1.86s
Bind Time 0.69s (± 2.28%) 0.68s (± 1.44%) -0.01s (- 1.02%) 0.66s 0.70s
Check Time 14.51s (± 0.56%) 14.58s (± 0.83%) +0.08s (+ 0.52%) 14.38s 14.81s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 17.02s (± 0.51%) 17.10s (± 0.73%) +0.08s (+ 0.45%) 16.90s 17.33s
xstate - node (v10.16.3, x64)
Memory used 581,242k (± 1.26%) 581,307k (± 1.26%) +65k (+ 0.01%) 577,874k 610,906k
Parse Time 2.59s (± 0.26%) 2.59s (± 0.35%) -0.00s (- 0.15%) 2.57s 2.61s
Bind Time 1.03s (± 1.34%) 1.03s (± 0.68%) +0.00s (+ 0.19%) 1.02s 1.05s
Check Time 1.56s (± 0.49%) 1.56s (± 0.44%) 0.00s ( 0.00%) 1.54s 1.57s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.24s (± 0.39%) 5.24s (± 0.29%) +0.00s (+ 0.08%) 5.22s 5.28s
Angular - node (v12.1.0, x64)
Memory used 337,292k (± 0.02%) 337,143k (± 0.09%) -149k (- 0.04%) 335,952k 337,406k
Parse Time 2.09s (± 0.40%) 2.10s (± 0.69%) +0.01s (+ 0.57%) 2.08s 2.15s
Bind Time 0.86s (± 0.46%) 0.86s (± 0.52%) +0.00s (+ 0.12%) 0.85s 0.87s
Check Time 5.81s (± 0.59%) 5.83s (± 0.53%) +0.02s (+ 0.36%) 5.76s 5.90s
Emit Time 6.35s (± 0.78%) 6.37s (± 0.54%) +0.02s (+ 0.30%) 6.30s 6.44s
Total Time 15.11s (± 0.48%) 15.16s (± 0.43%) +0.05s (+ 0.30%) 15.05s 15.31s
Compiler-Unions - node (v12.1.0, x64)
Memory used 194,308k (± 0.09%) 194,353k (± 0.04%) +45k (+ 0.02%) 194,228k 194,517k
Parse Time 0.82s (± 0.83%) 0.83s (± 0.82%) +0.00s (+ 0.12%) 0.81s 0.84s
Bind Time 0.55s (± 1.33%) 0.55s (± 1.06%) -0.00s (- 0.18%) 0.54s 0.56s
Check Time 6.67s (± 0.48%) 6.70s (± 0.43%) +0.03s (+ 0.37%) 6.64s 6.78s
Emit Time 2.54s (± 1.47%) 2.54s (± 0.68%) +0.01s (+ 0.24%) 2.50s 2.59s
Total Time 10.58s (± 0.60%) 10.61s (± 0.43%) +0.03s (+ 0.32%) 10.53s 10.76s
Monaco - node (v12.1.0, x64)
Memory used 326,957k (± 0.02%) 326,991k (± 0.02%) +34k (+ 0.01%) 326,889k 327,090k
Parse Time 1.57s (± 0.33%) 1.57s (± 0.57%) +0.00s (+ 0.19%) 1.55s 1.59s
Bind Time 0.76s (± 0.76%) 0.76s (± 0.59%) -0.00s (- 0.26%) 0.75s 0.77s
Check Time 5.80s (± 0.72%) 5.80s (± 0.68%) +0.00s (+ 0.05%) 5.74s 5.92s
Emit Time 3.30s (± 0.84%) 3.30s (± 0.71%) -0.00s (- 0.15%) 3.26s 3.36s
Total Time 11.43s (± 0.54%) 11.43s (± 0.41%) +0.00s (+ 0.00%) 11.32s 11.59s
TFS - node (v12.1.0, x64)
Memory used 289,814k (± 0.02%) 289,687k (± 0.05%) -127k (- 0.04%) 289,141k 289,849k
Parse Time 1.29s (± 0.90%) 1.30s (± 0.63%) +0.01s (+ 0.69%) 1.29s 1.33s
Bind Time 0.72s (± 0.82%) 0.73s (± 1.04%) +0.00s (+ 0.28%) 0.71s 0.74s
Check Time 5.35s (± 0.57%) 5.36s (± 0.41%) +0.01s (+ 0.17%) 5.32s 5.41s
Emit Time 3.55s (± 1.07%) 3.53s (± 0.87%) -0.02s (- 0.68%) 3.45s 3.58s
Total Time 10.93s (± 0.42%) 10.92s (± 0.44%) -0.00s (- 0.03%) 10.82s 11.03s
material-ui - node (v12.1.0, x64)
Memory used 448,440k (± 0.07%) 448,249k (± 0.08%) -191k (- 0.04%) 447,267k 448,611k
Parse Time 1.83s (± 0.41%) 1.82s (± 0.57%) -0.00s (- 0.22%) 1.81s 1.85s
Bind Time 0.68s (± 0.95%) 0.68s (± 0.50%) +0.00s (+ 0.74%) 0.68s 0.69s
Check Time 12.99s (± 0.43%) 13.09s (± 0.77%) +0.09s (+ 0.72%) 12.94s 13.30s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.50s (± 0.35%) 15.59s (± 0.64%) +0.09s (+ 0.61%) 15.45s 15.79s
xstate - node (v12.1.0, x64)
Memory used 543,455k (± 0.01%) 543,421k (± 0.02%) -34k (- 0.01%) 543,192k 543,618k
Parse Time 2.56s (± 0.30%) 2.56s (± 0.37%) 0.00s ( 0.00%) 2.53s 2.57s
Bind Time 1.03s (± 1.37%) 1.03s (± 1.29%) +0.01s (+ 0.68%) 1.01s 1.06s
Check Time 1.50s (± 0.32%) 1.50s (± 0.39%) +0.01s (+ 0.40%) 1.49s 1.52s
Emit Time 0.07s (± 0.00%) 0.07s (± 3.14%) +0.00s (+ 1.43%) 0.07s 0.08s
Total Time 5.15s (± 0.31%) 5.17s (± 0.33%) +0.01s (+ 0.27%) 5.13s 5.21s
Angular - node (v14.15.1, x64)
Memory used 335,438k (± 0.01%) 335,451k (± 0.01%) +13k (+ 0.00%) 335,385k 335,542k
Parse Time 2.06s (± 0.60%) 2.07s (± 0.52%) +0.01s (+ 0.63%) 2.05s 2.09s
Bind Time 0.90s (± 0.44%) 0.90s (± 0.68%) +0.00s (+ 0.22%) 0.89s 0.91s
Check Time 5.78s (± 0.52%) 5.82s (± 0.48%) +0.04s (+ 0.71%) 5.75s 5.88s
Emit Time 6.36s (± 0.61%) 6.41s (± 0.68%) +0.05s (+ 0.79%) 6.31s 6.50s
Total Time 15.10s (± 0.43%) 15.20s (± 0.45%) +0.11s (+ 0.70%) 15.06s 15.32s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,832k (± 0.01%) 192,851k (± 0.02%) +19k (+ 0.01%) 192,754k 192,910k
Parse Time 0.85s (± 0.78%) 0.85s (± 0.61%) -0.00s (- 0.12%) 0.84s 0.86s
Bind Time 0.57s (± 1.01%) 0.58s (± 0.77%) +0.00s (+ 0.87%) 0.57s 0.59s
Check Time 6.69s (± 0.40%) 6.73s (± 0.74%) +0.04s (+ 0.58%) 6.63s 6.84s
Emit Time 2.48s (± 0.79%) 2.49s (± 0.91%) +0.02s (+ 0.65%) 2.45s 2.54s
Total Time 10.59s (± 0.41%) 10.65s (± 0.58%) +0.06s (+ 0.58%) 10.56s 10.79s
Monaco - node (v14.15.1, x64)
Memory used 325,716k (± 0.01%) 325,729k (± 0.01%) +12k (+ 0.00%) 325,683k 325,779k
Parse Time 1.58s (± 0.66%) 1.59s (± 0.79%) +0.01s (+ 0.38%) 1.56s 1.62s
Bind Time 0.79s (± 0.82%) 0.80s (± 1.34%) +0.01s (+ 1.40%) 0.79s 0.84s
Check Time 5.67s (± 0.54%) 5.70s (± 0.74%) +0.03s (+ 0.46%) 5.57s 5.78s
Emit Time 3.37s (± 1.12%) 3.35s (± 0.50%) -0.01s (- 0.45%) 3.32s 3.40s
Total Time 11.41s (± 0.44%) 11.44s (± 0.43%) +0.03s (+ 0.25%) 11.30s 11.53s
TFS - node (v14.15.1, x64)
Memory used 288,800k (± 0.01%) 288,801k (± 0.01%) +1k (+ 0.00%) 288,730k 288,831k
Parse Time 1.34s (± 2.13%) 1.33s (± 1.13%) -0.01s (- 0.97%) 1.30s 1.37s
Bind Time 0.75s (± 1.27%) 0.78s (± 4.59%) +0.03s (+ 4.69%) 0.74s 0.86s
Check Time 5.34s (± 0.41%) 5.35s (± 0.31%) +0.01s (+ 0.21%) 5.31s 5.38s
Emit Time 3.57s (± 2.08%) 3.57s (± 2.07%) +0.00s (+ 0.11%) 3.46s 3.71s
Total Time 11.00s (± 0.73%) 11.03s (± 0.78%) +0.04s (+ 0.35%) 10.86s 11.24s
material-ui - node (v14.15.1, x64)
Memory used 446,674k (± 0.00%) 446,639k (± 0.01%) -34k (- 0.01%) 446,558k 446,687k
Parse Time 1.87s (± 0.40%) 1.88s (± 0.24%) +0.01s (+ 0.59%) 1.87s 1.89s
Bind Time 0.73s (± 0.61%) 0.74s (± 1.03%) +0.00s (+ 0.55%) 0.71s 0.75s
Check Time 13.11s (± 0.72%) 13.17s (± 0.72%) +0.05s (+ 0.40%) 12.98s 13.33s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.71s (± 0.61%) 15.78s (± 0.65%) +0.07s (+ 0.43%) 15.60s 15.96s
xstate - node (v14.15.1, x64)
Memory used 541,296k (± 0.00%) 541,296k (± 0.01%) -0k (- 0.00%) 541,254k 541,394k
Parse Time 2.60s (± 0.50%) 2.60s (± 0.45%) +0.00s (+ 0.12%) 2.58s 2.63s
Bind Time 1.15s (± 1.69%) 1.16s (± 1.21%) +0.01s (+ 0.96%) 1.12s 1.19s
Check Time 1.55s (± 0.38%) 1.55s (± 0.71%) +0.00s (+ 0.26%) 1.53s 1.58s
Emit Time 0.07s (± 4.66%) 0.07s (± 0.00%) 🟩-0.00s (- 4.11%) 0.07s 0.07s
Total Time 5.37s (± 0.53%) 5.38s (± 0.38%) +0.02s (+ 0.32%) 5.34s 5.42s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 49887 10
Baseline main 10

TSServer

Comparison Report - main..49887
Metric main 49887 Delta Best Worst
xstateTSServer - node (v10.16.3, x64)
Initial load time 2,155.50ms (± 0.45%) 2,162.00ms (± 0.62%) +6.50ms (+ 0.30%) 2,141.00ms 2,200.00ms
Geterr time 762.70ms (± 0.33%) 764.40ms (± 0.90%) +1.70ms (+ 0.22%) 755.00ms 785.00ms
References time 96.20ms (± 1.72%) 96.20ms (± 2.01%) 0.00ms ( 0.00%) 93.00ms 101.00ms
Navto time 254.20ms (± 1.11%) 253.30ms (± 1.03%) -0.90ms (- 0.35%) 249.00ms 260.00ms
Navto count 256.00 (± 0.00%) 256.00 (± 0.00%) 0.00 ( 0.00%) 256.00 256.00
Completions time 243.00ms (± 0.80%) 247.60ms (± 1.00%) +4.60ms (+ 1.89%) 242.00ms 254.00ms
Completions count 3,205.00 (± 0.00%) 3,205.00 (± 0.00%) 0.00 ( 0.00%) 3,205.00 3,205.00
xstateTSServer - node (v12.1.0, x64)
Initial load time 2,095.00ms (± 0.52%) 2,102.50ms (± 0.88%) +7.50ms (+ 0.36%) 2,067.00ms 2,146.00ms
Geterr time 752.00ms (± 0.43%) 749.60ms (± 0.37%) -2.40ms (- 0.32%) 745.00ms 756.00ms
References time 68.40ms (± 1.39%) 69.00ms (± 1.98%) +0.60ms (+ 0.88%) 67.00ms 74.00ms
Navto time 240.60ms (± 1.82%) 241.00ms (± 1.14%) +0.40ms (+ 0.17%) 231.00ms 245.00ms
Navto count 256.00 (± 0.00%) 256.00 (± 0.00%) 0.00 ( 0.00%) 256.00 256.00
Completions time 238.40ms (± 0.75%) 241.20ms (± 0.71%) +2.80ms (+ 1.17%) 237.00ms 244.00ms
Completions count 3,205.00 (± 0.00%) 3,205.00 (± 0.00%) 0.00 ( 0.00%) 3,205.00 3,205.00
xstateTSServer - node (v14.15.1, x64)
Initial load time 2,222.80ms (± 0.38%) 2,230.70ms (± 0.58%) +7.90ms (+ 0.36%) 2,213.00ms 2,271.00ms
Geterr time 765.60ms (± 0.23%) 770.60ms (± 0.49%) +5.00ms (+ 0.65%) 764.00ms 782.00ms
References time 64.40ms (± 1.28%) 64.80ms (± 1.23%) +0.40ms (+ 0.62%) 64.00ms 67.00ms
Navto time 250.00ms (± 0.73%) 250.50ms (± 0.89%) +0.50ms (+ 0.20%) 247.00ms 257.00ms
Navto count 256.00 (± 0.00%) 256.00 (± 0.00%) 0.00 ( 0.00%) 256.00 256.00
Completions time 241.90ms (± 0.57%) 247.50ms (± 4.38%) +5.60ms (+ 2.32%) 241.00ms 291.00ms
Completions count 3,205.00 (± 0.00%) 3,205.00 (± 0.00%) 0.00 ( 0.00%) 3,205.00 3,205.00
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • xstateTSServer - node (v10.16.3, x64)
  • xstateTSServer - node (v12.1.0, x64)
  • xstateTSServer - node (v14.15.1, x64)
Benchmark Name Iterations
Current 49887 10
Baseline main 10

Developer Information:

Download Benchmark

@jakebailey
Copy link
Member Author

Figured this out; we basically just needed to revert #26678, which worked around problems with non-inferrable types before the current non-inferrable flag and proper propagation was implemented.

@jakebailey
Copy link
Member Author

@typescript-bot test this
@typescript-bot user test this inline
@typescript-bot run dt
@typescript-bot perf test this faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 14, 2022

Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at 9e831ec. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 14, 2022

Heya @jakebailey, I've started to run the abridged perf test suite on this PR at 9e831ec. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 14, 2022

Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at 9e831ec. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 14, 2022

Heya @jakebailey, I've started to run the extended test suite on this PR at 9e831ec. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - main..49887

Metric main 49887 Delta Best Worst
Angular - node (v14.15.1, x64)
Memory used 335,892k (± 0.01%) 335,919k (± 0.01%) +28k (+ 0.01%) 335,876k 335,995k
Parse Time 2.06s (± 0.71%) 2.06s (± 0.63%) -0.00s (- 0.24%) 2.04s 2.10s
Bind Time 0.89s (± 1.10%) 0.89s (± 0.41%) +0.00s (+ 0.22%) 0.89s 0.90s
Check Time 5.80s (± 0.64%) 5.79s (± 0.45%) -0.01s (- 0.22%) 5.73s 5.84s
Emit Time 6.40s (± 1.34%) 6.36s (± 0.58%) -0.04s (- 0.67%) 6.28s 6.43s
Total Time 15.15s (± 0.83%) 15.09s (± 0.41%) -0.06s (- 0.39%) 14.98s 15.20s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,850k (± 0.01%) 193,172k (± 0.38%) +322k (+ 0.17%) 192,794k 196,118k
Parse Time 0.86s (± 0.69%) 0.85s (± 0.86%) -0.01s (- 0.93%) 0.84s 0.87s
Bind Time 0.57s (± 1.30%) 0.57s (± 1.32%) +0.00s (+ 0.88%) 0.56s 0.59s
Check Time 6.72s (± 0.71%) 6.70s (± 0.66%) -0.02s (- 0.36%) 6.62s 6.80s
Emit Time 2.48s (± 0.82%) 2.48s (± 0.70%) -0.00s (- 0.20%) 2.43s 2.52s
Total Time 10.63s (± 0.51%) 10.60s (± 0.51%) -0.03s (- 0.28%) 10.50s 10.70s
Monaco - node (v14.15.1, x64)
Memory used 325,710k (± 0.01%) 325,724k (± 0.00%) +14k (+ 0.00%) 325,689k 325,746k
Parse Time 1.58s (± 0.84%) 1.58s (± 0.65%) -0.00s (- 0.25%) 1.56s 1.61s
Bind Time 0.79s (± 0.63%) 0.78s (± 0.85%) -0.00s (- 0.25%) 0.77s 0.80s
Check Time 5.70s (± 0.33%) 5.69s (± 0.52%) -0.01s (- 0.14%) 5.64s 5.74s
Emit Time 3.36s (± 0.39%) 3.36s (± 0.86%) +0.00s (+ 0.15%) 3.32s 3.43s
Total Time 11.42s (± 0.29%) 11.41s (± 0.53%) -0.01s (- 0.08%) 11.31s 11.54s
TFS - node (v14.15.1, x64)
Memory used 288,817k (± 0.01%) 288,809k (± 0.01%) -9k (- 0.00%) 288,763k 288,870k
Parse Time 1.33s (± 1.67%) 1.32s (± 1.11%) -0.01s (- 0.75%) 1.29s 1.35s
Bind Time 0.77s (± 3.32%) 0.78s (± 4.79%) +0.01s (+ 1.04%) 0.73s 0.86s
Check Time 5.35s (± 0.54%) 5.32s (± 0.28%) -0.02s (- 0.39%) 5.29s 5.37s
Emit Time 3.58s (± 2.22%) 3.53s (± 2.20%) -0.06s (- 1.62%) 3.41s 3.71s
Total Time 11.02s (± 0.91%) 10.95s (± 0.90%) -0.07s (- 0.68%) 10.78s 11.19s
material-ui - node (v14.15.1, x64)
Memory used 446,681k (± 0.01%) 446,540k (± 0.06%) -142k (- 0.03%) 445,488k 446,715k
Parse Time 1.87s (± 0.51%) 1.87s (± 0.48%) -0.00s (- 0.16%) 1.85s 1.89s
Bind Time 0.72s (± 1.36%) 0.72s (± 1.30%) -0.00s (- 0.28%) 0.70s 0.74s
Check Time 13.12s (± 0.72%) 13.19s (± 1.11%) +0.07s (+ 0.52%) 12.90s 13.52s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.72s (± 0.68%) 15.78s (± 0.96%) +0.07s (+ 0.41%) 15.49s 16.14s
xstate - node (v14.15.1, x64)
Memory used 541,287k (± 0.01%) 541,253k (± 0.00%) -34k (- 0.01%) 541,220k 541,286k
Parse Time 2.61s (± 0.67%) 2.60s (± 0.37%) -0.01s (- 0.42%) 2.57s 2.61s
Bind Time 1.15s (± 1.35%) 1.14s (± 0.97%) -0.01s (- 1.04%) 1.11s 1.17s
Check Time 1.55s (± 0.61%) 1.54s (± 0.42%) -0.01s (- 0.52%) 1.53s 1.56s
Emit Time 0.07s (± 4.92%) 0.07s (± 0.00%) 🟩-0.00s (- 5.41%) 0.07s 0.07s
Total Time 5.38s (± 0.54%) 5.35s (± 0.31%) -0.03s (- 0.50%) 5.31s 5.38s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 49887 10
Baseline main 10

Developer Information:

Download Benchmark

@typescript-bot
Copy link
Collaborator

@jakebailey
Great news! no new errors were found between main..refs/pull/49887/merge

@jakebailey
Copy link
Member Author

All the tests look clean, phew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrectly inferred type for union types
3 participants