Cached Output Invalidation in Notebooks

I have an odd issue with chunk output invalidation in RStudio-rendered notebooks that's driving me a bit batty. For a basic html_notebook file, if I create an invalid chunk (say an unclosed or not correctly opened chunk) while editing (but not saved nor making any new executions), all cached output below the editing location is lost as soon as the invalid chunk exists in the live document. This often hits me when I'm deleting or moving a chunk, where loosing all the cached output below is a serious loss in productivity.

This public RStudio Cloud project demonstrates the issue. I've also replicated this on rstudio/rocker:latest, rstudio/rocker:3.6.0, and MacOS with Rstudio 1.2.5019 and CRAN-current versions of the core rmarkdown family.

I'm not quite sure where the problem lies and am happy to take redirection to a GitHub issue tracker or other forum. Thanks in advance for any help or suggestions!

Giving a one time bump on this thread in case this got lost in the pre-US Thanksgiving holiday. :slight_smile:

You are indeed correct we missed this over the holidays. Sorry! And thank you for going the whole nine yards in providing a reproducible example :slight_smile:

One way to reproduce this consistently (at least for me) is to delete the whole chunk header line; e.g. with | representing the cursor location:


If I press Cmd + Backspace to delete the whole line, then all chunk output is then lost.

I've filed this as an issue on the GitHub issue tracker here:

Thanks for reporting!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.