Add some guidance to user regarding interactive documents
The runtime: shiny vs runtime: shinyrmd distinction is really subtle for someone writing interactive documents.
There are examples where a server.R and ui.Rmd but use runtime: shiny rather than runtime: shinyrmd.
We could add context to rmarkdown::run to understand if the wrong runtime has been specified and guide the user.
Especially:
server.R+ui.Rmdshould always meanruntime: shinyrmdserver: shinyshould be used now (instead ofruntime: shinyrmd
Adding this note to log and remember this possible improvement.
server: shinyshould be used now (instead ofruntime: shinyrmd)
Why should? (Did you mean "server: shiny_prerendered... instead of... shinyrmd", or maybe some deprecations/changes are coming to prerendering-related technique, or smth. else?)
I think what I meant was "should recommend" to avoid confusion. And also because on Quarto side, only server: shiny is supported. https://quarto.org/docs/interactive/shiny/
(Did you mean "server: shiny_prerendered... instead of... shinyrmd"
No I meant server: shiny. server: shiny_prerendered does not exist. runtime: shiny_prerendered is equivalent to runtime: shinyrmd.
All this is just several ways to do things. It was introduced through time and can lead to confusion now.
On rmarkdown side, there is no deprecation. So using runtime: shinyrmd works. However, for document rendered through Quarto, then server: shiny is expected.
What does not for sure is using server.R + ui.Rmd and not using server: shiny.
Anyhow, this is documentation improvement mainly.
No change coming.
Ok, so that is for code style, I see.
With a bit of misunderstanding of "...only server: shiny is supported" -- I've just got the same html-output for both (server: shiny and runtime: shiny_prerendered) variants with quarto render|serve. Also, as per conditions evaluated at is_shiny_prerendered(), seems like all of those fronmatter options are equivalent for Rmd/qmd, if I'm not missing some case.
And for now, anyway,
On rmarkdown side, there is no deprecation. No change coming.
Superb. Thanks!
I've just got the same html-output for both (server: shiny and runtime: shiny_prerendered) variants with quarto render|serve.
Internally code is the same. On Quarto side, we do check only for server and not runtime. So some processing or checks on Quarto code can be missed if you use runtime with Quarto. And we don't document it.
Anyhow, I labelled it documentation issue anyway. Thanks a lot for your question to help us improve!