Skip to content

Revert removal of nonInferrableAnyType - #50691

Merged
Jake Bailey (jakebailey) merged 3 commits into
microsoft:mainfrom
jakebailey:fix-50680
Sep 12, 2022
Merged

Revert removal of nonInferrableAnyType#50691
Jake Bailey (jakebailey) merged 3 commits into
microsoft:mainfrom
jakebailey:fix-50680

Conversation

@jakebailey

@jakebaileyJake Bailey (jakebailey) commented Sep 8, 2022

Copy link
Copy Markdown
Member

Fixes#50680

This reverts a cleanup I made in #49887; apparently, it did matter, but we didn't have a test case to show so.

The type name is probably bad at this point; it's a special any that we only use for this purpose. It would seem like anyWideningType is the right name for it (mirroring the two others with this flag), but confusingly, removing the ContainsWideningType flag still passes the tests. Maybe there's another case to come up with? Also, ContainsWideningType is documented as only existing on those two other types, and they are conditional on strictNullChecks, so... huh?

Anyway, now the code is as it was before, and it works.

This might be another 4.8 backport candidate.

@jakebailey

Copy link
Copy Markdown
MemberAuthor

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 8, 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 cafebee. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 8, 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 cafebee. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 8, 2022

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the abridged perf test suite on this PR at cafebee. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 8, 2022

Copy link
Copy Markdown
Contributor

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

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 8, 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 cafebee. 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..50691

Metricmain50691DeltaBestWorst
Angular - node (v14.15.1, x64)
Memory used338,845k (± 0.01%)338,826k (± 0.01%)-19k (- 0.01%)338,742k338,890k
Parse Time2.08s (± 1.54%)2.06s (± 0.84%)-0.02s (- 0.91%)2.03s2.11s
Bind Time0.79s (± 0.70%)0.80s (± 0.62%)+0.00s (+ 0.51%)0.79s0.81s
Check Time5.81s (± 0.63%)5.83s (± 0.70%)+0.02s (+ 0.34%)5.75s5.91s
Emit Time6.19s (± 0.89%)6.14s (± 0.56%)-0.05s (- 0.76%)6.10s6.23s
Total Time14.87s (± 0.70%)14.83s (± 0.42%)-0.04s (- 0.26%)14.68s14.98s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,974k (± 0.39%)192,551k (± 0.13%)-423k (- 0.22%)191,544k192,741k
Parse Time0.86s (± 0.80%)0.85s (± 0.61%)-0.01s (- 0.82%)0.84s0.86s
Bind Time0.48s (± 0.77%)0.49s (± 0.98%)+0.00s (+ 0.41%)0.48s0.50s
Check Time6.71s (± 0.56%)6.73s (± 0.39%)+0.02s (+ 0.36%)6.66s6.79s
Emit Time2.42s (± 0.62%)2.41s (± 0.98%)-0.00s (- 0.21%)2.36s2.46s
Total Time10.46s (± 0.38%)10.48s (± 0.40%)+0.02s (+ 0.17%)10.36s10.55s
Monaco - node (v14.15.1, x64)
Memory used326,520k (± 0.01%)326,516k (± 0.01%)-4k (- 0.00%)326,476k326,569k
Parse Time1.57s (± 0.32%)1.57s (± 0.84%)+0.01s (+ 0.45%)1.56s1.62s
Bind Time0.72s (± 0.83%)0.72s (± 0.41%)-0.00s (- 0.41%)0.72s0.73s
Check Time5.70s (± 0.57%)5.71s (± 0.51%)+0.01s (+ 0.11%)5.66s5.79s
Emit Time3.30s (± 0.84%)3.32s (± 1.00%)+0.01s (+ 0.33%)3.25s3.39s
Total Time11.30s (± 0.46%)11.31s (± 0.48%)+0.02s (+ 0.15%)11.20s11.43s
TFS - node (v14.15.1, x64)
Memory used289,667k (± 0.00%)289,647k (± 0.01%)-20k (- 0.01%)289,602k289,685k
Parse Time1.30s (± 0.57%)1.31s (± 0.66%)+0.01s (+ 0.62%)1.29s1.32s
Bind Time0.79s (± 0.38%)0.79s (± 0.62%)+0.01s (+ 0.76%)0.79s0.81s
Check Time5.35s (± 0.32%)5.35s (± 0.45%)-0.00s (- 0.04%)5.29s5.40s
Emit Time3.57s (± 0.77%)3.57s (± 0.69%)+0.01s (+ 0.20%)3.52s3.63s
Total Time11.01s (± 0.33%)11.02s (± 0.37%)+0.02s (+ 0.14%)10.95s11.11s
material-ui - node (v14.15.1, x64)
Memory used436,372k (± 0.04%)436,494k (± 0.00%)+122k (+ 0.03%)436,446k436,526k
Parse Time1.86s (± 0.56%)1.86s (± 0.60%)-0.00s (- 0.16%)1.84s1.89s
Bind Time0.58s (± 0.82%)0.58s (± 0.81%)-0.00s (- 0.51%)0.57s0.59s
Check Time12.89s (± 0.41%)12.84s (± 0.51%)-0.05s (- 0.40%)12.74s13.02s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.34s (± 0.34%)15.28s (± 0.47%)-0.06s (- 0.37%)15.18s15.46s
xstate - node (v14.15.1, x64)
Memory used546,733k (± 0.00%)546,772k (± 0.00%)+39k (+ 0.01%)546,751k546,793k
Parse Time2.59s (± 0.48%)2.59s (± 0.45%)+0.01s (+ 0.23%)2.56s2.61s
Bind Time0.96s (± 0.76%)0.97s (± 0.51%)+0.00s (+ 0.42%)0.96s0.98s
Check Time1.52s (± 0.43%)1.53s (± 0.66%)+0.01s (+ 0.53%)1.51s1.55s
Emit Time0.07s (± 4.66%)0.07s (± 4.13%)-0.00s (- 1.37%)0.07s0.08s
Total Time5.14s (± 0.25%)5.16s (± 0.34%)+0.02s (+ 0.35%)5.12s5.20s
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
Current5069110
Baselinemain10

Developer Information:

Download Benchmark

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user test suite comparing main and refs/pull/50691/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the top-repos suite comparing main and refs/pull/50691/merge:

Everything looks good!

@jakebailey

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) pack this

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 9, 2022

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the tarball bundle task on this PR at cafebee. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 9, 2022

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), 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/133815/artifacts?artifactName=tgz&fileId=7216A48E9BAEA5EEB98EDED5B285785E00C9A5CB188BF306D6D9BA5816153D6902&fileName=/typescript-4.9.0-insiders.20220909.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@4.9.0-pr-50691-11".;

@jakebailey

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) cherry-pick this to release-4.8

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 12, 2022

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the task to cherry-pick this into release-4.8 on this PR at cafebee. You can monitor the build here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), I've opened #50743 for you.

@jakebailey
Jake Bailey (jakebailey) merged commit f5f2923 into microsoft:mainSep 12, 2022
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.

TS 4.8 Generics completion is now weaker.

4 participants

@jakebailey@typescript-bot@andrewbranch@ProKashif