Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions R/revdep.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#' Reverse dependency checks
#'
#' Performs set up for checking the reverse dependencies of an R package, as
#' Performs setup for checking the reverse dependencies of an R package, as
#' implemented by the revdepcheck package:
#' * Creates `revdep/` directory and adds it to `.Rbuildignore`
#' * Creates `revdep/` directory and adds it to `.Rbuildignore`.
#' * Populates `revdep/.gitignore` to prevent tracking of various revdep
#' artefacts
#' * Prompts user to run the checks with `revdepcheck::revdep_check()`
#' artefacts.
#' * Prompts the user to run the checks with [revdepcheck::revdep_check()].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't link to a topic in a package that's not on CRAN, which revdepcheck is not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't you link to it? Is there a CRAN rule forbidding this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically you should have a formal dependency on a package to link to its help topics:

https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Cross_002dreferences-1

Packages referred to by these ‘other forms’ should be declared in the DESCRIPTION file, in the ‘Depends’, ‘Imports’, ‘Suggests’ or ‘Enhances’ fields.

In the past, you can sort of get away with a link to something you don't depend on, sometimes. But I would not go so far for a package that is not even on CRAN.

Also CRAN is now making static HTML reference manuals, which has triggered a big wave of requests to re-release packages cleaning up various documentation loose ends. So if anything, this is all going to get even stricter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, didn't know that. Thanks for the references and explanations! I guess your reluctance is wise.

In general, I think linking to help topics would always lead to better UX than not linking, regardless of whether a package is installed or not, is on CRAN or not, etc. But of course CRAN comes up with yet another silly obstacle to sensible dev workflows1 in 2025... 🥳

Footnotes

  1. After all, the R project is one of the last non-SVN related open-source projects that still hasn't switched to Git.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addendum: We could link to the pkgdown documentation instead, WDYT?

#'
#' @export
use_revdep <- function() {
Expand Down
Loading