Add an inference option to ignore the recursion hardlimit #48944
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.
We currently very aggressively limit recursion if we came from a union split. The reason for this choice is to avoid accidental exponential inference times from excessive exploration of the call graph. Unfortunately, certain packages like Diffractor really like triggering the recursion heuristic at the moment, causing any unions to immediately cause imprecise inference. In the fullness of time, we should improve the recursion heuristic to do better in this case, but for the time being, add an inference option that simply lets it ignore the hardlimit recursion case and proceed anyway.