Larger vignettes and R CMD check warnings

On my machine when running R CMD check I use the option --compact-vignettes=qs+qpdf and get no warnings with devtools::check(args = c('--as-cran'), build_args = c('--compact-vignettes=gs+qpdf')).

I haven't been able to get clean builds with r-lib/actions/check-r-package@v2. My YAML ends with

- uses: r-lib/actions/check-r-package@v2
        with:
          args: 'c("--no-manual", "--as-cran", "--compact-vignettes=both")'

Producing a warning on check on GH:

❯ checking sizes of PDF files under ‘inst/doc’ ... WARNING
    ‘gs+qpdf’ made some significant size reductions:
       compacted ‘Using_MeanRarity.pdf’ from 795Kb to 370Kb
    consider running tools::compactPDF(gs_quality = "ebook") on these files

How can I clear this warning (and build a CRAN-compliant package with vignette...)?

Thanks!

You need build_args I think, because --compact-vignettes is an argument to R CMD build, not R CMD check.

1 Like

Thanks, that totally makes sense! I have edited the YAML so it now reads

- uses: r-lib/actions/check-r-package@v2
        with:
          args: 'c("--no-manual", "--as-cran")'
          build_args: c('--compact-vignettes=gs+qpdf')

If this works, it would be awesome if this were either standard in the r-lib action template or documented in the README. Thanks!

Posted an issue

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.