Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread John Fox
Dear Ben, I was hoping that someone would pick up on this problem, because I've experienced the same issue of --compact-vignettes apparently ignored, e.g., with the Rcmdr package under R 4.0.2 on both macOS and Windows. Best, John John Fox, Professor Emeritus McMaster University Hamilton,

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread Duncan Murdoch
On 07/10/2020 8:32 p.m., Ben Bolker wrote: Thanks for the tip, I'll take a look. Given that three relatively experienced package authors all seem to have experienced similar issues, it seems that maybe this is worth figuring out/maybe I'm not just doing something boneheaded. Just to

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread Ben Bolker
Thanks for the tip, I'll take a look. Given that three relatively experienced package authors all seem to have experienced similar issues, it seems that maybe this is worth figuring out/maybe I'm not just doing something boneheaded. cheers Ben On 10/7/20 8:31 PM, Duncan Murdoch

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread Ben Bolker
OK, I think I see the problem. tl;dr use --compact-vignettes="both" when building the vignettes. --compact-vignettes by default only tries qpdf. when the R CMD check --as-cran is run, it tries both qpdf and gs. Since gs (apparently, in this case) compresses more aggressively than

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread Duncan Murdoch
I don't know the answer to your question, but you can debug the --compact-vignettes option as follows. debug(tools::compactPDF) tools:::.build_packages(c("--compact-vignettes", "pkgdir")) where "pkgdir" is the directory of the source of your package. Add extra options to the build as

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread Ben Bolker
On 10/7/20 8:35 PM, Duncan Murdoch wrote: On 07/10/2020 8:32 p.m., Ben Bolker wrote:     Thanks for the tip, I'll take a look.     Given that three relatively experienced package authors all seem to have experienced similar issues, it seems that maybe this is worth figuring out/maybe I'm

Re: [R-pkg-devel] is R CMD build --compact-vignettes working as expected?

2020-10-07 Thread John Fox
Dear Ben, On 2020-10-07 5:26 p.m., Ben Bolker wrote:   I hope so too. The (annoying) workaround is to compact the vignette yourself (using qpdf directly or using tools::compactPDF), then use no-build-vignettes.  The problem there is whatever's supposed to happen with building vignette