dankelley / plan

R package for project planning
https://dankelley.github.io/plan/
33 stars 9 forks source link

CRAN error on documentation alias #30

Closed dankelley closed 1 year ago

dankelley commented 1 year ago

I got as below for this and all the R packages that I maintain. I'll fix this up sometime today, likely starting with another package (plan) which is tiny and which will therefore go through tests quickly.


Dear maintainer,

You have file 'gsw/man/gsw.Rd' with \docType{package}, likely intended
as a package overview help file, but without the appropriate
PKGNAME-package \alias as per "Documenting packages" in R-exts.

This seems to be the consequence of the breaking change

 Using @docType package no longer automatically adds a -package alias.
 Instead document _PACKAGE to get all the defaults for package
 documentation.

in roxygen2 7.0.0 (2019-11-12) having gone unnoticed, see
<https://github.com/r-lib/roxygen2/issues/1491>.

As explained in the issue, to get the desired PKGNAME-package \alias
back, you should either change to the new approach and document the new
special sentinel

 "_PACKAGE"

or manually add

 @aliases gsw-package

if remaining with the old approach.

Please fix in your master sources as appropriate, and submit a fixed
version of your package within the next few months.

Best,
-k
dankelley commented 1 year ago

I'm going to try doing as at https://github.com/jonesor/mpmsim/commit/e8d0f0d657ffa24c25ddd3165c7ddcad16322e3d, and resubmitting to CRAN. The test seems to be that

package?plan

works.

The thing is, the CRAN tests are not suggesting a problem, so I don't know how to tell whether this is a fix that (a) will work now and (b) is recommended. I've searched a bit on the web for advice on best practices but not found anything that feels definitive.

dankelley commented 1 year ago

I've submitted to CRAN. Since it's a tiny package, I suspect it will go through the pipeline quickly, once it gets to the top of the queue.

To be explicit, for my other packages that have the same problem, the fix is change e.g.

#' Plan, a package for project planning
#'
#' This package provides tools for project planning, e.g. burndown charts,
#' gantt diagrams, etc.; see [burndown-class] and
#' [gantt-class] for entries to the documentation.
#'
#' @name plan
#' @docType package
#' @author Dan Kelley
NULL

to the following. (Note that the usethis comments are likely not required since I don't use that pacage. Still, I did this just in case Roxygen2 starts needing these lines in future.)

#' Plan, a package for project planning
#'
#' This package provides tools for project planning, e.g. burndown charts,
#' gantt diagrams, etc.; see [burndown-class] and
#' [gantt-class] for entries to the documentation.
#'
#' @name plan
#' @docType package
#' @author Dan Kelley
#' @keywords internal
"_PACKAGE"
## usethis namespace: start
## usethis namespace: end
NULL
dankelley commented 1 year ago

On CRAN now