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

Variance annotations on class expressions + deferred valiation #48645

Merged
merged 2 commits into from
Apr 12, 2022

Conversation

ahejlsberg
Copy link
Member

Fixes #48618.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Apr 11, 2022
@DanielRosenwasser
Copy link
Member

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 11, 2022

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 11, 2022

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 11, 2022

Heya @DanielRosenwasser, I've started to run the parallelized community code test suite on this PR at 838393e. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 11, 2022

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 11, 2022

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

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - main..48645

Metric main 48645 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 357,313k (± 0.02%) 357,291k (± 0.02%) -23k (- 0.01%) 357,167k 357,448k
Parse Time 2.07s (± 0.34%) 2.07s (± 0.53%) -0.00s (- 0.05%) 2.04s 2.10s
Bind Time 0.86s (± 0.85%) 0.86s (± 1.00%) +0.00s (+ 0.47%) 0.84s 0.88s
Check Time 5.83s (± 0.36%) 5.83s (± 0.67%) -0.01s (- 0.10%) 5.75s 5.93s
Emit Time 6.02s (± 0.79%) 5.99s (± 0.60%) -0.03s (- 0.48%) 5.90s 6.04s
Total Time 14.78s (± 0.47%) 14.75s (± 0.53%) -0.03s (- 0.22%) 14.59s 14.88s
Compiler-Unions - node (v10.16.3, x64)
Memory used 205,875k (± 0.03%) 205,857k (± 0.02%) -17k (- 0.01%) 205,746k 205,927k
Parse Time 0.84s (± 0.73%) 0.84s (± 0.43%) +0.00s (+ 0.36%) 0.84s 0.85s
Bind Time 0.51s (± 0.93%) 0.52s (± 1.12%) +0.00s (+ 0.78%) 0.51s 0.53s
Check Time 7.91s (± 0.63%) 7.91s (± 0.56%) -0.00s (- 0.06%) 7.78s 7.98s
Emit Time 2.50s (± 1.10%) 2.51s (± 0.95%) +0.01s (+ 0.28%) 2.45s 2.57s
Total Time 11.77s (± 0.60%) 11.78s (± 0.44%) +0.01s (+ 0.07%) 11.63s 11.87s
Monaco - node (v10.16.3, x64)
Memory used 343,712k (± 0.02%) 343,773k (± 0.02%) +61k (+ 0.02%) 343,651k 343,896k
Parse Time 1.57s (± 0.67%) 1.58s (± 0.60%) +0.01s (+ 0.57%) 1.56s 1.60s
Bind Time 0.76s (± 0.87%) 0.76s (± 0.59%) -0.00s (- 0.26%) 0.75s 0.77s
Check Time 5.79s (± 0.41%) 5.79s (± 0.58%) -0.01s (- 0.14%) 5.72s 5.85s
Emit Time 3.24s (± 0.47%) 3.24s (± 0.70%) -0.00s (- 0.03%) 3.21s 3.30s
Total Time 11.37s (± 0.26%) 11.37s (± 0.48%) -0.00s (- 0.01%) 11.29s 11.50s
TFS - node (v10.16.3, x64)
Memory used 305,334k (± 0.03%) 305,373k (± 0.01%) +38k (+ 0.01%) 305,265k 305,452k
Parse Time 1.29s (± 0.89%) 1.29s (± 0.52%) -0.01s (- 0.46%) 1.27s 1.30s
Bind Time 0.71s (± 0.70%) 0.72s (± 0.69%) +0.00s (+ 0.14%) 0.71s 0.73s
Check Time 5.25s (± 0.50%) 5.24s (± 0.62%) -0.01s (- 0.11%) 5.18s 5.31s
Emit Time 3.43s (± 1.07%) 3.40s (± 1.66%) -0.04s (- 1.08%) 3.32s 3.55s
Total Time 10.69s (± 0.40%) 10.65s (± 0.76%) -0.05s (- 0.44%) 10.53s 10.85s
material-ui - node (v10.16.3, x64)
Memory used 470,406k (± 0.01%) 470,471k (± 0.01%) +66k (+ 0.01%) 470,349k 470,574k
Parse Time 1.83s (± 0.52%) 1.83s (± 0.38%) +0.00s (+ 0.16%) 1.82s 1.84s
Bind Time 0.67s (± 0.71%) 0.68s (± 0.66%) +0.01s (+ 0.74%) 0.67s 0.69s
Check Time 14.32s (± 0.62%) 14.30s (± 0.45%) -0.02s (- 0.17%) 14.20s 14.46s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.82s (± 0.53%) 16.81s (± 0.40%) -0.01s (- 0.08%) 16.70s 16.98s
xstate - node (v10.16.3, x64)
Memory used 575,803k (± 1.26%) 572,581k (± 0.01%) -3,222k (- 0.56%) 572,498k 572,661k
Parse Time 2.59s (± 0.41%) 2.60s (± 0.48%) +0.01s (+ 0.54%) 2.56s 2.62s
Bind Time 1.01s (± 0.57%) 1.01s (± 0.36%) +0.00s (+ 0.40%) 1.01s 1.02s
Check Time 1.51s (± 0.49%) 1.53s (± 0.93%) +0.02s (+ 1.06%) 1.50s 1.55s
Emit Time 0.07s (± 0.00%) 0.07s (± 3.14%) +0.00s (+ 1.43%) 0.07s 0.08s
Total Time 5.18s (± 0.30%) 5.21s (± 0.38%) +0.04s (+ 0.70%) 5.17s 5.26s
Angular - node (v12.1.0, x64)
Memory used 335,067k (± 0.03%) 334,981k (± 0.09%) -86k (- 0.03%) 333,775k 335,192k
Parse Time 2.06s (± 0.69%) 2.08s (± 0.73%) +0.02s (+ 0.97%) 2.05s 2.12s
Bind Time 0.84s (± 0.66%) 0.84s (± 0.89%) +0.01s (+ 0.60%) 0.83s 0.87s
Check Time 5.66s (± 0.98%) 5.70s (± 0.62%) +0.04s (+ 0.64%) 5.64s 5.79s
Emit Time 6.23s (± 0.91%) 6.33s (± 0.69%) +0.10s (+ 1.62%) 6.20s 6.42s
Total Time 14.79s (± 0.36%) 14.95s (± 0.52%) +0.16s (+ 1.08%) 14.76s 15.10s
Compiler-Unions - node (v12.1.0, x64)
Memory used 193,449k (± 0.36%) 193,200k (± 0.14%) -250k (- 0.13%) 192,749k 193,710k
Parse Time 0.84s (± 1.05%) 0.85s (± 1.20%) +0.01s (+ 0.95%) 0.83s 0.88s
Bind Time 0.53s (± 0.84%) 0.54s (± 1.12%) +0.00s (+ 0.56%) 0.52s 0.55s
Check Time 7.48s (± 0.49%) 7.48s (± 0.75%) -0.00s (- 0.04%) 7.33s 7.61s
Emit Time 2.56s (± 1.24%) 2.57s (± 1.65%) +0.02s (+ 0.67%) 2.47s 2.67s
Total Time 11.42s (± 0.48%) 11.44s (± 0.77%) +0.02s (+ 0.18%) 11.18s 11.61s
Monaco - node (v12.1.0, x64)
Memory used 326,708k (± 0.02%) 326,704k (± 0.03%) -4k (- 0.00%) 326,447k 326,902k
Parse Time 1.56s (± 0.95%) 1.56s (± 0.89%) -0.00s (- 0.19%) 1.54s 1.59s
Bind Time 0.74s (± 0.60%) 0.74s (± 0.63%) +0.00s (+ 0.27%) 0.73s 0.75s
Check Time 5.63s (± 0.50%) 5.64s (± 0.55%) +0.02s (+ 0.30%) 5.59s 5.72s
Emit Time 3.25s (± 0.65%) 3.26s (± 1.16%) +0.01s (+ 0.37%) 3.21s 3.39s
Total Time 11.18s (± 0.27%) 11.21s (± 0.65%) +0.03s (+ 0.25%) 11.08s 11.40s
TFS - node (v12.1.0, x64)
Memory used 290,013k (± 0.02%) 290,018k (± 0.02%) +5k (+ 0.00%) 289,894k 290,138k
Parse Time 1.31s (± 0.91%) 1.30s (± 0.74%) -0.01s (- 0.91%) 1.29s 1.33s
Bind Time 0.70s (± 0.63%) 0.70s (± 0.97%) +0.00s (+ 0.28%) 0.69s 0.72s
Check Time 5.21s (± 0.50%) 5.20s (± 0.56%) -0.01s (- 0.13%) 5.13s 5.28s
Emit Time 3.48s (± 1.02%) 3.46s (± 0.59%) -0.01s (- 0.37%) 3.42s 3.51s
Total Time 10.70s (± 0.55%) 10.67s (± 0.32%) -0.03s (- 0.30%) 10.57s 10.74s
material-ui - node (v12.1.0, x64)
Memory used 449,498k (± 0.01%) 449,437k (± 0.01%) -61k (- 0.01%) 449,300k 449,570k
Parse Time 1.83s (± 0.52%) 1.83s (± 0.49%) +0.01s (+ 0.44%) 1.82s 1.85s
Bind Time 0.65s (± 1.04%) 0.66s (± 0.91%) +0.00s (+ 0.15%) 0.64s 0.67s
Check Time 12.92s (± 0.70%) 12.96s (± 0.43%) +0.03s (+ 0.26%) 12.82s 13.06s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.40s (± 0.66%) 15.45s (± 0.37%) +0.04s (+ 0.28%) 15.29s 15.55s
xstate - node (v12.1.0, x64)
Memory used 544,471k (± 1.73%) 538,086k (± 0.01%) -6,385k (- 1.17%) 537,987k 538,228k
Parse Time 2.52s (± 0.46%) 2.55s (± 0.53%) +0.03s (+ 1.23%) 2.52s 2.58s
Bind Time 1.04s (± 0.38%) 1.05s (± 0.74%) +0.01s (+ 0.77%) 1.03s 1.06s
Check Time 1.49s (± 0.78%) 1.48s (± 0.54%) -0.00s (- 0.20%) 1.46s 1.50s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.11s (± 0.35%) 5.15s (± 0.27%) +0.04s (+ 0.74%) 5.12s 5.18s
Angular - node (v14.15.1, x64)
Memory used 333,255k (± 0.01%) 333,306k (± 0.01%) +50k (+ 0.02%) 333,263k 333,349k
Parse Time 2.04s (± 0.73%) 2.04s (± 0.46%) +0.01s (+ 0.29%) 2.03s 2.07s
Bind Time 0.87s (± 0.46%) 0.88s (± 0.78%) +0.01s (+ 0.57%) 0.87s 0.90s
Check Time 5.62s (± 0.50%) 5.66s (± 0.36%) +0.04s (+ 0.73%) 5.61s 5.69s
Emit Time 6.31s (± 0.72%) 6.34s (± 0.75%) +0.02s (+ 0.33%) 6.20s 6.43s
Total Time 14.84s (± 0.42%) 14.91s (± 0.45%) +0.07s (+ 0.46%) 14.73s 15.05s
Compiler-Unions - node (v14.15.1, x64)
Memory used 194,310k (± 0.55%) 194,406k (± 0.57%) +96k (+ 0.05%) 192,115k 195,439k
Parse Time 0.85s (± 0.83%) 0.86s (± 0.85%) +0.01s (+ 1.06%) 0.84s 0.88s
Bind Time 0.56s (± 0.00%) 0.56s (± 0.60%) +0.00s (+ 0.54%) 0.56s 0.57s
Check Time 7.49s (± 0.66%) 7.54s (± 0.71%) +0.06s (+ 0.77%) 7.42s 7.64s
Emit Time 2.51s (± 1.16%) 2.51s (± 0.57%) -0.00s (- 0.08%) 2.48s 2.54s
Total Time 11.41s (± 0.64%) 11.47s (± 0.48%) +0.07s (+ 0.58%) 11.34s 11.59s
Monaco - node (v14.15.1, x64)
Memory used 325,456k (± 0.01%) 325,464k (± 0.00%) +8k (+ 0.00%) 325,439k 325,492k
Parse Time 1.58s (± 0.62%) 1.58s (± 0.67%) -0.00s (- 0.13%) 1.55s 1.60s
Bind Time 0.78s (± 0.86%) 0.78s (± 0.48%) -0.00s (- 0.26%) 0.77s 0.78s
Check Time 5.56s (± 0.88%) 5.53s (± 0.58%) -0.03s (- 0.54%) 5.48s 5.60s
Emit Time 3.33s (± 0.95%) 3.32s (± 0.76%) -0.01s (- 0.30%) 3.27s 3.39s
Total Time 11.24s (± 0.69%) 11.20s (± 0.49%) -0.04s (- 0.37%) 11.10s 11.30s
TFS - node (v14.15.1, x64)
Memory used 288,997k (± 0.01%) 289,034k (± 0.01%) +37k (+ 0.01%) 288,983k 289,076k
Parse Time 1.36s (± 1.27%) 1.37s (± 0.97%) +0.00s (+ 0.15%) 1.33s 1.39s
Bind Time 0.73s (± 1.03%) 0.73s (± 0.94%) -0.00s (- 0.14%) 0.72s 0.75s
Check Time 5.19s (± 0.38%) 5.21s (± 0.49%) +0.02s (+ 0.31%) 5.16s 5.26s
Emit Time 3.50s (± 1.80%) 3.47s (± 1.56%) -0.03s (- 0.77%) 3.40s 3.61s
Total Time 10.78s (± 0.54%) 10.78s (± 0.70%) -0.01s (- 0.05%) 10.66s 10.97s
material-ui - node (v14.15.1, x64)
Memory used 447,810k (± 0.01%) 447,797k (± 0.00%) -13k (- 0.00%) 447,751k 447,843k
Parse Time 1.87s (± 0.57%) 1.88s (± 0.61%) +0.01s (+ 0.32%) 1.85s 1.90s
Bind Time 0.70s (± 0.80%) 0.70s (± 0.68%) +0.01s (+ 0.72%) 0.69s 0.71s
Check Time 13.08s (± 0.79%) 13.06s (± 0.71%) -0.02s (- 0.13%) 12.92s 13.32s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.65s (± 0.69%) 15.64s (± 0.61%) -0.01s (- 0.06%) 15.48s 15.91s
xstate - node (v14.15.1, x64)
Memory used 535,823k (± 0.00%) 535,874k (± 0.00%) +51k (+ 0.01%) 535,819k 535,915k
Parse Time 2.60s (± 0.82%) 2.61s (± 0.32%) +0.01s (+ 0.42%) 2.59s 2.63s
Bind Time 1.15s (± 0.77%) 1.16s (± 1.67%) +0.01s (+ 0.96%) 1.13s 1.23s
Check Time 1.51s (± 0.54%) 1.52s (± 0.45%) +0.01s (+ 0.40%) 1.50s 1.53s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.33s (± 0.51%) 5.36s (± 0.32%) +0.03s (+ 0.51%) 5.33s 5.41s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory3 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 48645 10
Baseline main 10

Developer Information:

Download Benchmark

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

@ahejlsberg
Copy link
Member Author

@typescript-bot user test this inline

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 12, 2022

Heya @ahejlsberg, I've started to run the diff-based community code test suite on this PR at 838393e. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

@ahejlsberg ahejlsberg merged commit cce61d1 into main Apr 12, 2022
@ahejlsberg ahejlsberg deleted the fix48618 branch April 12, 2022 13:34
Jack-Works pushed a commit to Jack-Works/TypeScript that referenced this pull request Apr 22, 2022
…soft#48645)

* Variance annotations on class expressions + deferred validation

* Add regression tests
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.

Class expressions should support in and out variance modifiers
3 participants