enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.34k stars 320 forks source link

Selective execution halting - "stop button" #5182

Open wdanilo opened 1 year ago

wdanilo commented 1 year ago

This task is automatically imported from the old Task Issue Board and it was originally created by Marcin Kostrzewa. Original issue is here.


The IDE needs a stop button for a long running node. This, however, is different than what we currently expose: instead of halting execution of the whole workspace, only the selected node should be stopped, an exception reported for its result, that should then be fed back to the remaining nodes – such that they still run if they have no dataflow dependency on the stopped node. Seems like all the interpreter-side building blocks are in place, so this should only require language server work.

UX Considerations

Ability to "stop node execution" on demand. Stopping computation of nodes - described below: This may heavily involve the controller in GUI. On the top of the GUI there will be a button allowing switching the mode (production <-> development <-> maybe other modes). Given a mode, every IO node is assigned with info if it should auto-refresh. In the production mode all IO nodes are refreshed by default. In development mode, all IO nodes are not refreshed by default and the user needs to press play button next to the nodes. Unfortunately, this is important and we constantly hear about it from people. E.g. you open your dataflow network and you want to change it, but you dont want to override your database when playing with values. So you switch to dev mode and nothing evaluates until you want to. Also, the nodes should not evaluate their IO actions even if visualizations are opened. Anyway, this requires a bigger talk with the engine team, because support for it seems non-trivial. In particular, if the IO operations are nested, e.g. after collapsing a node, we still want to have the "play button" visible on the collapsed node and we want the inner IO nodes to not autorefresh in the given mode. This can't be done by GUI, as after the definition of the collapsed node changes, things should be updated and work. Let's have a talk about how much of that can be done and when.

jdunkerley commented 1 year ago

@sylwiabr and @jdunkerley to discuss what parts of this need moving forward.