Defer distributing index over generic object types - #50540
Conversation
|
TypeScript Bot (@typescript-bot) test this |
|
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the diff-based user code test suite on this PR at 00e3926. You can monitor the build here. Update: The results are in! |
|
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the extended test suite on this PR at 00e3926. You can monitor the build here. |
|
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the perf test suite on this PR at 00e3926. You can monitor the build here. Update: The results are in! |
|
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the parallelized Definitely Typed test suite on this PR at 00e3926. You can monitor the build here. |
|
Daniel Rosenwasser (@DanielRosenwasser) Here are the results of running the user test suite comparing Everything looks good! |
|
Heya Daniel Rosenwasser (@DanielRosenwasser), I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here. |
|
Daniel Rosenwasser (@DanielRosenwasser) Here they are:
CompilerComparison Report - main..50540
System
Hosts
Scenarios
TSServerComparison Report - main..50540
System
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
TypeScript Bot (@typescript-bot) test top100 |
|
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the diff-based user code test suite on this PR at 00e3926. You can monitor the build here. |
|
Daniel Rosenwasser (@DanielRosenwasser) Nathan Shively-Sanders (@sandersn) Looks like the top100 test is bombing out in one of the processes. Same issue over in #50535. |
Anders Hejlsberg (ahejlsberg)
left a comment
There was a problem hiding this comment.
This change makes sense, but I'd prefer reducing the scope a bit as suggested here.
| if (shouldDeferIndexType(objectType)) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Remove this.
| } | ||
| // (T | U)[K] -> T[K] | U[K] (reading) | ||
| // (T | U)[K] -> T[K] & U[K] (writing) | ||
| // (T & U)[K] -> T[K] & U[K] |
There was a problem hiding this comment.
Change the following line to:
if (objectType.flags & TypeFlags.Union || objectType.Flags & TypeFlags.Intersection && !shouldDeferIndexType(objectType)) ...There was a problem hiding this comment.
I'm concerned that shouldDeferIndexType will also do (possibly expensive) work for union types, so I'd prefer only deferring for intersection types.
|
Anders Hejlsberg (@ahejlsberg) I've applied the suggested change and rerun the test suite locally - everything looks OK on this front, somebody from the TS team has to start new perf tests though. |
|
TypeScript Bot (@typescript-bot) perf test this my liege |
|
Heya Jake Bailey (@jakebailey), I've started to run the perf test suite on this PR at 2ba9ff1. You can monitor the build here. Update: The results are in! |
|
Jake Bailey (@jakebailey) Here they are:
CompilerComparison Report - main..50540
System
Hosts
Scenarios
TSServerComparison Report - main..50540
System
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
TypeScript Bot (@typescript-bot) test this |
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the diff-based user code test suite on this PR at 2ba9ff1. You can monitor the build here. |
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the parallelized Definitely Typed test suite on this PR at 2ba9ff1. You can monitor the build here. |
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the diff-based user code test suite on this PR at 2ba9ff1. You can monitor the build here. Update: The results are in! |
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the extended test suite on this PR at 2ba9ff1. You can monitor the build here. |
|
Anders Hejlsberg (@ahejlsberg) Here are the results of running the user test suite comparing Everything looks good! |
|
Heya Anders Hejlsberg (@ahejlsberg), I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here. |
ae87342 to
873dfea
Compare
|
Anders Hejlsberg (@ahejlsberg) should this perhaps be cherry-picked into the 4.8 release? |
|
Mateusz Burzyński (@Andarist) Yup, it's already on the list. |
|
TypeScript Bot (@typescript-bot) cherry-pick this to release-4.8 |
|
Heya Andrew Branch (@andrewbranch), I've started to run the task to cherry-pick this into |
|
Hey Andrew Branch (@andrewbranch), I've opened #50588 for you. |
Fixes #50539
cc Anders Hejlsberg (@ahejlsberg) , the
shouldDeferIndexTypecheck has been introduced based on the changes in this PR: https://github.com/microsoft/TypeScript/pull/49696/files