[R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?
edd at debian.org
Sun Feb 25 01:09:59 CET 2018
On 25 February 2018 at 00:45, Marius Hofert wrote:
| A package 'foo' uses a package 'bar' (in Imports). 'bar' has been
| archived and the maintainer of 'foo' was asked to fix the dependency
| on 'bar' according to WRE 18.104.22.168.
| Working with 'bar::' everywhere (and requireNamespace("bar", quietly =
| TRUE)), as well as moving 'bar' from Imports to Suggests seems to work
| but is not accepted on submission. Removing 'bar' also from Suggests
| leads to
| '::' or ':::' import not declared from: ‘bar’
| 'loadNamespace' or 'requireNamespace' call not declared from: ‘bar’
| Does this mean it is not possible to use 'bar' anymore in 'foo'?
Your title says "conditionally".
Does your code actually behave conditionally, ie does foo check if bar is
available, and only use its code if it is?
One additional difficulty may be that even for Suggests, it still has to be
accessible "somewhere" . And "archived" is not. You could just move bar
onto a drat repo you set yp -- we have done the same for data packages and
have a R Journal paper describing it:
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the R-package-devel