Skip to content

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

Merged
Jake Bailey (jakebailey) merged 13 commits into
microsoft:mainfrom
jakebailey:fix-43962
Jul 15, 2022
Merged

Properly propagate ObjectFlags.NonInferrableType, clean up non-inferrable code paths#49887
Jake Bailey (jakebailey) merged 13 commits into
microsoft:mainfrom
jakebailey:fix-43962

Conversation

@jakebailey

@jakebaileyJake Bailey (jakebailey) commented Jul 13, 2022

Copy link
Copy Markdown
Member

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.

@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.

Comment threadsrc/compiler/checker.ts Outdated
Comment threadsrc/compiler/checker.ts Outdated
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
Copy Markdown
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
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

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
Jake Bailey (jakebailey) marked this pull request as ready for review July 13, 2022 21:28
@jakebailey

Copy link
Copy Markdown
MemberAuthor

@typescript-bot

TypeScript Bot (typescript-bot) commented Jul 13, 2022

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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

TypeScript Bot (typescript-bot) commented Jul 13, 2022

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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
Copy Markdown
Contributor

Heya Jake Bailey (@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
Copy Markdown
Member

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
Copy Markdown
Contributor

Jake Bailey (@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
Copy Markdown
MemberAuthor

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

@jakebailey

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - main..49887
Metricmain49887DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used359,686k (± 0.02%)359,625k (± 0.01%)-61k (- 0.02%)359,515k359,745k
Parse Time2.09s (± 0.35%)2.08s (± 0.42%)-0.00s (- 0.24%)2.06s2.10s
Bind Time0.90s (± 0.98%)0.90s (± 1.12%)-0.01s (- 0.78%)0.88s0.93s
Check Time5.99s (± 0.34%)6.01s (± 0.40%)+0.01s (+ 0.25%)5.95s6.07s
Emit Time6.11s (± 0.75%)6.11s (± 0.30%)+0.00s (+ 0.07%)6.08s6.17s
Total Time15.09s (± 0.36%)15.10s (± 0.18%)+0.01s (+ 0.07%)15.06s15.19s
Compiler-Unions - node (v10.16.3, x64)
Memory used206,703k (± 0.03%)206,670k (± 0.04%)-34k (- 0.02%)206,501k206,933k
Parse Time0.83s (± 0.69%)0.83s (± 0.48%)+0.00s (+ 0.12%)0.82s0.84s
Bind Time0.53s (± 1.76%)0.52s (± 2.11%)-0.01s (- 0.95%)0.51s0.55s
Check Time7.09s (± 0.32%)7.13s (± 0.48%)+0.04s (+ 0.54%)7.06s7.22s
Emit Time2.50s (± 1.25%)2.50s (± 0.70%)-0.00s (- 0.16%)2.47s2.56s
Total Time10.95s (± 0.36%)10.98s (± 0.35%)+0.03s (+ 0.26%)10.90s11.09s
Monaco - node (v10.16.3, x64)
Memory used343,991k (± 0.02%)343,968k (± 0.02%)-22k (- 0.01%)343,710k344,077k
Parse Time1.60s (± 0.37%)1.60s (± 0.78%)+0.00s (+ 0.25%)1.57s1.63s
Bind Time0.77s (± 0.68%)0.78s (± 2.10%)+0.01s (+ 1.04%)0.76s0.84s
Check Time5.95s (± 0.47%)5.98s (± 0.53%)+0.03s (+ 0.52%)5.88s6.03s
Emit Time3.24s (± 0.40%)3.27s (± 0.77%)+0.02s (+ 0.77%)3.22s3.33s
Total Time11.56s (± 0.21%)11.63s (± 0.51%)+0.07s (+ 0.61%)11.53s11.76s
TFS - node (v10.16.3, x64)
Memory used305,162k (± 0.02%)305,156k (± 0.02%)-6k (- 0.00%)305,082k305,253k
Parse Time1.27s (± 0.59%)1.28s (± 0.58%)+0.01s (+ 0.47%)1.27s1.30s
Bind Time0.72s (± 0.51%)0.73s (± 0.61%)+0.00s (+ 0.41%)0.72s0.74s
Check Time5.40s (± 0.43%)5.42s (± 0.62%)+0.03s (+ 0.50%)5.34s5.49s
Emit Time3.42s (± 1.08%)3.41s (± 0.89%)-0.01s (- 0.41%)3.34s3.47s
Total Time10.82s (± 0.45%)10.84s (± 0.43%)+0.02s (+ 0.23%)10.72s10.93s
material-ui - node (v10.16.3, x64)
Memory used469,401k (± 0.01%)469,401k (± 0.01%)+0k (+ 0.00%)469,271k469,566k
Parse Time1.82s (± 0.69%)1.83s (± 0.75%)+0.01s (+ 0.44%)1.81s1.86s
Bind Time0.69s (± 2.28%)0.68s (± 1.44%)-0.01s (- 1.02%)0.66s0.70s
Check Time14.51s (± 0.56%)14.58s (± 0.83%)+0.08s (+ 0.52%)14.38s14.81s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time17.02s (± 0.51%)17.10s (± 0.73%)+0.08s (+ 0.45%)16.90s17.33s
xstate - node (v10.16.3, x64)
Memory used581,242k (± 1.26%)581,307k (± 1.26%)+65k (+ 0.01%)577,874k610,906k
Parse Time2.59s (± 0.26%)2.59s (± 0.35%)-0.00s (- 0.15%)2.57s2.61s
Bind Time1.03s (± 1.34%)1.03s (± 0.68%)+0.00s (+ 0.19%)1.02s1.05s
Check Time1.56s (± 0.49%)1.56s (± 0.44%)0.00s ( 0.00%)1.54s1.57s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.24s (± 0.39%)5.24s (± 0.29%)+0.00s (+ 0.08%)5.22s5.28s
Angular - node (v12.1.0, x64)
Memory used337,292k (± 0.02%)337,143k (± 0.09%)-149k (- 0.04%)335,952k337,406k
Parse Time2.09s (± 0.40%)2.10s (± 0.69%)+0.01s (+ 0.57%)2.08s2.15s
Bind Time0.86s (± 0.46%)0.86s (± 0.52%)+0.00s (+ 0.12%)0.85s0.87s
Check Time5.81s (± 0.59%)5.83s (± 0.53%)+0.02s (+ 0.36%)5.76s5.90s
Emit Time6.35s (± 0.78%)6.37s (± 0.54%)+0.02s (+ 0.30%)6.30s6.44s
Total Time15.11s (± 0.48%)15.16s (± 0.43%)+0.05s (+ 0.30%)15.05s15.31s
Compiler-Unions - node (v12.1.0, x64)
Memory used194,308k (± 0.09%)194,353k (± 0.04%)+45k (+ 0.02%)194,228k194,517k
Parse Time0.82s (± 0.83%)0.83s (± 0.82%)+0.00s (+ 0.12%)0.81s0.84s
Bind Time0.55s (± 1.33%)0.55s (± 1.06%)-0.00s (- 0.18%)0.54s0.56s
Check Time6.67s (± 0.48%)6.70s (± 0.43%)+0.03s (+ 0.37%)6.64s6.78s
Emit Time2.54s (± 1.47%)2.54s (± 0.68%)+0.01s (+ 0.24%)2.50s2.59s
Total Time10.58s (± 0.60%)10.61s (± 0.43%)+0.03s (+ 0.32%)10.53s10.76s
Monaco - node (v12.1.0, x64)
Memory used326,957k (± 0.02%)326,991k (± 0.02%)+34k (+ 0.01%)326,889k327,090k
Parse Time1.57s (± 0.33%)1.57s (± 0.57%)+0.00s (+ 0.19%)1.55s1.59s
Bind Time0.76s (± 0.76%)0.76s (± 0.59%)-0.00s (- 0.26%)0.75s0.77s
Check Time5.80s (± 0.72%)5.80s (± 0.68%)+0.00s (+ 0.05%)5.74s5.92s
Emit Time3.30s (± 0.84%)3.30s (± 0.71%)-0.00s (- 0.15%)3.26s3.36s
Total Time11.43s (± 0.54%)11.43s (± 0.41%)+0.00s (+ 0.00%)11.32s11.59s
TFS - node (v12.1.0, x64)
Memory used289,814k (± 0.02%)289,687k (± 0.05%)-127k (- 0.04%)289,141k289,849k
Parse Time1.29s (± 0.90%)1.30s (± 0.63%)+0.01s (+ 0.69%)1.29s1.33s
Bind Time0.72s (± 0.82%)0.73s (± 1.04%)+0.00s (+ 0.28%)0.71s0.74s
Check Time5.35s (± 0.57%)5.36s (± 0.41%)+0.01s (+ 0.17%)5.32s5.41s
Emit Time3.55s (± 1.07%)3.53s (± 0.87%)-0.02s (- 0.68%)3.45s3.58s
Total Time10.93s (± 0.42%)10.92s (± 0.44%)-0.00s (- 0.03%)10.82s11.03s
material-ui - node (v12.1.0, x64)
Memory used448,440k (± 0.07%)448,249k (± 0.08%)-191k (- 0.04%)447,267k448,611k
Parse Time1.83s (± 0.41%)1.82s (± 0.57%)-0.00s (- 0.22%)1.81s1.85s
Bind Time0.68s (± 0.95%)0.68s (± 0.50%)+0.00s (+ 0.74%)0.68s0.69s
Check Time12.99s (± 0.43%)13.09s (± 0.77%)+0.09s (+ 0.72%)12.94s13.30s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.50s (± 0.35%)15.59s (± 0.64%)+0.09s (+ 0.61%)15.45s15.79s
xstate - node (v12.1.0, x64)
Memory used543,455k (± 0.01%)543,421k (± 0.02%)-34k (- 0.01%)543,192k543,618k
Parse Time2.56s (± 0.30%)2.56s (± 0.37%)0.00s ( 0.00%)2.53s2.57s
Bind Time1.03s (± 1.37%)1.03s (± 1.29%)+0.01s (+ 0.68%)1.01s1.06s
Check Time1.50s (± 0.32%)1.50s (± 0.39%)+0.01s (+ 0.40%)1.49s1.52s
Emit Time0.07s (± 0.00%)0.07s (± 3.14%)+0.00s (+ 1.43%)0.07s0.08s
Total Time5.15s (± 0.31%)5.17s (± 0.33%)+0.01s (+ 0.27%)5.13s5.21s
Angular - node (v14.15.1, x64)
Memory used335,438k (± 0.01%)335,451k (± 0.01%)+13k (+ 0.00%)335,385k335,542k
Parse Time2.06s (± 0.60%)2.07s (± 0.52%)+0.01s (+ 0.63%)2.05s2.09s
Bind Time0.90s (± 0.44%)0.90s (± 0.68%)+0.00s (+ 0.22%)0.89s0.91s
Check Time5.78s (± 0.52%)5.82s (± 0.48%)+0.04s (+ 0.71%)5.75s5.88s
Emit Time6.36s (± 0.61%)6.41s (± 0.68%)+0.05s (+ 0.79%)6.31s6.50s
Total Time15.10s (± 0.43%)15.20s (± 0.45%)+0.11s (+ 0.70%)15.06s15.32s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,832k (± 0.01%)192,851k (± 0.02%)+19k (+ 0.01%)192,754k192,910k
Parse Time0.85s (± 0.78%)0.85s (± 0.61%)-0.00s (- 0.12%)0.84s0.86s
Bind Time0.57s (± 1.01%)0.58s (± 0.77%)+0.00s (+ 0.87%)0.57s0.59s
Check Time6.69s (± 0.40%)6.73s (± 0.74%)+0.04s (+ 0.58%)6.63s6.84s
Emit Time2.48s (± 0.79%)2.49s (± 0.91%)+0.02s (+ 0.65%)2.45s2.54s
Total Time10.59s (± 0.41%)10.65s (± 0.58%)+0.06s (+ 0.58%)10.56s10.79s
Monaco - node (v14.15.1, x64)
Memory used325,716k (± 0.01%)325,729k (± 0.01%)+12k (+ 0.00%)325,683k325,779k
Parse Time1.58s (± 0.66%)1.59s (± 0.79%)+0.01s (+ 0.38%)1.56s1.62s
Bind Time0.79s (± 0.82%)0.80s (± 1.34%)+0.01s (+ 1.40%)0.79s0.84s
Check Time5.67s (± 0.54%)5.70s (± 0.74%)+0.03s (+ 0.46%)5.57s5.78s
Emit Time3.37s (± 1.12%)3.35s (± 0.50%)-0.01s (- 0.45%)3.32s3.40s
Total Time11.41s (± 0.44%)11.44s (± 0.43%)+0.03s (+ 0.25%)11.30s11.53s
TFS - node (v14.15.1, x64)
Memory used288,800k (± 0.01%)288,801k (± 0.01%)+1k (+ 0.00%)288,730k288,831k
Parse Time1.34s (± 2.13%)1.33s (± 1.13%)-0.01s (- 0.97%)1.30s1.37s
Bind Time0.75s (± 1.27%)0.78s (± 4.59%)+0.03s (+ 4.69%)0.74s0.86s
Check Time5.34s (± 0.41%)5.35s (± 0.31%)+0.01s (+ 0.21%)5.31s5.38s
Emit Time3.57s (± 2.08%)3.57s (± 2.07%)+0.00s (+ 0.11%)3.46s3.71s
Total Time11.00s (± 0.73%)11.03s (± 0.78%)+0.04s (+ 0.35%)10.86s11.24s
material-ui - node (v14.15.1, x64)
Memory used446,674k (± 0.00%)446,639k (± 0.01%)-34k (- 0.01%)446,558k446,687k
Parse Time1.87s (± 0.40%)1.88s (± 0.24%)+0.01s (+ 0.59%)1.87s1.89s
Bind Time0.73s (± 0.61%)0.74s (± 1.03%)+0.00s (+ 0.55%)0.71s0.75s
Check Time13.11s (± 0.72%)13.17s (± 0.72%)+0.05s (+ 0.40%)12.98s13.33s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.71s (± 0.61%)15.78s (± 0.65%)+0.07s (+ 0.43%)15.60s15.96s
xstate - node (v14.15.1, x64)
Memory used541,296k (± 0.00%)541,296k (± 0.01%)-0k (- 0.00%)541,254k541,394k
Parse Time2.60s (± 0.50%)2.60s (± 0.45%)+0.00s (+ 0.12%)2.58s2.63s
Bind Time1.15s (± 1.69%)1.16s (± 1.21%)+0.01s (+ 0.96%)1.12s1.19s
Check Time1.55s (± 0.38%)1.55s (± 0.71%)+0.00s (+ 0.26%)1.53s1.58s
Emit Time0.07s (± 4.66%)0.07s (± 0.00%)🟩-0.00s (- 4.11%)0.07s0.07s
Total Time5.37s (± 0.53%)5.38s (± 0.38%)+0.02s (+ 0.32%)5.34s5.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)
BenchmarkNameIterations
Current4988710
Baselinemain10

TSServer

Comparison Report - main..49887
Metricmain49887DeltaBestWorst
xstateTSServer - node (v10.16.3, x64)
Initial load time2,155.50ms (± 0.45%)2,162.00ms (± 0.62%)+6.50ms (+ 0.30%)2,141.00ms2,200.00ms
Geterr time762.70ms (± 0.33%)764.40ms (± 0.90%)+1.70ms (+ 0.22%)755.00ms785.00ms
References time96.20ms (± 1.72%)96.20ms (± 2.01%)0.00ms ( 0.00%)93.00ms101.00ms
Navto time254.20ms (± 1.11%)253.30ms (± 1.03%)-0.90ms (- 0.35%)249.00ms260.00ms
Navto count256.00 (± 0.00%)256.00 (± 0.00%)0.00 ( 0.00%)256.00256.00
Completions time243.00ms (± 0.80%)247.60ms (± 1.00%)+4.60ms (+ 1.89%)242.00ms254.00ms
Completions count3,205.00 (± 0.00%)3,205.00 (± 0.00%)0.00 ( 0.00%)3,205.003,205.00
xstateTSServer - node (v12.1.0, x64)
Initial load time2,095.00ms (± 0.52%)2,102.50ms (± 0.88%)+7.50ms (+ 0.36%)2,067.00ms2,146.00ms
Geterr time752.00ms (± 0.43%)749.60ms (± 0.37%)-2.40ms (- 0.32%)745.00ms756.00ms
References time68.40ms (± 1.39%)69.00ms (± 1.98%)+0.60ms (+ 0.88%)67.00ms74.00ms
Navto time240.60ms (± 1.82%)241.00ms (± 1.14%)+0.40ms (+ 0.17%)231.00ms245.00ms
Navto count256.00 (± 0.00%)256.00 (± 0.00%)0.00 ( 0.00%)256.00256.00
Completions time238.40ms (± 0.75%)241.20ms (± 0.71%)+2.80ms (+ 1.17%)237.00ms244.00ms
Completions count3,205.00 (± 0.00%)3,205.00 (± 0.00%)0.00 ( 0.00%)3,205.003,205.00
xstateTSServer - node (v14.15.1, x64)
Initial load time2,222.80ms (± 0.38%)2,230.70ms (± 0.58%)+7.90ms (+ 0.36%)2,213.00ms2,271.00ms
Geterr time765.60ms (± 0.23%)770.60ms (± 0.49%)+5.00ms (+ 0.65%)764.00ms782.00ms
References time64.40ms (± 1.28%)64.80ms (± 1.23%)+0.40ms (+ 0.62%)64.00ms67.00ms
Navto time250.00ms (± 0.73%)250.50ms (± 0.89%)+0.50ms (+ 0.20%)247.00ms257.00ms
Navto count256.00 (± 0.00%)256.00 (± 0.00%)0.00 ( 0.00%)256.00256.00
Completions time241.90ms (± 0.57%)247.50ms (± 4.38%)+5.60ms (+ 2.32%)241.00ms291.00ms
Completions count3,205.00 (± 0.00%)3,205.00 (± 0.00%)0.00 ( 0.00%)3,205.003,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)
BenchmarkNameIterations
Current4988710
Baselinemain10

Developer Information:

Download Benchmark

@jakebailey

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

@typescript-bot

TypeScript Bot (typescript-bot) commented Jul 14, 2022

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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

TypeScript Bot (typescript-bot) commented Jul 14, 2022

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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

TypeScript Bot (typescript-bot) commented Jul 14, 2022

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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

TypeScript Bot (typescript-bot) commented Jul 14, 2022

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49887

Metricmain49887DeltaBestWorst
Angular - node (v14.15.1, x64)
Memory used335,892k (± 0.01%)335,919k (± 0.01%)+28k (+ 0.01%)335,876k335,995k
Parse Time2.06s (± 0.71%)2.06s (± 0.63%)-0.00s (- 0.24%)2.04s2.10s
Bind Time0.89s (± 1.10%)0.89s (± 0.41%)+0.00s (+ 0.22%)0.89s0.90s
Check Time5.80s (± 0.64%)5.79s (± 0.45%)-0.01s (- 0.22%)5.73s5.84s
Emit Time6.40s (± 1.34%)6.36s (± 0.58%)-0.04s (- 0.67%)6.28s6.43s
Total Time15.15s (± 0.83%)15.09s (± 0.41%)-0.06s (- 0.39%)14.98s15.20s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,850k (± 0.01%)193,172k (± 0.38%)+322k (+ 0.17%)192,794k196,118k
Parse Time0.86s (± 0.69%)0.85s (± 0.86%)-0.01s (- 0.93%)0.84s0.87s
Bind Time0.57s (± 1.30%)0.57s (± 1.32%)+0.00s (+ 0.88%)0.56s0.59s
Check Time6.72s (± 0.71%)6.70s (± 0.66%)-0.02s (- 0.36%)6.62s6.80s
Emit Time2.48s (± 0.82%)2.48s (± 0.70%)-0.00s (- 0.20%)2.43s2.52s
Total Time10.63s (± 0.51%)10.60s (± 0.51%)-0.03s (- 0.28%)10.50s10.70s
Monaco - node (v14.15.1, x64)
Memory used325,710k (± 0.01%)325,724k (± 0.00%)+14k (+ 0.00%)325,689k325,746k
Parse Time1.58s (± 0.84%)1.58s (± 0.65%)-0.00s (- 0.25%)1.56s1.61s
Bind Time0.79s (± 0.63%)0.78s (± 0.85%)-0.00s (- 0.25%)0.77s0.80s
Check Time5.70s (± 0.33%)5.69s (± 0.52%)-0.01s (- 0.14%)5.64s5.74s
Emit Time3.36s (± 0.39%)3.36s (± 0.86%)+0.00s (+ 0.15%)3.32s3.43s
Total Time11.42s (± 0.29%)11.41s (± 0.53%)-0.01s (- 0.08%)11.31s11.54s
TFS - node (v14.15.1, x64)
Memory used288,817k (± 0.01%)288,809k (± 0.01%)-9k (- 0.00%)288,763k288,870k
Parse Time1.33s (± 1.67%)1.32s (± 1.11%)-0.01s (- 0.75%)1.29s1.35s
Bind Time0.77s (± 3.32%)0.78s (± 4.79%)+0.01s (+ 1.04%)0.73s0.86s
Check Time5.35s (± 0.54%)5.32s (± 0.28%)-0.02s (- 0.39%)5.29s5.37s
Emit Time3.58s (± 2.22%)3.53s (± 2.20%)-0.06s (- 1.62%)3.41s3.71s
Total Time11.02s (± 0.91%)10.95s (± 0.90%)-0.07s (- 0.68%)10.78s11.19s
material-ui - node (v14.15.1, x64)
Memory used446,681k (± 0.01%)446,540k (± 0.06%)-142k (- 0.03%)445,488k446,715k
Parse Time1.87s (± 0.51%)1.87s (± 0.48%)-0.00s (- 0.16%)1.85s1.89s
Bind Time0.72s (± 1.36%)0.72s (± 1.30%)-0.00s (- 0.28%)0.70s0.74s
Check Time13.12s (± 0.72%)13.19s (± 1.11%)+0.07s (+ 0.52%)12.90s13.52s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.72s (± 0.68%)15.78s (± 0.96%)+0.07s (+ 0.41%)15.49s16.14s
xstate - node (v14.15.1, x64)
Memory used541,287k (± 0.01%)541,253k (± 0.00%)-34k (- 0.01%)541,220k541,286k
Parse Time2.61s (± 0.67%)2.60s (± 0.37%)-0.01s (- 0.42%)2.57s2.61s
Bind Time1.15s (± 1.35%)1.14s (± 0.97%)-0.01s (- 1.04%)1.11s1.17s
Check Time1.55s (± 0.61%)1.54s (± 0.42%)-0.01s (- 0.52%)1.53s1.56s
Emit Time0.07s (± 4.92%)0.07s (± 0.00%)🟩-0.00s (- 5.41%)0.07s0.07s
Total Time5.38s (± 0.54%)5.35s (± 0.31%)-0.03s (- 0.50%)5.31s5.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)
BenchmarkNameIterations
Current4988710
Baselinemain10

Developer Information:

Download Benchmark

@typescript-bot

Copy link
Copy Markdown
Contributor

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

@jakebailey

Copy link
Copy Markdown
MemberAuthor

All the tests look clean, phew.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Milestone BugPRs 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

@jakebailey@typescript-bot@weswigham