-
Notifications
You must be signed in to change notification settings - Fork 255
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
Forgetting to call a function will crash Hydra #35
Comments
ooowow this is great! Is this sort of a "best practices" thing, or something that could be somehow added to the software? |
I think that when a function is used as an input to a src/function/etc... it's output, upon execution, should be validated so that it is a valid value. If an invalid value is returned, such as a function, a nice error could be thrown. (I have noticed that this crash also takes place is an undefined value is passed in). At the very least the error should be catched, to prevent Hydra from crashing, which would not be at all nice in the context of a performance, (as it would require a restart). I have been getting familiar with the codebase, but am yet to find where the execution of the functions happen. I now believe it is somewhere in |
This is where the formatting of functions happens: https://github.com/ojack/hydra-synth/blob/6efcd8fefbcc49bc7fc1608a0ee58dc1f092a238/src/GeneratorFactory.js#L45 The executing of functions is handled within regl https://github.com/regl-project/regl I am interested in understanding more about how this is happening! |
Fixed at hydra-synth/hydra-synth#17 |
If working with functions it might be easy to forget a function call, which will fatally crash Hydra and will require a restart.
e.g.
Although this example is very simple, it is easy to forget a call when a function is curried.
The text was updated successfully, but these errors were encountered: