This should fix interactive rmds. It also does a few other things:
removes execution logic from add_and_parse_code (so that it really just does what its name says). It also makes it so that no internal code ever calls inside(), which I think should be a user-facing function only. Internal code that wants to add stuff to the multiverse should call add_and_parse_code() directly. Then if it wants to execute something, it can do so afterwards. One upshot of this is that I think the execution of all multiverses when knitting will not happen anymore --- but I assumed you (@abhsarma) were changing that anyway so I didn't try to fix that (it was broken on this branch anyway).
renames eval_seq_in_code to expand_branch_options as that seemed to be what it was doing
moved the use of eval_seq_in_code (now expand_branch_options) to be inside add_and_parse_code, and also moved the check that the code is contained in "{" there. This makes add_and_parse_code the single canonical internal function for the various checks and whatnot needed to add code to the multiverse.
simplified the add_and_parse_code signature to take S3 multiverse objects.
makes execute_universe take S3 multiverse objects.
adds a test rmd (in tests/testrmd) that can be executed interactively to test interactive rmarkdown functionality. I don't know how to set up these tests in an automated way so that seemed the simplest approach.
This should fix interactive rmds. It also does a few other things:
removes execution logic from add_and_parse_code (so that it really just does what its name says). It also makes it so that no internal code ever calls inside(), which I think should be a user-facing function only. Internal code that wants to add stuff to the multiverse should call
add_and_parse_code()
directly. Then if it wants to execute something, it can do so afterwards. One upshot of this is that I think the execution of all multiverses when knitting will not happen anymore --- but I assumed you (@abhsarma) were changing that anyway so I didn't try to fix that (it was broken on this branch anyway).renames eval_seq_in_code to expand_branch_options as that seemed to be what it was doing
moved the use of eval_seq_in_code (now expand_branch_options) to be inside add_and_parse_code, and also moved the check that the code is contained in "{" there. This makes
add_and_parse_code
the single canonical internal function for the various checks and whatnot needed to add code to the multiverse.simplified the add_and_parse_code signature to take S3 multiverse objects.
makes execute_universe take S3 multiverse objects.
adds a test rmd (in tests/testrmd) that can be executed interactively to test interactive rmarkdown functionality. I don't know how to set up these tests in an automated way so that seemed the simplest approach.