Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quarto vignettes use the installed version of the package, but Rmd vignettes use the current dev version #2830

Open
venpopov opened this issue Dec 7, 2024 · 1 comment
Labels

Comments

@venpopov
Copy link

venpopov commented Dec 7, 2024

I just found out you can have Quarto vignettes and to try them out, I created a new package. I added a quarto vignette, but when I tried to build the site with build_site(), I got the following error:

── Installing package mytestpkg into temporary library ───────────────────────────────────────────
Error: 
! in callr subprocess.
Caused by error in `quarto::quarto_render(path, metadata_file = metadata_path, execute_dir = output_dir, …`:
! ✖ Error running quarto cli.
ℹ Rerun with `quiet = FALSE` to see the full error message.
Caused by error:
! System command 'quarto' failed
ℹ See `$stderr` for standard error.
Type .Last.error to see the more details.

Rendering regular .Rmd vignettes was fine. I was finally able to track down the issue: the code library(mytestpkg) in the vignette failed for the Quarto vignette, because in contrast to the Rmd vignette, it did not use see the temporary library.

Ok, so I install() the package locally and then it renders successfully. The problem is that if you make any updates, and you rebuild the website, the Quarto vignette will be built with the locally installed version, while the Rmd vignettes will be built with the current version that build_site() installs to a temporary library.

Screenshot 2024-12-07 at 07 11 58
Screenshot 2024-12-07 at 07 12 13

The deployment via github pages workflow doesn't have this problem and everything works fine, but locally Rmd and Qmd vignettes are built differently.

@hadley
Copy link
Member

hadley commented Dec 7, 2024

Hmmm, probably need to set R_LIBS to the temporary directory that we install the package into so that quarto uses it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants