-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
replace regex routes with fall-through #583
Conversation
Turns out to be a slightly bigger PR than i expected. I think i'm close. One consequence of this change is that you can't try a request as an endpoint request and then as a page request; they could be interleaved. So instead of separating Other consequences:
On the server, we can try routes sequentially until we get a match. On the client that's less ideal — you don't want to have to go back to the network if the first route fails to match. But you also don't want to hit the network eagerly for every possible route, since that could mean a lot of network requests — if you have So my plan is to implement a heuristic: if the first route we try has a pattern that is shared by other routes, we preload them. If you have
then hitting But if you hit |
That's an upsetting test failure after successful tests. Is there something nondeterministic about the fallthrough behavior? |
Fallthrough is deterministic. I think that test is non-deterministic though, it has a |
So far, this only removes the regex routes, it doesn't replace them