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

Fix global when typescript.js loaded as script #58895

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

jakebailey
Copy link
Member

Fixes #58893

Not sure why I thought this worked, but I probably just assumed that the tests passed therefore it was okay. The tests didn't actually test anything. Oops.

getters/setters have been supported ~forever, so this method is fine. We have tests which verify everything now.

@jakebailey
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 17, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
cherry-pick this to release-5.5 ✅ Started ✅ Results

@jakebailey
Copy link
Member Author

@typescript-bot perf test this

Checking startup perf, should not actually change much.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 17, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
perf test this ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

Hey, @jakebailey! I've created #58896 for you.

@typescript-bot
Copy link
Collaborator

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,242 ~ ~ ~ p=1.000 n=6
Memory used 192,737k (± 0.77%) 194,070k (± 0.91%) ~ 192,204k 195,731k p=0.065 n=6
Parse Time 1.56s (± 0.87%) 1.58s (± 0.33%) ~ 1.57s 1.58s p=0.051 n=6
Bind Time 0.87s (± 1.03%) 0.87s (± 0.94%) ~ 0.86s 0.88s p=0.550 n=6
Check Time 11.23s (± 0.25%) 11.22s (± 0.68%) ~ 11.11s 11.30s p=0.748 n=6
Emit Time 3.27s (± 0.46%) 3.29s (± 1.07%) ~ 3.25s 3.34s p=0.252 n=6
Total Time 16.93s (± 0.15%) 16.96s (± 0.52%) ~ 16.82s 17.06s p=0.378 n=6
angular-1 - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 944,104 944,104 ~ ~ ~ p=1.000 n=6
Types 407,044 407,044 ~ ~ ~ p=1.000 n=6
Memory used 1,218,280k (± 0.00%) 1,218,249k (± 0.00%) ~ 1,218,165k 1,218,300k p=0.378 n=6
Parse Time 8.00s (± 1.09%) 7.92s (± 0.48%) -0.08s (- 1.04%) 7.87s 7.95s p=0.019 n=6
Bind Time 2.25s (± 2.85%) 2.23s (± 0.49%) ~ 2.22s 2.24s p=0.678 n=6
Check Time 35.73s (± 0.34%) 35.75s (± 0.52%) ~ 35.51s 35.99s p=1.000 n=6
Emit Time 16.18s (± 0.39%) 16.09s (± 0.66%) ~ 15.90s 16.20s p=0.170 n=6
Total Time 62.16s (± 0.39%) 61.99s (± 0.36%) ~ 61.78s 62.33s p=0.230 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,132,326 2,132,326 ~ ~ ~ p=1.000 n=6
Types 926,744 926,744 ~ ~ ~ p=1.000 n=6
Memory used 2,115,270k (± 0.01%) 2,115,271k (± 0.01%) ~ 2,115,115k 2,115,455k p=1.000 n=6
Parse Time 7.88s (± 0.48%) 7.90s (± 0.26%) ~ 7.86s 7.92s p=0.422 n=6
Bind Time 2.76s (± 0.36%) 2.76s (± 0.27%) ~ 2.75s 2.77s p=0.554 n=6
Check Time 83.98s (± 0.51%) 84.00s (± 0.37%) ~ 83.53s 84.38s p=0.936 n=6
Emit Time 0.16s (± 5.21%) 0.16s (± 3.29%) ~ 0.15s 0.16s p=0.929 n=6
Total Time 94.78s (± 0.45%) 94.81s (± 0.32%) ~ 94.35s 95.17s p=0.810 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,230,981 1,230,981 ~ ~ ~ p=1.000 n=6
Types 261,257 261,257 ~ ~ ~ p=1.000 n=6
Memory used 2,346,645k (± 0.03%) 2,356,791k (± 1.01%) ~ 2,346,232k 2,405,548k p=0.173 n=6
Parse Time 7.44s (± 0.45%) 7.41s (± 0.91%) ~ 7.32s 7.51s p=0.298 n=6
Bind Time 2.80s (± 0.61%) 2.79s (± 0.87%) ~ 2.76s 2.82s p=0.872 n=6
Check Time 49.26s (± 0.24%) 49.37s (± 0.23%) ~ 49.19s 49.48s p=0.093 n=6
Emit Time 4.04s (± 5.96%) 3.89s (± 2.47%) ~ 3.78s 4.04s p=0.521 n=6
Total Time 63.53s (± 0.33%) 63.48s (± 0.35%) ~ 63.26s 63.76s p=0.575 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,230,981 1,230,981 ~ ~ ~ p=1.000 n=6
Types 261,257 261,257 ~ ~ ~ p=1.000 n=6
Memory used 2,421,383k (± 0.04%) 2,422,468k (± 0.04%) ~ 2,420,887k 2,423,144k p=0.066 n=6
Parse Time 5.19s (± 0.49%) 5.18s (± 0.54%) ~ 5.15s 5.22s p=0.574 n=6
Bind Time 1.69s (± 0.96%) 1.69s (± 1.70%) ~ 1.64s 1.72s p=0.681 n=6
Check Time 34.32s (± 0.22%) 34.31s (± 0.30%) ~ 34.11s 34.40s p=0.688 n=6
Emit Time 2.77s (± 2.80%) 2.64s (± 0.70%) 🟩-0.13s (- 4.74%) 2.62s 2.67s p=0.005 n=6
Total Time 43.99s (± 0.34%) 43.84s (± 0.28%) ~ 43.63s 43.99s p=0.093 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 258,670 258,670 ~ ~ ~ p=1.000 n=6
Types 104,901 104,901 ~ ~ ~ p=1.000 n=6
Memory used 428,259k (± 0.00%) 428,288k (± 0.01%) ~ 428,252k 428,353k p=0.261 n=6
Parse Time 4.09s (± 0.83%) 4.11s (± 0.90%) ~ 4.07s 4.17s p=0.628 n=6
Bind Time 1.59s (± 1.17%) 1.60s (± 0.79%) ~ 1.58s 1.62s p=0.461 n=6
Check Time 22.09s (± 0.45%) 22.11s (± 0.24%) ~ 22.05s 22.17s p=1.000 n=6
Emit Time 1.73s (± 1.08%) 1.74s (± 0.73%) ~ 1.72s 1.75s p=0.217 n=6
Total Time 29.50s (± 0.41%) 29.55s (± 0.21%) ~ 29.45s 29.63s p=0.173 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 35 35 ~ ~ ~ p=1.000 n=6
Symbols 224,565 224,565 ~ ~ ~ p=1.000 n=6
Types 93,734 93,734 ~ ~ ~ p=1.000 n=6
Memory used 369,503k (± 0.02%) 369,532k (± 0.03%) ~ 369,373k 369,642k p=0.575 n=6
Parse Time 3.45s (± 0.88%) 3.44s (± 1.27%) ~ 3.39s 3.51s p=0.574 n=6
Bind Time 1.94s (± 0.68%) 1.94s (± 1.25%) ~ 1.91s 1.97s p=0.681 n=6
Check Time 19.13s (± 0.39%) 19.15s (± 0.35%) ~ 19.06s 19.22s p=0.688 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.52s (± 0.26%) 24.52s (± 0.24%) ~ 24.46s 24.60s p=0.872 n=6
vscode - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,861,290 2,861,290 ~ ~ ~ p=1.000 n=6
Types 969,811 969,811 ~ ~ ~ p=1.000 n=6
Memory used 3,025,465k (± 0.00%) 3,025,426k (± 0.00%) ~ 3,025,312k 3,025,502k p=0.378 n=6
Parse Time 13.58s (± 0.36%) 13.59s (± 0.15%) ~ 13.56s 13.61s p=0.295 n=6
Bind Time 4.15s (± 0.28%) 4.16s (± 0.28%) ~ 4.15s 4.18s p=0.187 n=6
Check Time 72.86s (± 0.16%) 72.89s (± 0.52%) ~ 72.25s 73.20s p=0.378 n=6
Emit Time 23.94s (± 0.46%) 23.98s (± 0.47%) ~ 23.86s 24.10s p=0.746 n=6
Total Time 114.53s (± 0.15%) 114.63s (± 0.32%) ~ 114.07s 115.05s p=0.575 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 266,914 266,914 ~ ~ ~ p=1.000 n=6
Types 108,685 108,685 ~ ~ ~ p=1.000 n=6
Memory used 411,324k (± 0.03%) 411,315k (± 0.02%) ~ 411,258k 411,462k p=0.873 n=6
Parse Time 3.81s (± 0.59%) 3.81s (± 0.50%) ~ 3.79s 3.83s p=0.806 n=6
Bind Time 1.70s (± 1.26%) 1.69s (± 0.45%) ~ 1.68s 1.70s p=0.437 n=6
Check Time 16.84s (± 0.30%) 16.82s (± 0.20%) ~ 16.77s 16.86s p=0.290 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.36s (± 0.14%) 22.32s (± 0.19%) ~ 22.28s 22.39s p=0.227 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 523,429 523,429 ~ ~ ~ p=1.000 n=6
Types 177,955 177,955 ~ ~ ~ p=1.000 n=6
Memory used 461,411k (± 0.07%) 461,623k (± 0.07%) ~ 461,034k 462,015k p=0.471 n=6
Parse Time 3.17s (± 0.73%) 3.17s (± 0.66%) ~ 3.15s 3.21s p=0.871 n=6
Bind Time 1.19s (± 0.34%) 1.19s (± 0.69%) ~ 1.18s 1.20s p=0.206 n=6
Check Time 18.10s (± 0.78%) 18.11s (± 0.25%) ~ 18.03s 18.16s p=0.936 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.46s (± 0.65%) 22.47s (± 0.21%) ~ 22.38s 22.51s p=0.809 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 3,422ms (± 0.44%) 3,421ms (± 0.39%) ~ 3,400ms 3,437ms p=1.000 n=6
Req 2 - geterr 7,474ms (± 0.39%) 7,474ms (± 0.73%) ~ 7,407ms 7,535ms p=0.936 n=6
Req 3 - references 394ms (± 0.94%) 399ms (± 0.54%) ~ 397ms 402ms p=0.063 n=6
Req 4 - navto 345ms (± 0.99%) 340ms (± 0.72%) -5ms (- 1.40%) 335ms 341ms p=0.038 n=6
Req 5 - completionInfo count 1,357 1,357 ~ ~ ~ p=1.000 n=6
Req 5 - completionInfo 125ms (± 3.75%) 126ms (± 5.65%) ~ 113ms 131ms p=0.808 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,947ms (± 3.89%) 3,060ms (± 9.48%) ~ 2,883ms 3,624ms p=0.810 n=6
Req 2 - geterr 5,073ms (±11.29%) 4,873ms (±10.83%) ~ 4,515ms 5,569ms p=0.173 n=6
Req 3 - references 405ms (± 6.21%) 402ms (± 8.20%) ~ 335ms 418ms p=1.000 n=6
Req 4 - navto 338ms (± 0.22%) 339ms (± 3.60%) ~ 323ms 361ms p=1.000 n=6
Req 5 - completionInfo count 1,519 1,519 ~ ~ ~ p=1.000 n=6
Req 5 - completionInfo 111ms (± 6.75%) 115ms (± 7.01%) ~ 109ms 126ms p=0.624 n=6
xstate-main-1-tsserver - node (v18.15.0, x64)
Req 1 - updateOpen 7,643ms (± 0.26%) 7,626ms (± 0.45%) ~ 7,589ms 7,667ms p=0.689 n=6
Req 2 - geterr 1,682ms (± 0.55%) 1,700ms (± 1.42%) ~ 1,663ms 1,734ms p=0.093 n=6
Req 3 - references 112ms (± 0.98%) 117ms (± 5.01%) ~ 111ms 123ms p=0.157 n=6
Req 4 - navto 586ms (± 2.62%) 581ms (± 0.98%) ~ 572ms 589ms p=0.470 n=6
Req 5 - completionInfo count 3,413 3,413 ~ ~ ~ p=1.000 n=6
Req 5 - completionInfo 1,239ms (± 1.60%) 1,236ms (± 3.18%) ~ 1,187ms 1,300ms p=0.689 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstate-main-1-tsserver - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v18.15.0, x64)
Execution time 229.24ms (± 0.17%) 229.44ms (± 0.18%) +0.20ms (+ 0.09%) 227.19ms 233.20ms p=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 295.81ms (± 0.29%) 295.87ms (± 0.26%) ~ 288.57ms 300.09ms p=0.303 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 288.06ms (± 0.28%) 288.07ms (± 0.29%) ~ 281.21ms 296.56ms p=0.914 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 288.01ms (± 0.29%) 287.91ms (± 0.29%) ~ 280.37ms 294.29ms p=0.062 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@jakebailey jakebailey merged commit ed81ca6 into microsoft:main Jun 17, 2024
28 checks passed
@jakebailey jakebailey deleted the fix-58893 branch June 17, 2024 21:07
@jakebailey
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 17, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
cherry-pick this to release-5.5 ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

Hey, @jakebailey! I've updated #58896 for you.

@jakebailey
Copy link
Member Author

@typescript-bot pack this

dunno if this works on merged PRs...

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 17, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
pack this ✅ Started

@jakebailey
Copy link
Member Author

nope

jakebailey added a commit that referenced this pull request Jun 18, 2024
…e-5.5 (#58896)

Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

ts object has no properties when loading typescript.js in a browser with v5.5-rc
3 participants