[R-pkg-devel] CRAN Windows failure due to old pandoc ?

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Sat Sep 26 18:54:34 CEST 2020


On 26 September 2020 at 11:50, Duncan Murdoch wrote:
| On 26/09/2020 9:14 a.m., Dirk Eddelbuettel wrote:
| > 
| > I had a submission fail and bomb with this error on Windows:
| > 
| >    Flavor: r-devel-windows-ix86+x86_64
| >    Check: re-building of vignette outputs, Result: WARNING
| >      Error(s) in re-building vignettes:
| >      --- re-building 'vignettefilename.Rmd' using rmarkdown
| >      pandoc.exe: unrecognized option `--lua-filter'
| >      unrecognized option `--lua-filter'
| >      unrecognized option `--lua-filter'
| >      Try pandoc.exe --help for more information.
| >      Error: processing vignette 'vignettefilename.Rmd' failed with diagnostics:
| >      pandoc document conversion failed with error 2
| >      --- failed re-building 'vignettefilename.Rmd'
| >      
| >      SUMMARY: processing the following file failed:
| >        'vignettefilename.Rmd'
| >      
| >      Error: Vignette re-building failed.
| >      Execution halted
| > 
| > This looks like a host configuration problem:
| > 
| >    edd using rob:~$ pandoc --help | grep lua
| >      -L SCRIPTPATH         --lua-filter=SCRIPTPATH
| >    edd using rob:~$ pandoc --version | head -1
| >    pandoc 2.9.2.1
| >    edd using rob:~$
| > 
| > Can we expect CRAN to update its pandoc binary? Or will we have to 'for now'
| > rely on 'reply-all', explaining to CRAN that the failure is from their end?
| > 
| > As they in the press, I had reached out to CRAN but they 'have not yet
| > responded to requests for comments' as we know they're busy. Anybody seen
| > this error though?
| 
| I haven't seen that one, but I regularly get errors in rgl and tables 
| because of missing or insufficient pandoc on some systems.  I added 
| lines like
| 
|    SystemRequirements:  pandoc (>= 1.12.3) for vignettes
| 
| to DESCRIPTION to state the Pandoc version, added rmarkdown to the 
| Suggests list, and added code like this to the start of HTML vignettes:
| 
| ```{r echo = FALSE}
| if (!requireNamespace("rmarkdown") || 
| !rmarkdown::pandoc_available("1.12.3")) {
|    warning("This vignette requires pandoc version 1.12.3; code will not 
| run in older versions.")
|    knitr::opts_chunk$set(eval = FALSE)
| }
| ```

Good point!  Brooke and I actually recommend exactly that---conditional
vignette builds---in our R Journal paper on drat for data repos (via Suggests).

But (because of the overall fragility of these pipelines as well as
preference for generally lighter setups) my vignettes actually tend to not
even run code.  I mostly just use three backticks followed by the language
for which I desire highlighting from pandoc, i.e. ```r or ```c++.

Maybe we would need to pass the minimum version check into rmarkdown as an
option so that rmarkdown knows not to ask for `--lua-filter` on setups where
rmarkdown knows pandoc is too old?  Or maybe make the vignette builder barf?
 
| This makes the test happy, though it also makes the vignette pretty 
| useless on systems that don't meet the stated requirements.  Since 
| SystemRequirements is free-form, I can see why CRAN doesn't do automatic 
| interpretation of it, but it would be nice if they did.

Alas, the free-form requirement has been a constraint for a long time indeed.

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-package-devel mailing list