[R-pkg-devel] dependency cycle

Berry Boessenkool berryboessenkool at hotmail.com
Tue Jun 13 15:01:07 CEST 2017


I have a package A. Some of its functions are used in package B.

B imports A in the DESCRIPTION, both are on CRAN.

A has a function fff where I want to add some optional functionality.

The problem: that optional stuff uses code in package B.

I feel like I have two bad options:

- put fff in a package C that imports both A and B.
However, C would really be too small to be on CRAN.
Also, some people already know of A::fff and I'm rather inclined to keep it there.

- put B in Suggests and make the optional part of fff conditional on requireNamespace("B").

But then B imports A while A suggests B, which sounds dangerous.

Any ideas on what I could/should do here?

Thanks ahead,


	[[alternative HTML version deleted]]

More information about the R-package-devel mailing list