[Bioc-devel] affypdnn: Request for moving "Depends" packages to "Suggests"

Henrik Bengtsson hb at stat.berkeley.edu
Tue Jul 1 22:33:20 CEST 2008


Hi,

my comment below on users not able to install missing packages.

On Tue, Jul 1, 2008 at 3:22 AM, Robert Gentleman <rgentlem at fhcrc.org> wrote:
> Hi Richard,
>
> Richard Pearson wrote:
>>
>> Hi
>>
>> I guess you mean require() here, or is there a request() function that I'm
>> not aware of?
>>
>> I'm sorry to say I'm still a little confused as to the effects of moving
>> something from Depends to Suggests. I realise that one effect of this is
>> that the package in Suggests won't get loaded until needed, which is
>> generally a good thing. However, isn't a side effect of this that the
>> package in Suggests won't get installed by biocLite()?
>
>  Yes, and so it should only be used if the functionality is for fairly
> specialized tasks that are not likely to be carried out by all users. The
> network of Dependencies can get very large, and the number of packages a
> user has to install that they never use should be minimized if possible
> (whence the Lite in biocLite).
>
>  However, a review of Suggests, Depends, and package size is something that
> package developers should be carrying out regularly.  There are some
> examples where the need for dependencies has essentially gone away but the
> package has never been cleaned up to reflect that. Or where Dependencies
> would be better handled via imports.
>
>>
>> Lets say I'm developing a package foop which has a function foo(). foo()
>> uses the function bar() from package barp. Many users use foop without ever
>> using foo(). Therefore it would seem sensible to put barp in Suggests so it
>> doesn't get loaded all the time, but rarely used. However, if a user
>> installs foop on a fresh R installation using biocLite(), they will get an
>> error when trying to use foo(). A non-expert user might at this point simply
>> think that foop is broken and give up. What's the recommended strategy in
>> this scenario? If barp has a
>
>   One certainly hopes that even naive users could see and interpret the
> corresponding error message. And you as the developer of foop could
> intervene directly, by either printing a specific warning, or as some have
> done (not always very well) automatically downloading the needed package at
> run time (possibly after asking the user).

I second this.

It would also not be hard to have library()/require() throw errors of
a specific class, say MissingPackageError, and then have an exception
handling that do what ever the user/developer prefers.  If such an
error reaches the "user/prompt", there could be user options() saying
what to do, e.g. today's error message is display, a prompt (text or
GUI) is display asking the user if s/he wants to download and install
the missing package, or install the package automatically, and then
continue.

/Henrik

>
>> namespace, should I put barp in Imports (so it gets installed by
>> biocLite), and then access bar() using barp::bar()? What should I do if barp
>> has no namespace? Should I recommend to the barp maintainer that they add
>> one? More likely, have I completely misunderstood
>> Depends/Suggests/Imports/biocLite...?
>
>  There is also the issue that some packages Depend on foop, when indeed they
> really only want to Import from foop.  This is also something that could be
> cleaned up. Both Depends and Suggests have the effect of attaching the
> package to the searchpath and that can have unwanted effects.  Cleaning up a
> number of these instances would also help.
>
>  For namespaces Luke Tierney's R News article is the only real reference I
> know of.  Other issues are discussed in the R Extensions manual, and on-line
> man pages.
>
>  best wishes
>    Robert
>
>>
>> No doubt this is covered in documentation someplace, any pointers
>> appreciated!
>>
>> Thanks
>>
>> Richard.
>>
>>
>> Henrik Bengtsson wrote:
>>>
>>> Hi,
>>>
>>> this one is mainly for the maintainer (Laurent Gautier), but I post it
>>> to bioc-devel also as request to minimize package dependencies in R
>>> and BioC in general:
>>>
>>> The current DESCRIPTION of 'affypdnn' is:
>>>
>>> Package: affypdnn
>>> Version: 1.14.3
>>> Depends: R (>= 2.3.0), affy (>= 1.5), affydata, hgu95av2probe
>>>
>>> Could you please update this to:
>>>
>>> Package: affypdnn
>>> Version: 1.14.3
>>> Depends: R (>= 2.3.0), affy (>= 1.5)
>>> Suggests: affydata, hgu95av2probe
>>>
>>> and use request("affydata") and request("hgu95av2probe") where those
>>> two are actually needed?
>>>
>>> Cheers
>>>
>>> Henrik
>>>
>>> _______________________________________________
>>> Bioc-devel at stat.math.ethz.ch mailing list
>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>>
>>
>
> --
> Robert Gentleman, PhD
> Program in Computational Biology
> Division of Public Health Sciences
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N, M2-B876
> PO Box 19024
> Seattle, Washington 98109-1024
> 206-667-7700
> rgentlem at fhcrc.org
>



More information about the Bioc-devel mailing list