r-lib / pak

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

Add a way to ignore dependencies not available in some systems #577

Open MLopez-Ibanez opened 6 months ago

MLopez-Ibanez commented 6 months ago

If a package has Rmpi in Suggests it will fail to install with pak, because Rmpi is not built for MacOS. See this example: log.txt

There does not seem to be anyway to avoid this error except ignoring the whole package with Rmpi=?ignore. It would be great if pak could have something like Rmpi=?ignore-os=macos.

Or simply check if the package is not available for some OS and skip it with a warning.

gaborcsardi commented 6 months ago

Or simply check if the package is not available for some OS and skip it with a warning.

What do you mean by "not available"? There is no binary build for it? That does not necessarily mean that it cannot be installed, e.g. new packages typically don't have binaries for a couple of days. There are no binary builds for Linux packages on R-devel, etc.

We might add an ignore-os parameter to pak. But GHA already has syntax to run different steps on different OSes, so you can already ignore Rmpi on macOS (or, even better, install its dependencies from Homebrew). So there is a straightforward workaround, I think.