Hi folks,

  I got the dreaded

Version contains leading zeroes

NOTE from a package check - the version was 0.0.1.000.

until I dug into the code and found the regex "(^|[.-])0[0-9]+" I didn't realize the restriction was on leading zeroes *within a version component* - I was interpreting it as leftmost in the whole version (i.e., the initial 0).

I eventually found the documentation in ?package_version (feels like it should also be pointed to somewhere in Writing R Extensions?

Numeric versions are sequences of one or more non-negative
     integers, usually (e.g., in package ‘DESCRIPTION’ files)
     represented as character strings with the elements of the sequence
     concatenated and separated by single ‘.’ or ‘-’ characters.  R
     package versions consist of at least two such integers, an R
     system version of exactly three (major, minor and patchlevel).

Doesn't say anything about leading zero(e)s here ...

"Zeroes" looks weird to me, but I see that "zeroes" is used on 26 lines in .Rd files in the R code base, while "zeros" is used on 36 lines ... so close to a tie. (Maybe someone wants to clean this up ... ? Maybe a mini-project for the R bug sprint at the end of the summer?

Also, I'm sure this has been asked a few 100 times but: a new-to-CRAN maintainer triggers a NOTE. Is there any way that a new user would know that this was informational only? (There is also a Note_to_CRAN_maintainers <https://github.com/r-devel/r-svn/blob/0252cdbf14c73acd26ae2090df3c04aa6118b523/src/library/tools/R/check.R#L6009>: wouldn't that be more appropriate here?)

  cheers
   Ben Bolker

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to