r-lib / remotes

Install R packages from GitHub, GitLab, Bitbucket, git, svn repositories, URLs
https://remotes.r-lib.org/
Other
330 stars 152 forks source link

Documentation of `dependencies` argument is sub-optimal for functions that inherit it #730

Open EmilHvitfeldt opened 1 year ago

EmilHvitfeldt commented 1 year ago

install_deps() and install_dev_deps() are documented together, but since they have different defaults for the dependencies argument, they conflict with the documentation from remotes::install_deps that states

Which dependencies do you want to check? Can be a character vector (selecting from "Depends", "Imports", "LinkingTo", "Suggests", or "Enhances"), or a logical vector.TRUE is shorthand for "Depends", "Imports", "LinkingTo" and "Suggests". NA is shorthand for "Depends", "Imports" and "LinkingTo" and is the default. FALSE is shorthand for no dependencies (i.e. just check this package, not its dependencies).

jennybc commented 1 year ago

devtools::install_deps() and install_dev_deps() inherit the documentation of the dependencies argument from remotes::install_deps(), which in turns inherits the documentation from remotes::package_deps(). I'm going to transfer this to remotes.

I'd say doing anything about this is a rather low-priority, since we regard remotes as semi-sunsetted in favour of pak and I don't think anyone is truly or often confused by this.

But to record the problem:

gaborcsardi commented 10 months ago

In general it is pretty hard to optimize documentation in a way that it can be inherited into other packages, especially for arguments with such complex semantics as dependencies. We can fix this issue here, but it will be pretty hard to make sure that it is correct in other packages.