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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃 Pick PR #47738 (Eliminate redundant or meaningless ...) into release-4.6 #47907

Merged

Conversation

typescript-bot
Copy link
Collaborator

This cherry-pick was triggered by a request on #47738
Please review the diff and merge if no changes are unexpected.
You can view the cherry-pick log here.

cc @RyanCavanaugh

Component commits:
628da10 Eliminate redundant or meaningless elaborations in type relations

a009ee1 Accept new baselines

a65794c Add resetErrorInfo (though, oddly, shouldn't be necessary)

f269f42 Less aggressive reduction in second pass union/intersection checks

1312e8a Accept new baselines

b82966f Restructure and back off a little bit more

f0b8742 Only cache union/intersection relations once

9404e06 Accept new baselines

4866ce5 Properly cache identity relations, clean up error reporting

2670b26 Move more logic to cached side of relation checks

adb37a5 Optimize and remove more redundant elaborations

16b986b Accept new baselines

1c69acb Remove unnecessary error state capture

530c876 More optimizing

25a71c4 Cache isWeakType computation

c427a46 Revert "Cache isWeakType computation"
This reverts commit 25a71c4.

1d70b01 Address CR feedback

28439f7 Merge branch 'main' into fix47668
# Conflicts:
#	src/compiler/diagnosticMessages.json

c472ba5 Accept new baselines
@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Feb 15, 2022
@RyanCavanaugh
Copy link
Member

@DanielRosenwasser 馃憤 / 馃憥 ?

@DanielRosenwasser
Copy link
Member

To save anyone exploring some time, the intent is to fix #46900, and the picked PR is supposed to fix that issue according to the comment at #47897 (comment)

I'm not sure we need this PR as the issue appears to already be fixed by #47738. That PR moves logic from the isRelatedTo function (the uncached side of relationship checking) to the structuredTypeRelatedTo function (the cached side) where it should have been in the first place. Apart from the caching benefits this makes the logic subject to recursion depth checking which cuts off the infinite intersection constraint generation in #46900.

I think we should just merge #47738 for 4.6. I took Daniel's comment here to mean hold until after 4.6, but I do think the changes are safe.

Ordinarily we would hold off on bringing this change in so late, but the refactoring generally seemed cleaner, safer, and apparently seems to fix the problem.

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
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants