[R-pkg-devel] rmarkdown vignette build failures?

Sebastian Meyer @eb@meyer @end|ng |rom |@u@de
Tue Apr 5 22:57:46 CEST 2022


Am 05.04.22 um 18:00 schrieb Ben Bolker:
>    I'm sure I'm doing something silly, but I've recently started having 
> a problem building vignettes (with R Under development (unstable) 
> (2022-04-05 r82094) -- "Unsuffered Consequences")
> 
>    Is anyone else seeing this?
> 
> $ R CMD build broom.mixed
> * checking for file ‘broom.mixed/DESCRIPTION’ ... OK
> * preparing ‘broom.mixed’:
> * checking DESCRIPTION meta-information ... OK
> * installing the package to build vignettes
> * creating vignettes ...Error in find_vignette_product(name, by = 
> "weave", dir = docdir, engine = engine) :
>    Failed to locate ‘weave’ output file ‘broom_mixed_intro.pdf’ or 
> ‘broom_mixed_intro.html’ for vignette with name ‘broom_mixed_intro’ and 
> engine ‘utils::Sweave’. The following files exist in working directory 
> ‘/tmp/Rtmp7rjAe4/Rbuild3978f3146b8cd8/broom.mixed/vignettes’: 
> ‘broom_mixed_intro.rmd’ (6322 bytes)
> Execution halted
> 
>    The weird thing here is that I don't see why R is trying to use 
> utils::Sweave ?  

I wasn't able to reproduce the build failure, but the reported vignette 
engine seems to be wrong. Indeed, there was an old (2013) bug in 
tools::pkgVignettes() that caused the reported engine in that error 
message to *always* be 'utils::Sweave'. I have just fixed that in 
R-devel (c82097, also ported to R-alpha, to be rebuilt in a few hours) 
but that won't solve the build failure itself.

The build failure most likely comes from

     # Rescan for weave and tangle output files
     vigns <- pkgVignettes(dir = '.', output = TRUE, source = TRUE)

after "successful" (only in the sense of not throwing an error) 
'buildVignettes(dir = '.', tangle = TRUE)', where 'dir' is the package 
source directory. Running these commands (from library("tools")) 
interactively should help debugging the problem at your end. From the 
error message it seems that buildVignettes() did not produce any output 
files.

	Sebastian Meyer


> The DESCRIPTION file has VignetteBuilder: knitr and the 
> head of the vignette file has
> 
> vignette: >
>    %\VignetteIndexEntry{introduction to broom.mixed}
>    %\VignetteEngine{knitr::rmarkdown}
>    \usepackage[utf8]{inputenc}
> 
>   ...
> 
>   I could swear this used to work ...
> 
>    cheers
>    Ben Bolker
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list