[Bioc-devel] Depending vs. Importing?

Byron Ellis ellis at stat.harvard.edu
Mon Jul 10 08:55:46 CEST 2006

Yes, this is exactly the situation that Suggests handles (in fact,  
rflowcyt suggests xgobi in addition to the 16 or so it requires).

Import on the other hand happens at package load time and as such  
prevents the successful loading of the package. So it seems while  
there might be some semantic difference between Depending versus  
Importing, say, importing a package makes it accessible to the  
package but not necessarily the console while dependence makes the  
package also available to the console, there is no practical  
difference in terms of the proper functioning of the package.

Ultimately, this is probably a topic for R-devel rather than  
Bioconductor, but my R-devel mail hasn't been getting delivered  
reliably. :-)

On Jul 9, 2006, at 4:24 AM, Oleg Sklyar wrote:

> Without going to your particular example, the main difference as I see
> it, is that developers using import can still make the packages usable
> in case a dependency is broken.
> Suppose your package is intended for some complex analysis (for  
> which it
> does not need anything) and can additionally produce some fancy
> graphical output of the analysis if it loads a dependency. Now if this
> dependency is broken (missing, cannot be compiled etc) - with depends
> your package will fail to install; with import the package developer
> could have tested for the result and implemented some simple plots if
> the dependency is broken - but the package would still work for the
> analysis.
> If however, the package fails to work completely when it cannot import
> something, then such import should go into depends to allow for the
> error during the installation time.
> Generally, you do not want to make a package totally non-functional  
> if 1
> of 10 dependencies fails, therefore it is reasonable to use import for
> lesser important features of the package.
> Cheers,
>   Oleg
> Byron Ellis wrote:
>> Is there any particular reason Imports and different from
>> Dependencies? I may be missing something, but importing would seem to
>> imply a dependence relationship which doesn't appear to be honored.
>> rflowcyt (not to pick on it, it just happened to be the package I
>> tried to load) for example imports but does not depend on prada.
>> ---
>> Byron Ellis (ellis at stat.harvard.edu)
>> "Oook" -- The Librarian
>> _______________________________________________
>> Bioc-devel at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
> -- 
> Dr. Oleg Sklyar
> European Bioinformatics Institute
> Wellcome Trust Genome Campus
> Hinxton
> Cambridge CB10 1SD
> England
> Tel   +44-1223-494466
> Fax   +44-1223-494468
> email osklyar at ebi.ac.uk

Byron Ellis (ellis at stat.harvard.edu)
"Oook" -- The Librarian

More information about the Bioc-devel mailing list