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
```julia:init
using PlotlyJS
```
B
```julia:ex
some example
```
After the first pass, these two blocks will be cached and not re-evaluated. The issue however is that if we kill the server, add a new code block at the end of the document which requires Plotly, and restart the server, that last code block will fail because the initial code cell will not be re-evaluated and the module has been scraped so that it doesn't load PlotlyJS anymore.
The current way around this is to just use @def reeval = true but this is not the elegant option.
Several simple ways of doing things:
use reeval=true (already works)
add the using statement in every code block with a #hide, this has negligible cost if the library is already loaded and will ensure the issue doesn't arise
Non-simple way of doing things:
add some form of command to force a cell to always be reevaluated
this however entails that the scope would be stale after that cell and that everything would potentially need to be re-evaluated afterwards, so there's no clear advantage over just reeval = true I would think.
Another (difficult?) but nice way could be to make "permanent" any statement at least for the duration of the session... That would require:
Consider:
After the first pass, these two blocks will be cached and not re-evaluated. The issue however is that if we kill the server, add a new code block at the end of the document which requires Plotly, and restart the server, that last code block will fail because the initial code cell will not be re-evaluated and the module has been scraped so that it doesn't load PlotlyJS anymore.
The current way around this is to just use
@def reeval = true
but this is not the elegant option.Several simple ways of doing things:
reeval=true
(already works)using
statement in every code block with a#hide
, this has negligible cost if the library is already loaded and will ensure the issue doesn't ariseNon-simple way of doing things:
this however entails that the scope would be stale after that cell and that everything would potentially need to be re-evaluated afterwards, so there's no clear advantage over just
reeval = true
I would think.Another (difficult?) but nice way could be to make "permanent" any statement at least for the duration of the session... That would require:
using
andimport
The text was updated successfully, but these errors were encountered: