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

Properly handle private/protected members in unions of object types #38277

Merged
merged 3 commits into from
May 4, 2020

Conversation

ahejlsberg
Copy link
Member

Fixes #38236.

@DanielRosenwasser
Copy link
Member

@typescript-bot test this
@typescript-bot user test this
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 30, 2020

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 30, 2020

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 30, 2020

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

Update: The results are in!

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

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..38277

Metric master 38277 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 328,163k (± 0.02%) 327,601k (± 0.03%) -562k (- 0.17%) 327,338k 327,846k
Parse Time 1.64s (± 0.41%) 1.64s (± 0.57%) -0.00s (- 0.12%) 1.62s 1.66s
Bind Time 0.90s (± 0.54%) 0.90s (± 0.86%) -0.00s (- 0.33%) 0.89s 0.92s
Check Time 4.81s (± 0.47%) 4.81s (± 0.69%) +0.00s (+ 0.08%) 4.73s 4.87s
Emit Time 5.40s (± 0.77%) 5.40s (± 0.49%) -0.01s (- 0.13%) 5.34s 5.46s
Total Time 12.75s (± 0.26%) 12.74s (± 0.43%) -0.01s (- 0.05%) 12.64s 12.88s
Monaco - node (v10.16.3, x64)
Memory used 327,203k (± 0.02%) 327,195k (± 0.02%) -8k (- 0.00%) 327,045k 327,312k
Parse Time 1.27s (± 0.45%) 1.26s (± 0.38%) -0.01s (- 0.55%) 1.25s 1.27s
Bind Time 0.78s (± 0.57%) 0.78s (± 0.51%) -0.00s (- 0.13%) 0.77s 0.79s
Check Time 4.79s (± 0.41%) 4.80s (± 0.35%) +0.00s (+ 0.10%) 4.75s 4.83s
Emit Time 2.94s (± 0.86%) 2.94s (± 0.87%) +0.00s (+ 0.03%) 2.88s 2.98s
Total Time 9.78s (± 0.33%) 9.78s (± 0.38%) +0.00s (+ 0.01%) 9.67s 9.86s
TFS - node (v10.16.3, x64)
Memory used 292,255k (± 0.02%) 292,256k (± 0.02%) +1k (+ 0.00%) 292,140k 292,382k
Parse Time 0.96s (± 0.49%) 0.96s (± 0.62%) +0.00s (+ 0.42%) 0.95s 0.98s
Bind Time 0.75s (± 0.80%) 0.75s (± 1.10%) +0.01s (+ 1.07%) 0.73s 0.77s
Check Time 4.36s (± 0.44%) 4.34s (± 0.32%) -0.03s (- 0.57%) 4.30s 4.36s
Emit Time 3.10s (± 0.73%) 3.10s (± 1.07%) 0.00s ( 0.00%) 3.05s 3.18s
Total Time 9.17s (± 0.31%) 9.15s (± 0.49%) -0.02s (- 0.16%) 9.06s 9.25s
material-ui - node (v10.16.3, x64)
Memory used 449,315k (± 0.01%) 449,052k (± 0.02%) -263k (- 0.06%) 448,823k 449,186k
Parse Time 1.78s (± 0.37%) 1.78s (± 0.51%) -0.00s (- 0.06%) 1.76s 1.80s
Bind Time 0.70s (± 0.88%) 0.70s (± 0.88%) 0.00s ( 0.00%) 0.69s 0.71s
Check Time 12.58s (± 0.70%) 12.54s (± 0.86%) -0.03s (- 0.25%) 12.34s 12.91s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.06s (± 0.59%) 15.03s (± 0.77%) -0.03s (- 0.22%) 14.82s 15.41s
Angular - node (v12.1.0, x64)
Memory used 303,637k (± 0.02%) 303,175k (± 0.02%) -461k (- 0.15%) 303,019k 303,308k
Parse Time 1.59s (± 0.46%) 1.59s (± 0.60%) -0.00s (- 0.13%) 1.56s 1.60s
Bind Time 0.89s (± 1.13%) 0.88s (± 0.51%) -0.01s (- 1.34%) 0.87s 0.89s
Check Time 4.71s (± 0.37%) 4.69s (± 0.36%) -0.02s (- 0.45%) 4.65s 4.73s
Emit Time 5.54s (± 0.54%) 5.55s (± 0.97%) +0.01s (+ 0.18%) 5.47s 5.73s
Total Time 12.73s (± 0.33%) 12.70s (± 0.49%) -0.03s (- 0.20%) 12.58s 12.86s
Monaco - node (v12.1.0, x64)
Memory used 307,238k (± 0.02%) 307,182k (± 0.02%) -55k (- 0.02%) 307,078k 307,316k
Parse Time 1.23s (± 0.57%) 1.21s (± 0.62%) -0.02s (- 1.22%) 1.20s 1.23s
Bind Time 0.75s (± 0.99%) 0.76s (± 0.79%) +0.00s (+ 0.27%) 0.74s 0.77s
Check Time 4.63s (± 0.54%) 4.62s (± 0.37%) -0.01s (- 0.22%) 4.58s 4.65s
Emit Time 2.99s (± 0.62%) 3.00s (± 0.89%) +0.01s (+ 0.30%) 2.97s 3.08s
Total Time 9.61s (± 0.37%) 9.59s (± 0.41%) -0.02s (- 0.16%) 9.53s 9.69s
TFS - node (v12.1.0, x64)
Memory used 274,560k (± 0.02%) 274,612k (± 0.02%) +52k (+ 0.02%) 274,498k 274,829k
Parse Time 0.93s (± 0.60%) 0.93s (± 0.56%) -0.00s (- 0.11%) 0.92s 0.94s
Bind Time 0.72s (± 1.32%) 0.73s (± 0.92%) +0.00s (+ 0.28%) 0.71s 0.74s
Check Time 4.24s (± 0.34%) 4.25s (± 0.48%) +0.00s (+ 0.12%) 4.19s 4.28s
Emit Time 3.12s (± 1.54%) 3.15s (± 1.62%) +0.03s (+ 1.12%) 3.07s 3.31s
Total Time 9.02s (± 0.54%) 9.06s (± 0.50%) +0.04s (+ 0.44%) 8.98s 9.16s
material-ui - node (v12.1.0, x64)
Memory used 426,721k (± 0.02%) 426,464k (± 0.02%) -257k (- 0.06%) 426,239k 426,570k
Parse Time 1.76s (± 0.42%) 1.75s (± 0.57%) -0.01s (- 0.51%) 1.73s 1.78s
Bind Time 0.64s (± 0.76%) 0.65s (± 1.17%) +0.00s (+ 0.31%) 0.63s 0.67s
Check Time 11.11s (± 0.48%) 11.16s (± 0.31%) +0.06s (+ 0.52%) 11.11s 11.28s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 13.51s (± 0.44%) 13.56s (± 0.23%) +0.05s (+ 0.35%) 13.51s 13.66s
Angular - node (v8.9.0, x64)
Memory used 323,093k (± 0.01%) 322,604k (± 0.01%) -489k (- 0.15%) 322,558k 322,682k
Parse Time 2.13s (± 0.46%) 2.13s (± 0.64%) -0.00s (- 0.05%) 2.10s 2.17s
Bind Time 0.94s (± 0.87%) 0.94s (± 0.81%) -0.00s (- 0.43%) 0.92s 0.96s
Check Time 5.36s (± 1.84%) 5.43s (± 1.79%) +0.07s (+ 1.29%) 5.26s 5.59s
Emit Time 6.35s (± 1.65%) 6.35s (± 0.89%) -0.01s (- 0.11%) 6.24s 6.50s
Total Time 14.78s (± 0.75%) 14.84s (± 0.48%) +0.06s (+ 0.39%) 14.72s 15.04s
Monaco - node (v8.9.0, x64)
Memory used 325,821k (± 0.01%) 325,821k (± 0.01%) -0k (- 0.00%) 325,709k 325,944k
Parse Time 1.56s (± 0.49%) 1.55s (± 0.57%) -0.00s (- 0.19%) 1.54s 1.58s
Bind Time 0.92s (± 1.48%) 0.92s (± 2.03%) -0.00s (- 0.22%) 0.89s 0.98s
Check Time 5.41s (± 0.38%) 5.44s (± 0.64%) +0.03s (+ 0.48%) 5.37s 5.54s
Emit Time 3.50s (± 0.42%) 3.53s (± 0.64%) +0.03s (+ 0.77%) 3.46s 3.58s
Total Time 11.38s (± 0.21%) 11.43s (± 0.38%) +0.05s (+ 0.44%) 11.34s 11.54s
TFS - node (v8.9.0, x64)
Memory used 291,839k (± 0.01%) 291,826k (± 0.01%) -13k (- 0.00%) 291,722k 291,903k
Parse Time 1.27s (± 0.41%) 1.26s (± 0.62%) -0.01s (- 0.79%) 1.25s 1.28s
Bind Time 0.76s (± 0.53%) 0.76s (± 1.00%) -0.00s (- 0.40%) 0.74s 0.77s
Check Time 5.05s (± 1.61%) 5.03s (± 2.01%) -0.03s (- 0.51%) 4.87s 5.23s
Emit Time 3.24s (± 2.38%) 3.25s (± 2.81%) +0.01s (+ 0.28%) 3.08s 3.47s
Total Time 10.32s (± 0.29%) 10.29s (± 0.50%) -0.03s (- 0.27%) 10.19s 10.41s
material-ui - node (v8.9.0, x64)
Memory used 452,273k (± 0.03%) 451,886k (± 0.02%) -387k (- 0.09%) 451,744k 452,070k
Parse Time 2.13s (± 0.52%) 2.12s (± 0.63%) -0.00s (- 0.14%) 2.09s 2.15s
Bind Time 0.83s (± 0.90%) 0.82s (± 0.89%) -0.01s (- 1.32%) 0.81s 0.84s
Check Time 16.79s (± 0.79%) 16.72s (± 1.28%) -0.07s (- 0.39%) 16.38s 17.25s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 19.75s (± 0.70%) 19.67s (± 1.08%) -0.08s (- 0.39%) 19.34s 20.22s
Angular - node (v8.9.0, x86)
Memory used 186,084k (± 0.02%) 185,819k (± 0.04%) -265k (- 0.14%) 185,687k 185,965k
Parse Time 2.06s (± 0.68%) 2.07s (± 0.85%) +0.01s (+ 0.34%) 2.04s 2.12s
Bind Time 1.08s (± 0.48%) 1.09s (± 0.96%) +0.01s (+ 0.83%) 1.07s 1.11s
Check Time 5.01s (± 0.51%) 5.06s (± 0.94%) +0.04s (+ 0.88%) 4.97s 5.19s
Emit Time 6.10s (± 1.27%) 6.13s (± 0.58%) +0.03s (+ 0.44%) 6.06s 6.22s
Total Time 14.26s (± 0.50%) 14.34s (± 0.62%) +0.09s (+ 0.60%) 14.16s 14.63s
Monaco - node (v8.9.0, x86)
Memory used 185,620k (± 0.03%) 185,597k (± 0.01%) -23k (- 0.01%) 185,553k 185,645k
Parse Time 1.60s (± 0.66%) 1.61s (± 1.18%) +0.01s (+ 0.75%) 1.58s 1.68s
Bind Time 0.78s (± 1.07%) 0.77s (± 0.80%) -0.00s (- 0.64%) 0.76s 0.78s
Check Time 5.42s (± 0.33%) 5.45s (± 0.46%) +0.03s (+ 0.59%) 5.40s 5.50s
Emit Time 2.89s (± 0.63%) 2.89s (± 0.80%) +0.01s (+ 0.21%) 2.85s 2.96s
Total Time 10.68s (± 0.21%) 10.73s (± 0.56%) +0.04s (+ 0.40%) 10.63s 10.89s
TFS - node (v8.9.0, x86)
Memory used 167,157k (± 0.03%) 167,145k (± 0.02%) -12k (- 0.01%) 167,068k 167,198k
Parse Time 1.29s (± 0.53%) 1.30s (± 0.80%) +0.00s (+ 0.31%) 1.28s 1.32s
Bind Time 0.72s (± 1.06%) 0.72s (± 0.77%) +0.00s (+ 0.28%) 0.71s 0.73s
Check Time 4.66s (± 0.48%) 4.67s (± 0.48%) +0.01s (+ 0.26%) 4.63s 4.74s
Emit Time 3.02s (± 3.03%) 2.99s (± 2.27%) -0.04s (- 1.16%) 2.88s 3.24s
Total Time 9.69s (± 1.00%) 9.68s (± 0.67%) -0.02s (- 0.20%) 9.53s 9.89s
material-ui - node (v8.9.0, x86)
Memory used 256,107k (± 0.01%) 255,979k (± 0.01%) -128k (- 0.05%) 255,886k 256,029k
Parse Time 2.18s (± 0.44%) 2.19s (± 0.72%) +0.00s (+ 0.18%) 2.17s 2.24s
Bind Time 0.70s (± 1.20%) 0.69s (± 1.08%) -0.01s (- 1.14%) 0.68s 0.71s
Check Time 15.31s (± 0.76%) 15.28s (± 0.66%) -0.03s (- 0.22%) 15.07s 15.47s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 18.20s (± 0.68%) 18.16s (± 0.52%) -0.04s (- 0.19%) 17.97s 18.34s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v8.9.0, x64)
  • material-ui - node (v8.9.0, x86)
Benchmark Name Iterations
Current 38277 10
Baseline master 10

@ahejlsberg ahejlsberg merged commit e6390ef into master May 4, 2020
@ahejlsberg ahejlsberg deleted the fix38236 branch May 4, 2020 22:28
@DanielRosenwasser DanielRosenwasser restored the fix38236 branch May 4, 2020 22:37
@DanielRosenwasser
Copy link
Member

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 4, 2020

Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into release-3.9 on this PR at 806cf90. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

Hey @DanielRosenwasser, I couldn't open a PR with the cherry-pick. (You can check the log here). You may need to squash and pick this PR into release-3.9 manually.

@DanielRosenwasser
Copy link
Member

@ahejlsberg I guess we shouldn't pull in before cherry-picking, the bot doesn't seem to like that. @weswigham any way to fix this that isn't manual?

@DanielRosenwasser DanielRosenwasser deleted the fix38236 branch May 4, 2020 22:58
@DanielRosenwasser
Copy link
Member

Ugh, it was a merge conflict...

@weswigham
Copy link
Member

Pulling in berfore cherry-picking is usually fine so long as the branch wasn't deleted (and then restored) in the meantime, as I think Github removes the merge reference when the branch is deleted (and has no reason to restore it alongside the branch, as the "new branch" has no active PR).

DanielRosenwasser pushed a commit that referenced this pull request May 4, 2020
…38277)

* Property handle private/protected properties in unions of object types

* Add regression test
DanielRosenwasser added a commit that referenced this pull request May 7, 2020
…38277) (#38334)

* Property handle private/protected properties in unions of object types

* Add regression test

Co-authored-by: Anders Hejlsberg <andersh@microsoft.com>
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.

Unexpected intersection type constraint error related to union, generic type and private field
5 participants