Closed astayleraz closed 11 months ago
Note: This also affects knitting an R Markdown file, and switching a file to visual mode will do this, as well. Checked in RStudio Desktop 2023.12.0-daily+84 on MacOS 14.
Working around this with setting the following in .Renviron:
RSTUDIO_PANDOC="/Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/x86_64"
resolves the tutorial and knitting, but not the visual editor spinning.
It looks like Quarto 1.4 on macOS now places tools like pandoc into architecture-specific sub-directories, e.g.
<quarto>/bin/tools/x86_64/pandoc
. This has consequences for RStudio and rmarkdown sinceRSTUDIO_PANDOC
is normally set to just<quarto>/bin/tools
. Should we be updatingRSTUDIO_PANDOC
to point at the appropriate architecture sub-directory in RStudio,RSTUDIO_PANDOC
is the way to communicate through an env var to Rmarkdown in which folder Pandoc binary is. This is widely used I believe in products (ours and probably others) to configure rmarkdownfind_pandoc()
using an env var. The organization to put pandoc.exe in a directory with architecture is a Quarto choice. I don't think rmarkdown should assume that this will always be the case to look for pandoc in a architecture directory. So we could indeed have a heuristic to also look in such subfolder if we don't find it in rootRSTUDIO_PANDOC
. However, RStudio IDE is the one communicating to rmarkdown that the pandoc.exe to use is the one bundled with Quarto, which happens to be under a architecture directory. So that is why I thought this would be something to "whom" send the info to rmarkdown to deal with.
If its helpful @kevinushey posted this issue with the quarto dev team here on this https://positpbc.slack.com/archives/C03E8CWNGBB/p1695678310495969
Verified in RStudio Desktop 2023.12.0-daily+99 on MacOS 14. However, the tutorial still doesn't load in RStudio Server 2023.12.0-daily+99 on Ubuntu 20.04:
> Sys.getenv("RSTUDIO_PANDOC")
[1] "/usr/lib/rstudio-server/bin/quarto/bin/tools"
However, after setting
> Sys.setenv("RSTUDIO_PANDOC" = "/usr/lib/rstudio-server/bin/quarto/bin/tools/x86_64")
the tutorial works.
Does it work if you restart the R session so you get a fresh version of that environment variable?
That was it—all set, thanks!
QA note: Cf. rmarkdown::find_pandoc()$dir
with Sys.getenv("RSTUDIO_PANDOC")
.
System details
Steps to reproduce the problem
Describe the problem in detail
The user will just see a spinner or an error with the spinner. If you try the tutorial, you get a pandoc error.
Kevin noticed the path with pandoc has changed but RSTUDIO_PANDOC shows a different path.
Note the x86_64 suffix; I don’t think that existed before. However, RSTUDIO_PANDOC still has:
Describe the behavior you expected
Visual mode and tutorials should work and run with no issues or errors.