Open
Description
If a package has already been installed, attempting to install it again with a broader set of dependencies has no effect. One would expect that the additional dependencies would be installed.
pak::pak("<remote>") # installs package and hard dependencies
pak::pak("<remote>", dependencies = TRUE) # will not install new dependencies if package is already installed
Example
Using https://github.com/ddsjoberg/gtsummary as an example, which takes two remote dependencies:
Remotes:
github::insightsengineering/cards, # Imports dependency
github::insightsengineering/cardx # Suggests dependency
Installing with pak::pak("ddsjoberg/gtsummary@518be7d8")
, as expected cards
gets installed, but not cardx
> pak::pak("ddsjoberg/gtsummary@518be7d8")
→ Will install 17 packages.
+ cards 0.1.0.9046 [bld][cmp] (GitHub: b890c25)
Then attempting to install with suggested dependencies using pak::pak("ddsjoberg/gtsummary@518be7d8", dependencies = TRUE)
> pak::pak("ddsjoberg/gtsummary@518be7d8", dependencies = TRUE)
✔ All system requirements are already installed.
ℹ No downloads are needed
✔ 1 pkg + 62 deps: kept 62 [3.7s]
However, if I remove.packages("gtsummary")
and try again:
> pak::pak("ddsjoberg/gtsummary@518be7d8", dependencies = TRUE)
→ Will install 82 packages.
→ Will download 51 CRAN packages (48.07 MB), cached: 31 (28.86 MB).
+ cardx 0.1.0.9067 [bld][cmp] (GitHub: 738e4e4)