r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
642 stars 56 forks source link

Allow for skipping unavailable suggests #606

Closed jeroen closed 2 months ago

jeroen commented 3 months ago

I would like to use pak for r-universe CI/CD and reverse dependency checks. A problem is that pak(dependencies = TRUE) errors if an optional dependency is unavailable.

Sometimes a package has a Suggests on another package which is unavailable. Example from CRAN include that a suggested package has been archived, or is only available for a specific platforms, or was never on CRAN in the first place. However the main package should still pass checks (otherwise it would not be on CRAN).

If possible, it would be great to have an option to let pak give a warning instead of an error (cf install.packages) when an optional dependency is unavailable.

gaborcsardi commented 3 months ago

Do you want to (try to) install the latest package versions, or should pak prefer binary packages, even if they are older?

jeroen commented 2 months ago

Is this related to unresolvable suggests? I suppose I would prefer the binaries, which is what install.packages() seems to do these days in that situation.