You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A middleware might wish to implement a different behavaiour based on the information if the code is being run from an editor of as a part of a watch. Currently, I don't see any obvious way to solve an issue like nikitakit/hydrogen-python#25.
Am I missing something, or do the call to middleware.execute could use so optional parameter indicating that it's called from a watch?
The text was updated successfully, but these errors were encountered:
I just wanted to jump in and provide some past context, although I'm no longer involved in new hydrogen development.
I had originally included this feature in the plugin API, but was instructed to remove it as part of code review (see #1179 and search for the callWatches flag). Of course, the boolean flag was just a first pass, and with greater effort it's possible to design a more general solution e.g.,
Converting watches into a plugin and adding a "priority" argument when installing middleware, so that plugins could choose to run before any watches trigger and only see user-initiated requests
Or, annotating each action with a more detailed description of its source (i.e. user-initiated, or the name of the middleware that triggered it)
Now that the plugin API is already public, there are also compatibility considerations involved when changing the API.
A middleware might wish to implement a different behavaiour based on the information if the code is being run from an editor of as a part of a watch. Currently, I don't see any obvious way to solve an issue like nikitakit/hydrogen-python#25.
Am I missing something, or do the call to
middleware.execute
could use so optional parameter indicating that it's called from a watch?The text was updated successfully, but these errors were encountered: