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

Make it possible to preview built vignettes during CRAN submission #2485

Open
jennybc opened this issue Nov 17, 2022 · 4 comments
Open

Make it possible to preview built vignettes during CRAN submission #2485

jennybc opened this issue Nov 17, 2022 · 4 comments

Comments

@jennybc
Copy link
Member

jennybc commented Nov 17, 2022

Inspired by revising the vignettes chapter of R Packages.

One thing that has come into focus is that we want to discourage the keeping of built vignettes inside a source package, meaning below inst/doc/. The need to do this has been greatly reduced by pkgdown (esp. + GitHub Actions + GitHub Pages), which offers a way to make built vignettes readily available for GitHub-only packages, for dev versions, etc.

But to take this position, you really do have to think about and address all the reasons that people have historically wanted to keep these built products around. One motivation is that sometimes you want to look over the built vignettes you're sending to CRAN, since they are, in fact, what CRAN will ultimately distribute. This is especially true if you've had to do anything tricky with eval.

Currently release() and submit_cran() are monolithic, i.e. there's no way to pause between package build and submission, right around here:

built_path <- pkgbuild::build(pkg$path, tempdir(), manual = TRUE, args = args)

We could have a yesno() to browse the built vignettes and, if yes, to approve them and proceed with submission.

@MLopez-Ibanez
Copy link

The time is not the issue. I further compress the PDF vignette after creating the *.tar.gz because R CMD build does not go far enough.

@jennybc
Copy link
Member Author

jennybc commented Nov 26, 2024

I further compress the PDF vignette after creating the *.tar.gz because R CMD build does not go far enough.

@MLopez-Ibanez I suspect this means you're not going to be able to use devtools to submit. I don't see us facilitating this sort of surgery.

Sidebar: Have you ever actually succeeded doing this getting that *.tar.gz onto CRAN? I once tried to unpack the *.tar.gz from R CMD build, insert vignettes I had built (with auth, in my case), and repacked it. But then this artefact got rejected for some reason like ... the tar version used in repacking was wrong. Now I can't remember if I saw the failure locally or upon submission. The details don't really matter, my point is that I suspect this vignette maneuver is going to be a persistent pain in the rear.

@MLopez-Ibanez
Copy link

Sidebar: Have you ever actually succeeded doing this getting that *.tar.gz onto CRAN? I once tried to unpack the *.tar.gz from R CMD build, insert vignettes I had built (with auth, in my case), and repacked it. But then this artefact got rejected for some reason like ... the tar version used in repacking was wrong. Now I can't remember if I saw the failure locally or upon submission. The details don't really matter, my point is that I suspect this vignette maneuver is going to be a persistent pain in the rear.

You can see the script I am using here: https://github.com/MLopez-Ibanez/irace/blob/master/scripts/recompact.sh

It is not inserting a new vignette. It is just replacing the vignette PDF with one that is compressed as much as it is possible.

It seems to work fine in CRAN. Yes I cannot use devtools to submit, but the alternative is that CRAN complains that my vignettes are too large, which is even more painful. If devtools could fix that, I'll happily get rid of my script!

@MLopez-Ibanez
Copy link

Sorry, I just realised that I am replying to the wrong issue. All these comments were meant for #2588

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

No branches or pull requests

2 participants