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 constant evaluation of template string expressions #58500

Merged
merged 2 commits into from May 14, 2024
Merged

Conversation

ahejlsberg
Copy link
Member

Fixes #58494.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels May 11, 2024
@ahejlsberg
Copy link
Member Author

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 11, 2024

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

Command Status Results
test top400 ✅ Started ✅ Results
user test this ✅ Started ✅ Results
run dt ✅ Started ✅ Results
perf test this faster ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

Hey @ahejlsberg, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the user tests comparing main and refs/pull/58500/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

@ahejlsberg
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,154 62,154 ~ ~ ~ p=1.000 n=6
Types 50,248 50,248 ~ ~ ~ p=1.000 n=6
Memory used 192,287k (± 0.07%) 192,800k (± 0.76%) ~ 192,164k 195,793k p=0.748 n=6
Parse Time 1.29s (± 1.24%) 1.30s (± 1.23%) ~ 1.27s 1.31s p=0.503 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.56s (± 0.44%) 9.56s (± 0.33%) ~ 9.53s 9.61s p=1.000 n=6
Emit Time 2.64s (± 0.65%) 2.64s (± 0.81%) ~ 2.62s 2.67s p=1.000 n=6
Total Time 14.22s (± 0.27%) 14.22s (± 0.18%) ~ 14.18s 14.25s p=0.936 n=6
angular-1 - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 944,110 944,110 ~ ~ ~ p=1.000 n=6
Types 407,140 407,140 ~ ~ ~ p=1.000 n=6
Memory used 1,222,086k (± 0.01%) 1,222,078k (± 0.01%) ~ 1,221,982k 1,222,156k p=0.936 n=6
Parse Time 6.79s (± 0.53%) 6.75s (± 0.24%) ~ 6.73s 6.77s p=0.101 n=6
Bind Time 1.88s (± 0.43%) 1.88s (± 0.29%) ~ 1.87s 1.88s p=0.859 n=6
Check Time 31.24s (± 0.55%) 31.34s (± 0.67%) ~ 31.11s 31.64s p=0.521 n=6
Emit Time 14.77s (± 0.51%) 14.82s (± 0.76%) ~ 14.71s 15.03s p=1.000 n=6
Total Time 54.67s (± 0.42%) 54.79s (± 0.40%) ~ 54.43s 55.03s p=0.521 n=6
mui-docs - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 1,961,283 1,961,283 ~ ~ ~ p=1.000 n=6
Types 696,900 696,902 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 1,778,031k (± 0.00%) 1,778,041k (± 0.00%) ~ 1,778,024k 1,778,063k p=0.378 n=6
Parse Time 6.78s (± 0.29%) 6.78s (± 0.16%) ~ 6.76s 6.79s p=0.788 n=6
Bind Time 2.30s (± 0.59%) 2.31s (± 0.69%) ~ 2.28s 2.32s p=0.057 n=6
Check Time 57.07s (± 0.58%) 57.28s (± 0.53%) ~ 56.81s 57.69s p=0.261 n=6
Emit Time 0.14s 0.14s (± 3.77%) ~ 0.14s 0.15s p=0.071 n=6
Total Time 66.29s (± 0.51%) 66.52s (± 0.47%) ~ 66.03s 66.94s p=0.173 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,221,120 1,221,120 ~ ~ ~ p=1.000 n=6
Types 259,211 259,212 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,336,162k (± 0.01%) 2,336,723k (± 0.04%) ~ 2,335,601k 2,338,251k p=0.173 n=6
Parse Time 5.02s (± 0.78%) 5.03s (± 1.16%) ~ 4.96s 5.12s p=0.873 n=6
Bind Time 1.87s (± 0.59%) 1.88s (± 0.73%) ~ 1.85s 1.89s p=0.365 n=6
Check Time 33.77s (± 0.41%) 33.79s (± 0.38%) ~ 33.65s 33.99s p=0.936 n=6
Emit Time 2.68s (± 1.29%) 2.64s (± 1.56%) ~ 2.56s 2.67s p=0.258 n=6
Total Time 43.35s (± 0.31%) 43.34s (± 0.31%) ~ 43.20s 43.54s p=0.936 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,221,120 1,221,120 ~ ~ ~ p=1.000 n=6
Types 259,211 259,212 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,412,446k (± 0.02%) 2,412,555k (± 0.02%) ~ 2,411,968k 2,413,078k p=0.936 n=6
Parse Time 6.28s (± 1.64%) 6.25s (± 0.78%) ~ 6.16s 6.31s p=0.378 n=6
Bind Time 2.03s (± 0.51%) 2.07s (± 1.45%) ~ 2.01s 2.09s p=0.052 n=6
Check Time 40.20s (± 0.25%) 40.23s (± 0.34%) ~ 40.10s 40.43s p=0.873 n=6
Emit Time 3.20s (± 1.67%) 3.16s (± 2.05%) ~ 3.06s 3.23s p=0.228 n=6
Total Time 51.70s (± 0.44%) 51.70s (± 0.28%) ~ 51.55s 51.96s p=0.936 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 256,716 256,716 ~ ~ ~ p=1.000 n=6
Types 104,288 104,288 ~ ~ ~ p=1.000 n=6
Memory used 425,813k (± 0.02%) 425,846k (± 0.03%) ~ 425,712k 426,018k p=0.630 n=6
Parse Time 4.16s (± 0.81%) 4.17s (± 0.28%) ~ 4.16s 4.19s p=0.557 n=6
Bind Time 1.61s (± 1.28%) 1.61s (± 0.55%) ~ 1.60s 1.62s p=0.566 n=6
Check Time 22.20s (± 0.29%) 22.14s (± 0.51%) ~ 21.93s 22.25s p=0.630 n=6
Emit Time 1.72s (± 2.02%) 1.72s (± 1.02%) ~ 1.69s 1.74s p=0.412 n=6
Total Time 29.69s (± 0.30%) 29.65s (± 0.40%) ~ 29.45s 29.76s p=0.688 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 35 35 ~ ~ ~ p=1.000 n=6
Symbols 224,575 224,575 ~ ~ ~ p=1.000 n=6
Types 93,785 93,785 ~ ~ ~ p=1.000 n=6
Memory used 369,822k (± 0.04%) 369,923k (± 0.04%) ~ 369,813k 370,177k p=0.378 n=6
Parse Time 2.84s (± 0.54%) 2.81s (± 1.16%) ~ 2.77s 2.85s p=0.225 n=6
Bind Time 1.59s (± 0.76%) 1.58s (± 0.62%) ~ 1.57s 1.59s p=0.246 n=6
Check Time 15.65s (± 0.43%) 15.66s (± 0.21%) ~ 15.61s 15.71s p=1.000 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.08s (± 0.41%) 20.06s (± 0.27%) ~ 19.96s 20.10s p=0.470 n=6
vscode - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,821,183 2,821,183 ~ ~ ~ p=1.000 n=6
Types 957,007 957,009 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,992,968k (± 0.00%) 2,993,027k (± 0.00%) ~ 2,992,943k 2,993,199k p=0.230 n=6
Parse Time 13.85s (± 0.18%) 13.83s (± 0.36%) ~ 13.76s 13.89s p=0.373 n=6
Bind Time 4.15s (± 2.03%) 4.12s (± 0.36%) ~ 4.10s 4.14s p=0.806 n=6
Check Time 73.13s (± 0.26%) 73.22s (± 0.54%) ~ 72.73s 73.83s p=0.810 n=6
Emit Time 23.50s (± 0.49%) 23.60s (± 0.85%) ~ 23.35s 23.92s p=0.297 n=6
Total Time 114.62s (± 0.17%) 114.77s (± 0.41%) ~ 114.35s 115.42s p=1.000 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 265,866 265,866 ~ ~ ~ p=1.000 n=6
Types 108,401 108,401 ~ ~ ~ p=1.000 n=6
Memory used 410,637k (± 0.03%) 410,598k (± 0.02%) ~ 410,526k 410,692k p=0.575 n=6
Parse Time 4.74s (± 0.71%) 4.75s (± 0.34%) ~ 4.72s 4.77s p=0.678 n=6
Bind Time 2.04s (± 1.57%) 2.06s (± 0.78%) ~ 2.03s 2.07s p=0.571 n=6
Check Time 20.96s (± 0.36%) 20.95s (± 0.28%) ~ 20.87s 21.02s p=0.873 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 27.74s (± 0.28%) 27.75s (± 0.24%) ~ 27.69s 27.84s p=0.418 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 524,576 524,576 ~ ~ ~ p=1.000 n=6
Types 178,847 178,847 ~ ~ ~ p=1.000 n=6
Memory used 462,593k (± 0.01%) 462,621k (± 0.01%) ~ 462,569k 462,743k p=0.575 n=6
Parse Time 3.12s (± 0.44%) 3.13s (± 1.06%) ~ 3.08s 3.17s p=0.280 n=6
Bind Time 1.16s 1.17s (± 1.26%) ~ 1.15s 1.19s p=0.128 n=6
Check Time 18.36s (± 0.36%) 18.17s (± 0.64%) -0.19s (- 1.03%) 18.04s 18.35s p=0.016 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.64s (± 0.27%) 22.48s (± 0.51%) -0.16s (- 0.70%) 22.36s 22.64s p=0.045 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

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the top 400 repos comparing main and refs/pull/58500/merge:

Everything looks good!

@ahejlsberg ahejlsberg merged commit d90e8e7 into main May 14, 2024
28 checks passed
@ahejlsberg ahejlsberg deleted the fix58494 branch May 14, 2024 13:44
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
None yet
Development

Successfully merging this pull request may close these issues.

Computed string literal can't be used as generic argument
3 participants