Many many thanks for the clarification, which is very clear! The case
of testthat is a very good example, as many packages suggest it.

Regards,
Shu Fai


On Sat, Nov 4, 2023 at 4:41 PM Iñaki Ucar <iu...@fedoraproject.org> wrote:
>
>
>
> El sáb., 4 nov. 2023 5:43, Shu Fai Cheung <shufai.che...@gmail.com> escribió:
>>
>> Hi All,
>>
>> I vaguely recall that, on CRAN, if PkgA imports PkgB, then PkgB cannot
>> import PkgA. (Please correct me if I am wrong.)
>>
>> How about this?
>>
>> PkgA imports PkgB (because PkgA has some helper functions for using PkgB)
>> PkgB suggests PkgA (because some vignettes or examples in PkgB use
>> those helpers from PkgA)
>
>
> Or some tests are based on PkgA, or...
>
>> Is this allowed on CRAN?
>
>
> Yes, it is. For example: testthat imports a bunch of packages to do is thing, 
> and those packages suggest testthat because their test suite is based on it.
>
> Cycles of hard dependencies (Depends, Imports) are not allowed for obvious 
> reasons. But packages should install and work without soft dependencies, so 
> there's no problem there.
>
> Iñaki

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to