hadley / r-pkgs

Building R packages
https://r-pkgs.org
Other
869 stars 631 forks source link

Not updating release version in DESCRIPTION prior to devtools::check() and devtools::check_win_devel() gives warnings #1028

Open pvanlaake opened 10 months ago

pvanlaake commented 10 months ago

In section 22.1 it says that, after running use_release_issue(), "we don’t actually increment the version in DESCRIPTION until later in the process (section 22.7)". This, however, generates a warning with devtools::check(remote = T, manual = T) and devtools::check_win_devel():

❯ checking CRAN incoming feasibility ... [4s/21s] WARNING
  Maintainer: ‘Patrick Van Laake <patrick@vanlaake.net>’

  Insufficient package version (submitted: 1.1.0, existing: 1.1.0)

I understand that updating DESCRIPTION later on in the process will make the warning go away upon submission and remote checks so if there is some deeper reasoning behind not updating DESCRIPTION at the start of the process (of which I profess to be ignorant), then I believe there should be a flag to the reader that warnings are forthcoming.

Otherwise, I keep your excellent book under my virtual pillow!

jennybc commented 10 months ago

If you're following the version number management strategy laid out in R Packages, you'll never be in this situation:

(submitted: 1.1.0, existing: 1.1.0)

https://r-pkgs.org/lifecycle.html#sec-lifecycle-version-number-tidyverse

https://r-pkgs.org/release.html#sec-release-post-acceptance

As soon as we successfully release, we immediately bump to a dev version that is greater than the released version with usethis::use_dev_version().

That being said, when you submit a package with such a version to win-builder, leading up to a CRAN submission, you will get a NOTE about it along these lines:

Version contains large components (0.0.0.9000)

We just live with that, i.e. we're used to seeing it and we know it won't be true at the moment of actual submission. I'm OK with the current text.

But if you're feeling motivated, I'd also be happy to review a PR in the neighborhood of 22.4, where we say:

Note that there will always be one NOTE when you first submit your package. This reminds CRAN that this is a new submission and that they’ll need to do some extra checks. You can’t eliminate this NOTE, so just mention in cran-comments.md that this is your first submission.

The NOTE about "large components" is another one that might alarm someone preparing one of their first CRAN submissions, so it's reasonable to address it.

pvanlaake commented 10 months ago

My bad, I didn't use a development version. By way of penitence, I have made a PR (#1030) for an additional paragraph in section 22.4, immediately under the first two bullet points.