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

Revert PR 55371 #58702

Merged
merged 2 commits into from
May 30, 2024
Merged

Revert PR 55371 #58702

merged 2 commits into from
May 30, 2024

Conversation

gabritto
Copy link
Member

Fixes #58687.
Reverts #55371.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels May 29, 2024
@gabritto
Copy link
Member Author

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 29, 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 @gabritto, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

@gabritto
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,871k (± 0.74%) 193,059k (± 0.69%) ~ 192,259k 195,764k p=0.173 n=6
Parse Time 1.30s (± 0.80%) 1.31s (± 1.04%) ~ 1.29s 1.32s p=0.804 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.54s (± 0.18%) 9.54s (± 0.40%) ~ 9.49s 9.60s p=0.806 n=6
Emit Time 2.64s (± 0.50%) 2.63s (± 0.65%) ~ 2.61s 2.65s p=0.286 n=6
Total Time 14.20s (± 0.24%) 14.20s (± 0.39%) ~ 14.11s 14.26s p=1.000 n=6
angular-1 - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 944,105 944,105 ~ ~ ~ p=1.000 n=6
Types 407,032 407,032 ~ ~ ~ p=1.000 n=6
Memory used 1,222,105k (± 0.00%) 1,222,106k (± 0.00%) ~ 1,222,060k 1,222,146k p=0.872 n=6
Parse Time 6.82s (± 0.74%) 6.81s (± 0.77%) ~ 6.74s 6.87s p=1.000 n=6
Bind Time 1.88s (± 0.43%) 1.88s (± 0.56%) ~ 1.86s 1.89s p=0.181 n=6
Check Time 31.39s (± 0.39%) 31.28s (± 0.55%) ~ 31.05s 31.54s p=0.297 n=6
Emit Time 14.78s (± 0.20%) 14.77s (± 0.28%) ~ 14.69s 14.80s p=1.000 n=6
Total Time 54.88s (± 0.25%) 54.74s (± 0.33%) ~ 54.53s 54.98s p=0.230 n=6
mui-docs - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 2,053,011 2,053,011 ~ ~ ~ p=1.000 n=6
Types 899,367 899,368 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,065,938k (± 0.01%) 2,065,881k (± 0.01%) ~ 2,065,643k 2,065,970k p=0.128 n=6
Parse Time 8.11s (± 0.36%) 8.10s (± 0.12%) ~ 8.09s 8.11s p=0.620 n=6
Bind Time 2.73s (± 0.46%) 2.74s (± 1.02%) ~ 2.72s 2.78s p=0.452 n=6
Check Time 82.22s (± 0.25%) 81.53s (± 1.16%) -0.68s (- 0.83%) 79.62s 82.03s p=0.016 n=6
Emit Time 0.16s (± 2.52%) 0.17s (± 3.32%) ~ 0.16s 0.17s p=0.282 n=6
Total Time 93.22s (± 0.20%) 92.54s (± 1.00%) -0.67s (- 0.72%) 90.66s 93.02s p=0.013 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,290 1,226,288 -2 (- 0.00%) ~ ~ p=0.001 n=6
Types 260,834 260,837 +3 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,342,594k (± 0.04%) 2,342,915k (± 0.05%) ~ 2,341,631k 2,344,408k p=0.810 n=6
Parse Time 4.99s (± 1.57%) 4.98s (± 1.10%) ~ 4.92s 5.05s p=0.872 n=6
Bind Time 1.91s (± 0.43%) 1.89s (± 0.86%) ~ 1.87s 1.91s p=0.184 n=6
Check Time 33.87s (± 0.40%) 33.89s (± 0.53%) ~ 33.68s 34.11s p=0.810 n=6
Emit Time 2.59s (± 2.79%) 2.63s (± 3.90%) ~ 2.45s 2.73s p=0.423 n=6
Total Time 43.37s (± 0.58%) 43.41s (± 0.52%) ~ 43.10s 43.74s p=0.810 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,290 1,226,288 -2 (- 0.00%) ~ ~ p=0.001 n=6
Types 260,834 260,837 +3 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,418,980k (± 0.02%) 2,419,032k (± 0.04%) ~ 2,417,358k 2,420,033k p=0.689 n=6
Parse Time 5.17s (± 1.69%) 5.17s (± 0.80%) ~ 5.13s 5.25s p=0.936 n=6
Bind Time 1.70s (± 0.44%) 1.70s (± 0.49%) ~ 1.69s 1.71s p=0.432 n=6
Check Time 34.34s (± 0.22%) 34.27s (± 0.36%) ~ 34.07s 34.40s p=0.521 n=6
Emit Time 2.62s (± 2.52%) 2.60s (± 2.90%) ~ 2.52s 2.69s p=0.630 n=6
Total Time 43.84s (± 0.45%) 43.77s (± 0.34%) ~ 43.63s 44.03s p=0.471 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 257,977 257,975 -2 (- 0.00%) ~ ~ p=0.001 n=6
Types 104,898 104,900 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 426,895k (± 0.01%) 426,873k (± 0.01%) ~ 426,810k 426,902k p=0.298 n=6
Parse Time 3.32s (± 0.59%) 3.33s (± 0.92%) ~ 3.30s 3.38s p=0.935 n=6
Bind Time 1.32s (± 1.14%) 1.32s (± 1.14%) ~ 1.29s 1.33s p=1.000 n=6
Check Time 18.05s (± 0.36%) 18.01s (± 0.46%) ~ 17.92s 18.11s p=0.422 n=6
Emit Time 1.33s (± 1.13%) 1.33s (± 1.31%) ~ 1.32s 1.36s p=0.511 n=6
Total Time 24.02s (± 0.40%) 23.99s (± 0.42%) ~ 23.89s 24.14s p=0.630 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,804k (± 0.03%) 369,867k (± 0.03%) ~ 369,749k 370,051k p=0.378 n=6
Parse Time 3.54s (± 0.50%) 3.52s (± 0.99%) ~ 3.47s 3.55s p=0.286 n=6
Bind Time 1.93s (± 1.02%) 1.94s (± 0.62%) ~ 1.92s 1.95s p=0.415 n=6
Check Time 19.38s (± 0.33%) 19.36s (± 0.16%) ~ 19.30s 19.38s p=0.292 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.84s (± 0.24%) 24.81s (± 0.20%) ~ 24.73s 24.86s p=0.684 n=6
vscode - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,840,799 2,840,799 ~ ~ ~ p=1.000 n=6
Types 962,729 962,729 ~ ~ ~ p=1.000 n=6
Memory used 3,014,042k (± 0.00%) 3,014,027k (± 0.00%) ~ 3,013,963k 3,014,079k p=0.378 n=6
Parse Time 13.82s (± 0.27%) 13.82s (± 0.27%) ~ 13.77s 13.87s p=1.000 n=6
Bind Time 4.33s (± 1.85%) 4.20s (± 2.21%) ~ 4.15s 4.39s p=0.105 n=6
Check Time 73.27s (± 0.23%) 73.41s (± 0.34%) ~ 73.10s 73.83s p=0.229 n=6
Emit Time 23.47s (± 0.51%) 23.53s (± 0.58%) ~ 23.31s 23.70s p=0.630 n=6
Total Time 114.89s (± 0.18%) 114.95s (± 0.19%) ~ 114.64s 115.23s p=0.630 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 266,048 266,048 ~ ~ ~ p=1.000 n=6
Types 108,470 108,470 ~ ~ ~ p=1.000 n=6
Memory used 410,858k (± 0.02%) 410,899k (± 0.02%) ~ 410,861k 411,028k p=0.471 n=6
Parse Time 4.78s (± 0.98%) 4.79s (± 0.74%) ~ 4.75s 4.85s p=1.000 n=6
Bind Time 2.07s (± 1.18%) 2.06s (± 0.66%) ~ 2.04s 2.08s p=0.461 n=6
Check Time 21.04s (± 0.22%) 21.06s (± 0.29%) ~ 20.98s 21.16s p=0.517 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 27.88s (± 0.26%) 27.91s (± 0.22%) ~ 27.81s 27.99s p=0.574 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 535,743 535,743 ~ ~ ~ p=1.000 n=6
Types 182,738 182,741 +3 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 470,396k (± 0.01%) 470,388k (± 0.00%) ~ 470,345k 470,410k p=0.810 n=6
Parse Time 3.95s (± 0.46%) 3.96s (± 0.36%) ~ 3.94s 3.98s p=0.324 n=6
Bind Time 1.49s (± 0.95%) 1.48s (± 0.79%) ~ 1.47s 1.50s p=0.325 n=6
Check Time 22.70s (± 0.30%) 22.64s (± 0.27%) ~ 22.56s 22.70s p=0.092 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 28.14s (± 0.31%) 28.08s (± 0.22%) ~ 28.00s 28.15s p=0.257 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

@gabritto gabritto marked this pull request as ready for review May 29, 2024 19:37
@gabritto gabritto marked this pull request as draft May 29, 2024 19:42
@gabritto
Copy link
Member Author

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 29, 2024

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

Command Status Results
pack this ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 29, 2024

Hey @gabritto, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/161979/artifacts?artifactName=tgz&fileId=1BFA18BBC6DA0A2A9A0BB31A899B882DF274F7A83CD3BA53C4D866A4F3E3280A02&fileName=/typescript-5.5.0-insiders.20240529.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.5.0-pr-58702-7".;

@gabritto gabritto requested a review from ahejlsberg May 29, 2024 20:20
@typescript-bot
Copy link
Collaborator

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

Everything looks good!

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd add an extra test case to the original test file here based on Anders' comment in the other PR:

declare function bar<T extends string>(x: `${T}`): T;

function baz<U extends string>(x: `${U}`) {
  return bar(x);
}

!!! error TS2322: Type '"a"' is not assignable to type '`${T2}`'.

function f3<T3 extends "a" | "b">(x: T3) {
const test1: `${T3}` = x
Copy link
Contributor

Choose a reason for hiding this comment

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

it could be nice to add comments to both of those assignments to explain the error, like:

Suggested change
const test1: `${T3}` = x
const test1: `${T3}` = x; // error, T3 could be instantiated with a string enum

@gabritto gabritto marked this pull request as ready for review May 30, 2024 16:38
@gabritto gabritto merged commit b7d8809 into main May 30, 2024
28 checks passed
@gabritto gabritto deleted the gabritto/revert55371 branch May 30, 2024 16:53
skeate added a commit to skeate/TypeScript that referenced this pull request Jun 1, 2024
* upstream/main: (37 commits)
  Added NoTruncation flag to completions (microsoft#58719)
  Clone node to remove location even when it has been modified if needed (microsoft#58706)
  Properly account for `this` argument in intersection apparent type caching (microsoft#58677)
  Fix: Include Values of Script Extensions for Unicode Property Value Expressions in Regular Expressions (microsoft#58615)
  In `reScanSlashToken` use `charCodeChecked` not `codePointChecked` (microsoft#58727)
  Shorten error spans for errors reported on constructor declarations (microsoft#58061)
  Mark file as skips typechecking if it contains ts-nocheck (microsoft#58593)
  Fixed an issue with broken `await using` declarations in `for of` loops (microsoft#56466)
  Do not expand type references in keyof and index access (microsoft#58715)
  Improve the performance of isolatedDeclarations quickfix  (microsoft#58722)
  Unwrap `NoInfer` types when narrowing (microsoft#58292)
  Recover from type reuse errors by falling back to inferred type printing (microsoft#58720)
  Fixing self import (microsoft#58718)
  Enable JS emit for noCheck and noCheck for transpileModule (microsoft#58364)
  Revert PR 55371 (microsoft#58702)
  Update dependencies (microsoft#58639)
  Fix baselines after PR 58621 (microsoft#58705)
  Do not infer `yield*` type from contextual `TReturn` (microsoft#58621)
  `await using` normative changes (microsoft#58624)
  Handling statements from a known source file (microsoft#58679)
  ...
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.

Template literal type reduction is inconsistent (regression in 5.5-beta)
4 participants