Closed hadley closed 10 months ago
Same problem when knitting a single quarto doc when the output appears in the background jobs tab, rather than the build pane.
Previously it was (correctly) using the dynamic progress bar.
The new behavior cames from discussion in https://github.com/yihui/knitr/issues/2221 and commit https://github.com/yihui/knitr/commit/47bce017a506ee43e4b325547804ee7438910a59. It was introduced in 1.43
Current detection for simple mode is https://github.com/yihui/knitr/blob/ec4c9b632e1b35994340848884a31da2ca24640a/R/utils.R#L1136-L1149
When quarto is running R it will do it executing R in background session started with Deno as Rscript <file>
. None of the specific checks return FALSE to no activate simple mode , and knitr will then detect that it is not running in RStudio IDE so activate the simple
version (is.null(tryCatch(rstudioapi::versionInfo(), error = function(e) NULL))
returns TRUE
So probably the current detection does not work for the case of knitr run within Quarto. We need to find what works for this case....
I think even cli::is_dynamic_tty()
is returning FALSE
in the context of the R code executed by Quarto directly.
We need to find what works for this case....
I'm using an env var to detect the background jobs pane. This should work now.
This should work now.
This is now working in Background Job pane inside RStudio.
rather than the build pane.
@hadley I understand there could be a scenario where the Build pane is used ?
Also, I don't know if you were referring only to RStudio IDE panes, but just for referement, in terminal, it will still use the non-interactive progress bar. In same terminal session, we'll have
Rscript -e 'rmarkdown::render("index.qmd")
showing us the full progress bar
quarto render index.qmd
showing us the simple progress bar
Just mentioning this for reference. The simple progress bar seems ok to have in Terminal for Quarto.
Yeah, I see quarto book usually in the build pane.
Thanks I tried Quarto Website and the Build Pane button triggers a render in the Job Pane.
So it seems only the Build button for a Quarto Book triggers rendering in the Build pane directly.
It should be ok in build pane now too. thanks
Thanks @cderv!
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
i.e.
Previously it was (correctly) using the dynamic progress bar. I'm using knitr 1.43.
By filing an issue to this repo, I promise that
xfun::session_info('knitr')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/knitr')
.I understand that my issue may be closed if I don't fulfill my promises.