Skip to content

Conversation

@jakebailey
Copy link
Member

@jakebailey jakebailey commented Sep 8, 2022

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.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Sep 8, 2022
@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 test top100

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 8, 2022

Heya @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
Copy link
Collaborator

typescript-bot commented Sep 8, 2022

Heya @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
Copy link
Collaborator

typescript-bot commented Sep 8, 2022

Heya @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
Copy link
Collaborator

typescript-bot commented Sep 8, 2022

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 8, 2022

Heya @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
Collaborator

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

Here they are:

Comparison Report - main..50691

Metric main 50691 Delta Best Worst
Angular - node (v14.15.1, x64)
Memory used 338,845k (± 0.01%) 338,826k (± 0.01%) -19k (- 0.01%) 338,742k 338,890k
Parse Time 2.08s (± 1.54%) 2.06s (± 0.84%) -0.02s (- 0.91%) 2.03s 2.11s
Bind Time 0.79s (± 0.70%) 0.80s (± 0.62%) +0.00s (+ 0.51%) 0.79s 0.81s
Check Time 5.81s (± 0.63%) 5.83s (± 0.70%) +0.02s (+ 0.34%) 5.75s 5.91s
Emit Time 6.19s (± 0.89%) 6.14s (± 0.56%) -0.05s (- 0.76%) 6.10s 6.23s
Total Time 14.87s (± 0.70%) 14.83s (± 0.42%) -0.04s (- 0.26%) 14.68s 14.98s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,974k (± 0.39%) 192,551k (± 0.13%) -423k (- 0.22%) 191,544k 192,741k
Parse Time 0.86s (± 0.80%) 0.85s (± 0.61%) -0.01s (- 0.82%) 0.84s 0.86s
Bind Time 0.48s (± 0.77%) 0.49s (± 0.98%) +0.00s (+ 0.41%) 0.48s 0.50s
Check Time 6.71s (± 0.56%) 6.73s (± 0.39%) +0.02s (+ 0.36%) 6.66s 6.79s
Emit Time 2.42s (± 0.62%) 2.41s (± 0.98%) -0.00s (- 0.21%) 2.36s 2.46s
Total Time 10.46s (± 0.38%) 10.48s (± 0.40%) +0.02s (+ 0.17%) 10.36s 10.55s
Monaco - node (v14.15.1, x64)
Memory used 326,520k (± 0.01%) 326,516k (± 0.01%) -4k (- 0.00%) 326,476k 326,569k
Parse Time 1.57s (± 0.32%) 1.57s (± 0.84%) +0.01s (+ 0.45%) 1.56s 1.62s
Bind Time 0.72s (± 0.83%) 0.72s (± 0.41%) -0.00s (- 0.41%) 0.72s 0.73s
Check Time 5.70s (± 0.57%) 5.71s (± 0.51%) +0.01s (+ 0.11%) 5.66s 5.79s
Emit Time 3.30s (± 0.84%) 3.32s (± 1.00%) +0.01s (+ 0.33%) 3.25s 3.39s
Total Time 11.30s (± 0.46%) 11.31s (± 0.48%) +0.02s (+ 0.15%) 11.20s 11.43s
TFS - node (v14.15.1, x64)
Memory used 289,667k (± 0.00%) 289,647k (± 0.01%) -20k (- 0.01%) 289,602k 289,685k
Parse Time 1.30s (± 0.57%) 1.31s (± 0.66%) +0.01s (+ 0.62%) 1.29s 1.32s
Bind Time 0.79s (± 0.38%) 0.79s (± 0.62%) +0.01s (+ 0.76%) 0.79s 0.81s
Check Time 5.35s (± 0.32%) 5.35s (± 0.45%) -0.00s (- 0.04%) 5.29s 5.40s
Emit Time 3.57s (± 0.77%) 3.57s (± 0.69%) +0.01s (+ 0.20%) 3.52s 3.63s
Total Time 11.01s (± 0.33%) 11.02s (± 0.37%) +0.02s (+ 0.14%) 10.95s 11.11s
material-ui - node (v14.15.1, x64)
Memory used 436,372k (± 0.04%) 436,494k (± 0.00%) +122k (+ 0.03%) 436,446k 436,526k
Parse Time 1.86s (± 0.56%) 1.86s (± 0.60%) -0.00s (- 0.16%) 1.84s 1.89s
Bind Time 0.58s (± 0.82%) 0.58s (± 0.81%) -0.00s (- 0.51%) 0.57s 0.59s
Check Time 12.89s (± 0.41%) 12.84s (± 0.51%) -0.05s (- 0.40%) 12.74s 13.02s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.34s (± 0.34%) 15.28s (± 0.47%) -0.06s (- 0.37%) 15.18s 15.46s
xstate - node (v14.15.1, x64)
Memory used 546,733k (± 0.00%) 546,772k (± 0.00%) +39k (+ 0.01%) 546,751k 546,793k
Parse Time 2.59s (± 0.48%) 2.59s (± 0.45%) +0.01s (+ 0.23%) 2.56s 2.61s
Bind Time 0.96s (± 0.76%) 0.97s (± 0.51%) +0.00s (+ 0.42%) 0.96s 0.98s
Check Time 1.52s (± 0.43%) 1.53s (± 0.66%) +0.01s (+ 0.53%) 1.51s 1.55s
Emit Time 0.07s (± 4.66%) 0.07s (± 4.13%) -0.00s (- 1.37%) 0.07s 0.08s
Total Time 5.14s (± 0.25%) 5.16s (± 0.34%) +0.02s (+ 0.35%) 5.12s 5.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)
Benchmark Name Iterations
Current 50691 10
Baseline main 10

Developer Information:

Download Benchmark

@typescript-bot
Copy link
Collaborator

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

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

Everything looks good!

@jakebailey
Copy link
Member Author

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 9, 2022

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 9, 2022

Hey @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/[email protected]".;

@andrewbranch andrewbranch added this to the TypeScript 4.8.4 milestone Sep 12, 2022
@jakebailey
Copy link
Member Author

@typescript-bot cherry-pick this to release-4.8

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 12, 2022

Heya @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
Collaborator

Hey @jakebailey, I've opened #50743 for you.

@jakebailey jakebailey merged commit f5f2923 into microsoft:main Sep 12, 2022
@jakebailey jakebailey deleted the fix-50680 branch September 12, 2022 22:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

TS 4.8 Generics completion is now weaker.

4 participants