-
Notifications
You must be signed in to change notification settings - Fork 783
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
Many match clauses #16430
Many match clauses #16430
Conversation
I've been looking into it some time ago, and as an addition to delaying it we we might want to think of a different path in some cases, when we don't don't pattern matching compilation. Maybe there's a way to just put a "too compilcated" limit on pattern match compilation, active if any errors are present in any of the input patterns. |
We either can:
If you'd like to, I can experiment with it. |
Hmm, interesting proposals. I guess
Yeah, for sure! That be great. |
We need to do it for the current file for the warnings about exhaustiveness. But they are optional in the way: they aren't required for the type inference and name resolution, so could be called later, like we've discussed it with @nojaf. It also seems that the whole post inference phase could move to the optionally requested call if it doesn't change any state for the subsequent files. |
Yeah, I'm thinking that for now. We can adjust as we go. |
Yes, but if it's (match) is big, and we have TC errors in project, it will likely never finish or will put huge pressure on the FCS (as it does now).
Yes, we can, as a PoC, have a flag for turning them off now, and later on try and expose it as a separate call/move to other step.
Yes, but this is orthogonal to the issue. It can be part of some sort of "background" checking. |
Description
I'm investigating whether we can delay the creation of the decision tree in a match expression.
While doing this, I learned that you can't create a match clause with 9000 clauses.
It leads to a stackoverflow exception, I'm going to do some digging if that can be avoided.
Fixes # (issue, if applicable)
Checklist
Test cases added
Performance benchmarks added in case of performance changes
Release notes entry updated: