r-lib / remotes

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

Misleading docs: install.packages() is not where ... is passed, but update() #796

Open MichaelChirico opened 1 month ago

MichaelChirico commented 1 month ago

https://github.com/r-lib/remotes/blob/5b7eb08f70ecc4f885f2c75330ce77f87e7dd14e/R/install.R#L173

I came across this message in my GHA logs:

Skipping install of 'ggplot2' from a cran remote, the SHA1 (3.5.1) has not changed since last install. Use force = TRUE to force installation

And couldn't figure out where it's coming from ... what gets force= exactly?

I saw remotes::install_deps() referenced, but it doesn't have a force= argument, and ... points to install.packages(), which neither has a force= argument:

https://remotes.r-lib.org/reference/install_deps.html

Only plumbing through the code could I find out that it's the update() method that has the force= argument:

https://github.com/r-lib/remotes/blob/5b7eb08f70ecc4f885f2c75330ce77f87e7dd14e/R/install.R#L200-L211 https://github.com/r-lib/remotes/blob/5b7eb08f70ecc4f885f2c75330ce77f87e7dd14e/R/deps.R#L274

Wouldn't it be better in ?install_deps to point to the docs for update.package_deps() instead?