Skip to content

Report generic rest parameters as unreliable variance positions #33020

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

Conversation

weswigham
Copy link
Member

Fixes #32948. Only Unreliable rather than Unmeasurable since it should be that in any case where the variance result is wrong, it's because the variance is overstrict because we have more relaxed arity-based rules on the signature than tuples have.

Copy link
Collaborator

@jack-williams jack-williams left a comment

Choose a reason for hiding this comment

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

Looks good!

@jack-williams
Copy link
Collaborator

Might be worth checking DT for this. As it's Unreliable and not Unmeasurable I guess there wont be any questionable typing's that passed and now don't?

@weswigham
Copy link
Member Author

@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 2, 2019

Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at 6c13712. You can monitor the build here. It should now contribute to this PR's status checks.

@weswigham
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 18, 2019

Heya @weswigham, I've started to run the extended test suite on this PR at b47bccf. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 18, 2019

Heya @weswigham, I've started to run the perf test suite on this PR at b47bccf. You can monitor the build here. It should now contribute to this PR's status checks.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 18, 2019

Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at b47bccf. You can monitor the build here. It should now contribute to this PR's status checks.

@weswigham
Copy link
Member Author

@typescript-bot user test this 😎

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 18, 2019

Heya @weswigham, I've started to run the parallelized community code test suite on this PR at b47bccf. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..33020

Metric master 33020 Delta Best Worst
Angular - node (v12.1.0, x64)
Memory used 331,277k (± 0.02%) 331,511k (± 0.08%) +234k (+ 0.07%) 330,521k 331,759k
Parse Time 1.55s (± 0.61%) 1.56s (± 0.62%) +0.01s (+ 0.52%) 1.54s 1.58s
Bind Time 0.78s (± 0.43%) 0.78s (± 0.61%) +0.00s (+ 0.38%) 0.77s 0.79s
Check Time 4.25s (± 0.33%) 4.26s (± 0.67%) +0.01s (+ 0.19%) 4.21s 4.32s
Emit Time 5.27s (± 1.09%) 5.24s (± 0.90%) -0.03s (- 0.49%) 5.16s 5.40s
Total Time 11.85s (± 0.51%) 11.85s (± 0.62%) -0.00s (- 0.02%) 11.73s 12.07s
Monaco - node (v12.1.0, x64)
Memory used 345,950k (± 0.02%) 345,978k (± 0.02%) +28k (+ 0.01%) 345,841k 346,123k
Parse Time 1.23s (± 0.41%) 1.23s (± 0.73%) +0.00s (+ 0.08%) 1.20s 1.24s
Bind Time 0.67s (± 0.66%) 0.67s (± 0.66%) 0.00s ( 0.00%) 0.66s 0.68s
Check Time 4.25s (± 0.33%) 4.24s (± 0.48%) -0.01s (- 0.24%) 4.21s 4.28s
Emit Time 2.86s (± 0.72%) 2.83s (± 0.27%) -0.04s (- 1.22%) 2.81s 2.84s
Total Time 9.01s (± 0.17%) 8.96s (± 0.27%) -0.04s (- 0.49%) 8.90s 9.01s
TFS - node (v12.1.0, x64)
Memory used 301,448k (± 0.02%) 301,445k (± 0.02%) -4k (- 0.00%) 301,365k 301,579k
Parse Time 0.95s (± 0.65%) 0.95s (± 0.36%) -0.00s (- 0.21%) 0.94s 0.95s
Bind Time 0.62s (± 0.48%) 0.62s (± 1.04%) +0.00s (+ 0.00%) 0.61s 0.64s
Check Time 3.85s (± 0.46%) 3.85s (± 0.40%) +0.00s (+ 0.10%) 3.81s 3.89s
Emit Time 2.96s (± 1.32%) 2.96s (± 0.75%) -0.01s (- 0.24%) 2.92s 3.03s
Total Time 8.38s (± 0.44%) 8.38s (± 0.39%) -0.00s (- 0.06%) 8.30s 8.48s
Angular - node (v8.9.0, x64)
Memory used 350,147k (± 0.02%) 350,462k (± 0.01%) +315k (+ 0.09%) 350,348k 350,560k
Parse Time 2.10s (± 0.47%) 2.09s (± 0.42%) -0.01s (- 0.57%) 2.07s 2.11s
Bind Time 0.83s (± 0.48%) 0.84s (± 0.69%) +0.01s (+ 0.97%) 0.83s 0.85s
Check Time 5.10s (± 0.43%) 5.12s (± 0.36%) +0.02s (+ 0.35%) 5.08s 5.17s
Emit Time 5.98s (± 0.91%) 6.02s (± 1.05%) +0.04s (+ 0.62%) 5.91s 6.16s
Total Time 14.02s (± 0.41%) 14.07s (± 0.40%) +0.05s (+ 0.34%) 13.92s 14.17s
Monaco - node (v8.9.0, x64)
Memory used 363,726k (± 0.01%) 363,728k (± 0.01%) +2k (+ 0.00%) 363,644k 363,808k
Parse Time 1.56s (± 0.48%) 1.56s (± 0.43%) -0.00s (- 0.26%) 1.55s 1.58s
Bind Time 0.88s (± 0.70%) 0.88s (± 0.59%) +0.00s (+ 0.00%) 0.87s 0.89s
Check Time 5.15s (± 1.43%) 5.19s (± 1.69%) +0.04s (+ 0.76%) 4.95s 5.30s
Emit Time 3.05s (± 4.26%) 3.03s (± 4.36%) -0.02s (- 0.75%) 2.89s 3.33s
Total Time 10.64s (± 0.62%) 10.66s (± 0.53%) +0.01s (+ 0.10%) 10.57s 10.79s
TFS - node (v8.9.0, x64)
Memory used 317,662k (± 0.02%) 317,684k (± 0.01%) +21k (+ 0.01%) 317,599k 317,773k
Parse Time 1.26s (± 0.60%) 1.26s (± 0.59%) +0.00s (+ 0.32%) 1.25s 1.28s
Bind Time 0.68s (± 4.63%) 0.70s (± 6.06%) +0.02s (+ 2.19%) 0.66s 0.79s
Check Time 4.44s (± 1.09%) 4.42s (± 1.38%) -0.02s (- 0.38%) 4.29s 4.54s
Emit Time 3.06s (± 0.38%) 3.05s (± 0.88%) -0.01s (- 0.33%) 2.98s 3.09s
Total Time 9.45s (± 0.27%) 9.44s (± 0.34%) -0.01s (- 0.13%) 9.38s 9.53s
Angular - node (v8.9.0, x86)
Memory used 198,202k (± 0.02%) 198,395k (± 0.03%) +193k (+ 0.10%) 198,257k 198,552k
Parse Time 2.04s (± 0.57%) 2.05s (± 0.73%) +0.01s (+ 0.49%) 2.02s 2.08s
Bind Time 0.95s (± 0.38%) 0.96s (± 0.88%) +0.01s (+ 1.37%) 0.94s 0.98s
Check Time 4.64s (± 0.41%) 4.66s (± 0.51%) +0.02s (+ 0.45%) 4.62s 4.70s
Emit Time 5.69s (± 1.37%) 5.71s (± 1.07%) +0.02s (+ 0.39%) 5.56s 5.85s
Total Time 13.31s (± 0.63%) 13.38s (± 0.51%) +0.07s (+ 0.51%) 13.21s 13.50s
Monaco - node (v8.9.0, x86)
Memory used 203,245k (± 0.02%) 203,234k (± 0.01%) -11k (- 0.01%) 203,174k 203,285k
Parse Time 1.61s (± 0.68%) 1.61s (± 0.52%) -0.00s (- 0.12%) 1.60s 1.64s
Bind Time 0.72s (± 0.66%) 0.72s (± 0.83%) -0.00s (- 0.14%) 0.71s 0.73s
Check Time 4.89s (± 0.41%) 4.87s (± 0.59%) -0.02s (- 0.33%) 4.79s 4.95s
Emit Time 3.19s (± 0.76%) 3.15s (± 0.42%) -0.03s (- 1.07%) 3.13s 3.19s
Total Time 10.41s (± 0.43%) 10.36s (± 0.36%) -0.05s (- 0.50%) 10.26s 10.46s
TFS - node (v8.9.0, x86)
Memory used 178,569k (± 0.01%) 178,550k (± 0.02%) -19k (- 0.01%) 178,491k 178,617k
Parse Time 1.31s (± 0.68%) 1.31s (± 0.89%) -0.00s (- 0.30%) 1.29s 1.35s
Bind Time 0.64s (± 1.05%) 0.64s (± 0.78%) -0.00s (- 0.31%) 0.63s 0.65s
Check Time 4.29s (± 0.76%) 4.26s (± 0.62%) -0.02s (- 0.58%) 4.18s 4.33s
Emit Time 2.86s (± 0.61%) 2.84s (± 1.06%) -0.02s (- 0.56%) 2.74s 2.89s
Total Time 9.10s (± 0.40%) 9.05s (± 0.52%) -0.04s (- 0.49%) 8.93s 9.16s
Angular - node (v9.0.0, x64)
Memory used 349,793k (± 0.01%) 350,104k (± 0.01%) +312k (+ 0.09%) 350,023k 350,174k
Parse Time 1.82s (± 0.33%) 1.82s (± 0.71%) +0.01s (+ 0.39%) 1.79s 1.86s
Bind Time 0.77s (± 0.62%) 0.77s (± 0.64%) +0.00s (+ 0.13%) 0.77s 0.79s
Check Time 4.84s (± 0.43%) 4.83s (± 0.32%) -0.01s (- 0.21%) 4.80s 4.87s
Emit Time 5.74s (± 1.28%) 5.74s (± 0.94%) +0.00s (+ 0.03%) 5.64s 5.85s
Total Time 13.17s (± 0.58%) 13.17s (± 0.43%) 0.00s ( 0.00%) 13.07s 13.31s
Monaco - node (v9.0.0, x64)
Memory used 363,515k (± 0.02%) 363,493k (± 0.02%) -22k (- 0.01%) 363,296k 363,662k
Parse Time 1.32s (± 0.52%) 1.31s (± 0.53%) -0.01s (- 0.38%) 1.30s 1.33s
Bind Time 0.82s (± 0.89%) 0.83s (± 1.48%) +0.01s (+ 1.22%) 0.81s 0.85s
Check Time 5.09s (± 1.15%) 5.00s (± 2.00%) -0.08s (- 1.67%) 4.84s 5.19s
Emit Time 2.97s (± 4.82%) 3.11s (± 5.75%) +0.15s (+ 4.99%) 2.85s 3.38s
Total Time 10.19s (± 1.02%) 10.26s (± 0.99%) +0.07s (+ 0.65%) 10.04s 10.45s
TFS - node (v9.0.0, x64)
Memory used 317,477k (± 0.01%) 317,461k (± 0.02%) -16k (- 0.00%) 317,381k 317,684k
Parse Time 1.04s (± 0.70%) 1.04s (± 0.70%) +0.00s (+ 0.00%) 1.03s 1.06s
Bind Time 0.62s (± 0.36%) 0.62s (± 0.55%) -0.00s (- 0.32%) 0.61s 0.62s
Check Time 4.35s (± 0.37%) 4.36s (± 0.48%) +0.00s (+ 0.05%) 4.30s 4.40s
Emit Time 3.19s (± 0.39%) 3.20s (± 0.75%) +0.00s (+ 0.13%) 3.13s 3.25s
Total Time 9.21s (± 0.26%) 9.21s (± 0.37%) +0.00s (+ 0.03%) 9.14s 9.29s
Angular - node (v9.0.0, x86)
Memory used 198,395k (± 0.03%) 198,539k (± 0.03%) +144k (+ 0.07%) 198,407k 198,632k
Parse Time 1.72s (± 0.51%) 1.72s (± 0.30%) -0.00s (- 0.12%) 1.71s 1.73s
Bind Time 0.90s (± 1.04%) 0.89s (± 0.41%) -0.01s (- 0.67%) 0.89s 0.90s
Check Time 4.33s (± 0.54%) 4.33s (± 0.43%) +0.00s (+ 0.09%) 4.29s 4.37s
Emit Time 5.49s (± 0.55%) 5.52s (± 0.54%) +0.03s (+ 0.58%) 5.46s 5.60s
Total Time 12.44s (± 0.40%) 12.47s (± 0.20%) +0.03s (+ 0.25%) 12.42s 12.54s
Monaco - node (v9.0.0, x86)
Memory used 203,360k (± 0.01%) 203,390k (± 0.02%) +30k (+ 0.01%) 203,323k 203,534k
Parse Time 1.34s (± 0.76%) 1.34s (± 0.55%) +0.00s (+ 0.07%) 1.32s 1.35s
Bind Time 0.65s (± 0.77%) 0.65s (± 1.19%) +0.00s (+ 0.62%) 0.63s 0.66s
Check Time 4.69s (± 0.47%) 4.67s (± 0.59%) -0.01s (- 0.26%) 4.63s 4.76s
Emit Time 3.08s (± 0.61%) 3.08s (± 0.63%) +0.01s (+ 0.29%) 3.04s 3.13s
Total Time 9.75s (± 0.32%) 9.75s (± 0.34%) +0.00s (+ 0.03%) 9.69s 9.84s
TFS - node (v9.0.0, x86)
Memory used 178,614k (± 0.02%) 178,633k (± 0.03%) +20k (+ 0.01%) 178,545k 178,753k
Parse Time 1.07s (± 1.05%) 1.06s (± 0.49%) -0.00s (- 0.38%) 1.05s 1.07s
Bind Time 0.57s (± 0.52%) 0.57s (± 1.32%) +0.00s (+ 0.35%) 0.56s 0.60s
Check Time 4.14s (± 0.62%) 4.14s (± 0.81%) -0.00s (- 0.02%) 4.10s 4.24s
Emit Time 2.77s (± 1.05%) 2.79s (± 1.43%) +0.02s (+ 0.58%) 2.76s 2.95s
Total Time 8.56s (± 0.65%) 8.57s (± 0.68%) +0.01s (+ 0.14%) 8.48s 8.72s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-161-generic
Architecturex64
Available Memory16 GB
Available Memory9 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
  • node (v9.0.0, x64)
  • node (v9.0.0, x86)
Scenarios
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Angular - node (v9.0.0, x64)
  • Angular - node (v9.0.0, x86)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • Monaco - node (v9.0.0, x64)
  • Monaco - node (v9.0.0, x86)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • TFS - node (v9.0.0, x64)
  • TFS - node (v9.0.0, x86)
Benchmark Name Iterations
Current 33020 10
Baseline master 10

@typescript-bot
Copy link
Collaborator

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

@weswigham
Copy link
Member Author

user tests are just some updates the have yet to hit master, everything is good 🎶

@ahejlsberg sign-off would be much appreciated

@ahejlsberg
Copy link
Member

Maybe add repro from #30301 and mark that as fixed.

@weswigham weswigham merged commit 7b02c63 into microsoft:master Oct 30, 2019
@weswigham
Copy link
Member Author

cc @RyanCavanaugh you bumped this from 3.7 to 3.8 yesterday - you may port to 3.7 if you wish, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generic function with rest parameter assignability not transitive
4 participants