Limit inference from apparent types to one level deep#27225
Merged
weswigham merged 3 commits intomicrosoft:masterfrom Sep 20, 2018
Merged
Limit inference from apparent types to one level deep#27225weswigham merged 3 commits intomicrosoft:masterfrom
weswigham merged 3 commits intomicrosoft:masterfrom
Conversation
Member
Author
|
@typescript-bot test this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the OOM in our
fp-tsinternal RWC test. There's no regression test for this because there was no bug. If you gave the process a handful of extra memory - 100MB more (roughly the overhead of our test harness itself) the build completes just fine with the original change (#27015) as-is (and, in fact, outside of the harness it does still build!). The change was simply enough to push a test already near the memory limit right over the edge.Limiting inference from apparent types to one layer deep prevents us from using too many more resources, and isn't observably different in most cases (you'd need a type variable that simplifies to a union which contains a type variable which itself simplifies to something which you want to perform inference on to notice the difference - not something which happens at all in our harness!). In any case, this keeps #25274 fixed and the bug this limiter introduces should be difficult to reproduce in the wild (and would have also been a bug in 3.0, so isn't a regression yet).