-
-
Notifications
You must be signed in to change notification settings - Fork 15.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
Warn When dispatching During Middleware Setup #1345
Conversation
Can we absolutely not make it work? If we apply middleware from the innermost to the outermost, it seems like we could gradually update the outer |
@yelouafi has a potential option here: #1240 (comment) I'm not married to this PR, so I'd be more than happy to close it if we can find a solution. This just exists to make our job easier if we don't find one. |
I guess what’s happening here is I don’t understand the current semantics without a test ;-) |
To clarify, I see that you added a warning, and you test for it. But I want to understand what actually happens if you have several middlewares that attempt to dispatch actions in definition phase. |
OK, I can work up something more elaborate. |
I think we should just throw and call it a day. Warning will be frustrating because user can't control it, and middleware author will have to remove it anyway due to complaints. |
I’ll close because I’d like to see a hard error here, not a warning, and the PR has been inactive for a while. If you update this please reopen; otherwise somebody else might give it a shot if they find the time. Thanks! |
Sorry, I was meaning to get back to this but keep forgetting. I'll try to get it clean up in the next couple days. |
Thanks, no trouble. I’m just cleaning up non-actionable PRs so new contributors aren’t confused. |
Closes #1240
Any thoughts on the wording that was chosen? I assume we want to just warn and not throw a hard error here.