-
Notifications
You must be signed in to change notification settings - Fork 20
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
Server Reload Fails when Indentation Error is Encountered #2
Comments
I've seen similar behavior with several different compiler errors. The main way it affects me is that sometimes I will save in the middle of a change out of habit, the server will stop, and then I won't notice until I finish my change and go check it out. The only behavior besides dying would be to not reload unless the code compiles. This would be a little more pleasant for developing, but would also require moving the reloading part of the code from werkzeug.serving into clastic. It also requires running some sort of compile/lint/syntax check on the code without running it (since you can't have two processes with the same socket), but I imagine this is something straightforward in python. |
Well, first off you can definitely have multiple processes with the same socket. Remind me to show you the ways at some point. (aside from fork(), which is aight, here is some cool, but heavy and dry stuff: http://infohost.nmt.edu/~eweiss/222_book/222_book/0201433079/ch17lev1sec4.html) While not documented yet, Clastic actually does have an error server, which displays an error page without killing the server, it's just that I've only thought to test it with NameErrors and SyntaxErrors, and I forgot about IndentationErrors. Avoiding reload if the new code doesn't compile was the original intent, but it occurred to me that that sort of robustness is desirable (to some) in production environments, but Clastic's devserver is only for development. In development we want fast failure, hence the current behavior of Flaw (aka the error application). Anyhoo, I'll push the fix for this ASAP. |
closing as invalid/wontfix. try reading the man page next time. jkfixed in 20e017d . ;D When you get a chance, let me know if that works for you, then I'll push the new version to PyPI. |
The code at https://gist.github.com/amock/bf012ef3c8d83daddbff crashes clastic when reloading with a
(Code inlined for the lazy:
)
The text was updated successfully, but these errors were encountered: