Add stale cells (aka single-shot cells) #3068
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #2970 and previous discussions, having a way to temporarily block the execution of long-running cells would be beneficial.
This implementation goes for a very flexible solution:
Main.PlutoRunner.Stale
. When returned from a cell, this struct passes down its formatting to its single memberout
. However, the cell also gets marked as stale. This means that none of the cells that depend on it will be run. The stale cell, however, will still be run when its dependencies run, to see if its no longer stale.On the frontend stale outputs are displayed on a light or dark orange background while stale cells and cells that depend on them get orange traffic lights.
When a cell is in one of those two states a warning sign with an explanatory popup is displayed below the "fold code" button.
(see picture below)
Small details
Future
We could add utility macros to PlutoHooks/PlutoLinks, something like
single-shot
. This would show how to use the marker.Try this Pull Request!
Open Julia and type: