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 "Allow variance annotations on generic references (#56418)" #59793

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

Andarist
Copy link
Contributor

fixes #59790

see the comment here, cc @JoshuaKGoldberg @gabritto

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 29, 2024
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the new assignability errors (for newly added assignments) are here the same as on main - that's why those variance annotations that were allowed shouldn't be allowed (because they are completely ignored anyway)

@gabritto
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 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 with tsc comparing main and refs/pull/59793/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 193,679k (± 0.90%) 192,951k (± 0.74%) ~ 192,310k 195,874k p=0.092 n=6
Parse Time 1.58s (± 0.48%) 1.57s (± 0.80%) ~ 1.55s 1.58s p=0.301 n=6
Bind Time 0.85s (± 1.05%) 0.85s (± 1.15%) ~ 0.84s 0.87s p=0.931 n=6
Check Time 11.39s (± 0.35%) 11.36s (± 0.37%) ~ 11.30s 11.42s p=0.334 n=6
Emit Time 3.25s (± 0.43%) 3.24s (± 0.32%) ~ 3.22s 3.25s p=0.118 n=6
Total Time 17.07s (± 0.24%) 17.03s (± 0.33%) ~ 16.94s 17.10s p=0.227 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 945,753 945,753 ~ ~ ~ p=1.000 n=6
Types 410,067 410,067 ~ ~ ~ p=1.000 n=6
Memory used 1,222,679k (± 0.00%) 1,222,672k (± 0.00%) ~ 1,222,623k 1,222,741k p=0.689 n=6
Parse Time 7.92s (± 0.77%) 7.91s (± 0.47%) ~ 7.86s 7.96s p=0.809 n=6
Bind Time 2.23s (± 0.23%) 2.23s (± 0.23%) ~ 2.23s 2.24s p=0.069 n=6
Check Time 36.52s (± 0.31%) 36.46s (± 0.39%) ~ 36.18s 36.57s p=0.335 n=6
Emit Time 17.80s (± 0.72%) 17.86s (± 0.81%) ~ 17.73s 18.12s p=0.936 n=6
Total Time 64.47s (± 0.25%) 64.46s (± 0.31%) ~ 64.15s 64.73s p=1.000 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,532,841 2,532,841 ~ ~ ~ p=1.000 n=6
Types 996,405 996,405 ~ ~ ~ p=1.000 n=6
Memory used 2,460,295k (± 0.00%) 2,460,285k (± 0.00%) ~ 2,460,234k 2,460,415k p=0.873 n=6
Parse Time 11.14s (± 0.26%) 11.13s (± 0.39%) ~ 11.08s 11.19s p=1.000 n=6
Bind Time 2.65s (± 0.28%) 2.64s (± 0.48%) ~ 2.62s 2.65s p=0.301 n=6
Check Time 88.73s (± 0.21%) 88.41s (± 0.13%) -0.32s (- 0.36%) 88.31s 88.58s p=0.008 n=6
Emit Time 0.34s (± 3.65%) 0.33s (± 2.29%) ~ 0.32s 0.34s p=0.388 n=6
Total Time 102.84s (± 0.19%) 102.51s (± 0.13%) -0.33s (- 0.33%) 102.35s 102.73s p=0.008 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,232,176 1,232,176 ~ ~ ~ p=1.000 n=6
Types 264,605 264,605 ~ ~ ~ p=1.000 n=6
Memory used 2,532,583k (±11.78%) 2,414,339k (± 6.02%) ~ 2,354,218k 2,711,318k p=0.810 n=6
Parse Time 6.04s (± 1.14%) 6.04s (± 0.76%) ~ 5.98s 6.12s p=0.809 n=6
Bind Time 2.26s (± 1.28%) 2.27s (± 1.47%) ~ 2.24s 2.33s p=0.747 n=6
Check Time 41.17s (± 0.74%) 41.12s (± 1.12%) ~ 40.43s 41.76s p=0.748 n=6
Emit Time 4.03s (± 1.83%) 4.02s (± 1.18%) ~ 3.97s 4.10s p=0.748 n=6
Total Time 53.51s (± 0.62%) 53.46s (± 0.78%) ~ 52.92s 54.06s p=0.689 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,232,176 1,232,176 ~ ~ ~ p=1.000 n=6
Types 264,605 264,605 ~ ~ ~ p=1.000 n=6
Memory used 2,429,895k (± 0.02%) 2,429,141k (± 0.02%) -754k (- 0.03%) 2,428,426k 2,429,526k p=0.031 n=6
Parse Time 7.74s (± 0.66%) 7.75s (± 0.65%) ~ 7.69s 7.81s p=0.575 n=6
Bind Time 2.56s (± 5.32%) 2.61s (± 5.79%) ~ 2.49s 2.82s p=0.686 n=6
Check Time 51.39s (± 0.59%) 51.22s (± 0.59%) ~ 50.87s 51.69s p=0.298 n=6
Emit Time 5.16s (± 4.20%) 5.04s (± 1.01%) ~ 4.96s 5.11s p=0.810 n=6
Total Time 66.84s (± 0.36%) 66.64s (± 0.51%) ~ 66.29s 67.03s p=0.378 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 256,979 256,979 ~ ~ ~ p=1.000 n=6
Types 105,765 105,765 ~ ~ ~ p=1.000 n=6
Memory used 429,707k (± 0.01%) 429,663k (± 0.01%) ~ 429,638k 429,735k p=0.054 n=6
Parse Time 4.18s (± 0.32%) 4.17s (± 0.39%) ~ 4.15s 4.19s p=0.139 n=6
Bind Time 1.60s (± 0.73%) 1.59s (± 0.76%) ~ 1.57s 1.60s p=0.438 n=6
Check Time 22.35s (± 0.33%) 22.33s (± 0.60%) ~ 22.11s 22.47s p=1.000 n=6
Emit Time 2.04s (± 0.59%) 2.03s (± 0.97%) ~ 2.01s 2.06s p=0.744 n=6
Total Time 30.17s (± 0.27%) 30.13s (± 0.43%) ~ 29.91s 30.27s p=0.746 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 68 ~ ~ ~ p=1.000 n=6
Symbols 225,018 225,018 ~ ~ ~ p=1.000 n=6
Types 94,249 94,249 ~ ~ ~ p=1.000 n=6
Memory used 370,221k (± 0.01%) 370,210k (± 0.01%) ~ 370,172k 370,284k p=0.378 n=6
Parse Time 2.30s (± 0.51%) 2.30s (± 0.45%) ~ 2.28s 2.31s p=0.615 n=6
Bind Time 1.32s (± 2.02%) 1.32s (± 1.62%) ~ 1.30s 1.36s p=0.452 n=6
Check Time 13.38s (± 0.61%) 13.38s (± 0.40%) ~ 13.34s 13.48s p=0.936 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 17.00s (± 0.42%) 17.00s (± 0.44%) ~ 16.93s 17.14s p=1.000 n=6
vscode - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 3,022,723 3,022,723 ~ ~ ~ p=1.000 n=6
Types 1,039,971 1,039,971 ~ ~ ~ p=1.000 n=6
Memory used 3,143,441k (± 0.00%) 3,143,488k (± 0.00%) ~ 3,143,435k 3,143,562k p=0.173 n=6
Parse Time 13.99s (± 0.25%) 13.97s (± 0.28%) ~ 13.91s 14.03s p=0.870 n=6
Bind Time 4.34s (± 2.10%) 4.34s (± 2.06%) ~ 4.28s 4.52s p=0.806 n=6
Check Time 80.64s (± 0.42%) 80.52s (± 0.15%) ~ 80.36s 80.65s p=0.521 n=6
Emit Time 20.58s (± 0.62%) 20.59s (± 0.55%) ~ 20.45s 20.71s p=1.000 n=6
Total Time 119.54s (± 0.36%) 119.42s (± 0.13%) ~ 119.22s 119.60s p=0.810 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 275,318 275,318 ~ ~ ~ p=1.000 n=6
Types 112,432 112,432 ~ ~ ~ p=1.000 n=6
Memory used 424,226k (± 0.01%) 424,217k (± 0.01%) ~ 424,171k 424,334k p=0.471 n=6
Parse Time 4.90s (± 0.20%) 4.90s (± 0.33%) ~ 4.88s 4.92s p=1.000 n=6
Bind Time 2.12s (± 0.67%) 2.12s (± 1.18%) ~ 2.08s 2.15s p=0.570 n=6
Check Time 21.73s (± 0.28%) 21.64s (± 0.31%) -0.09s (- 0.41%) 21.54s 21.71s p=0.045 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 28.75s (± 0.25%) 28.67s (± 0.24%) ~ 28.57s 28.77s p=0.128 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 536,424 536,424 ~ ~ ~ p=1.000 n=6
Types 177,440 177,440 ~ ~ ~ p=1.000 n=6
Memory used 482,023k (± 0.10%) 481,799k (± 0.11%) ~ 481,269k 482,320k p=0.297 n=6
Parse Time 2.84s (± 0.87%) 2.83s (± 0.27%) ~ 2.82s 2.84s p=0.415 n=6
Bind Time 1.05s (± 0.78%) 1.05s (± 0.78%) ~ 1.03s 1.05s p=1.000 n=6
Check Time 15.46s (± 0.21%) 15.46s (± 0.36%) ~ 15.39s 15.56s p=1.000 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 19.34s (± 0.19%) 19.34s (± 0.30%) ~ 19.28s 19.44s p=0.687 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

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

Everything looks good!

@bgenia
Copy link

bgenia commented Aug 29, 2024

Will this reopen #56390?

@Andarist
Copy link
Contributor Author

If @RyanCavanaugh keeps the opinion that this is a bug then yes, it should be reopened.

I could alternatively try to fix the assignability issue but it wasn’t clear to me if that should be fixed. So as the first step I decided that it’s better to have the checker rules in a cohesive state by reverting this PR and then hash out the desired behavior for this

@gabritto gabritto self-requested a review August 30, 2024 20:36
@gabritto gabritto self-assigned this Aug 30, 2024
@gabritto
Copy link
Member

gabritto commented Sep 3, 2024

@typescript-bot test top800

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 3, 2024

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

Command Status Results
test top800 ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

@gabritto Here are the results of running the top 800 repos with tsc comparing main and refs/pull/59793/merge:

Everything looks good!

@gabritto gabritto merged commit 29d92ed into microsoft:main Sep 3, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Variance annotations in type aliases for interfaces do not affect assignability
4 participants