-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
show()
methods aren't dependencies
#326
Comments
Thanks! The suggested solution is too complex, but we can also just re-show every cell when a new show method is defined? |
That sounds like it would have the same effect 👍 |
I thought I might take a look at this. Are you open to a PR on it or have you already started on it or something? Would you like to give some pointers on where to start or how you'd like it done? (optional) |
That would be great! I think that you should check if any function defines a method for Pluto.jl/src/evaluation/Run.jl Line 82 in cc7248d and if so, call this on every cell: Pluto.jl/src/evaluation/Run.jl Lines 89 to 98 in cc7248d
except it should not run again, it should only call the output fetcher. |
I'm looking at adding a test in test/React.jl, which I think is the right place? And while there I see this line: Line 84 in cc7248d
I think you probably want I can open a PR for that, too. |
Haha thanks but that's too small to spend time on |
show()
methods aren't considered when determining which cells to re-evaluate, so you can end up with a situation like this where the rendered notebook is inconsistent with how it would look if you re-evaluated cell 2:Suggested fix: maintain a dependency DAG for outputs as well as cells; outputs depend on the cell that calculated them and on the definitions of
show
orshowerror
.So the definition of a more specific showerror method in cell 3 will cause the output of cell 2 to be re-rendered (but won't cause cell 2 to be re-evaluated).
I suggest this partly because the DAG looks like it works on symbol names rather than methods and it would be a pain to invalidate every cell any time a method is added to
show
orshowerror
or whatever.Reproducible example:
The text was updated successfully, but these errors were encountered: