Package B should import only the packages and functions that are used by 
package B. If package B does not use functions from package C, package B should 
not import package C. What package A does is package A's problem, not package 
B's. If package A requires package C, install.packages() will automatically 
install it when package C is being installed, just as package C is installed 
when package B is being installed.

I submit the following thought experiment: suppose that, at a later point in 
time, package A is re-written to not need package C. In this case, it would be 
incorrect for package B to still needlessly import package C.

Best,
Cesko

Op 10-10-2019 om 17:14 schreef neonira Arinoem:
Suppose package B imports package A and package A imports package C.

Shall package B import package C, knowing that package B will use functions
from package A that are using functions from package C ?


Currently, package B imports package C. This leads to a note from CRAN
stating

Namespace in Imports field not imported from: ‘lubridate’
   All declared Imports should be used.

Doing so, I expect package B user not to worry about needed package B
dependencies.

  What is the best way to to manage package transitive dependencies, in such
a case ?

Neonira.

        [[alternative HTML version deleted]]

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


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

Reply via email to