[Rd] CRAN build/checks: Dependencies on non-CRAN packages?

Henrik Bengtsson hb at stat.berkeley.edu
Mon Jun 8 10:02:36 CEST 2009

On Mon, Jun 8, 2009 at 12:29 AM, Kurt Hornik<Kurt.Hornik at wu.ac.at> wrote:
>>>>>> Henrik Bengtsson writes:
>> On Sun, Jun 7, 2009 at 11:49 PM, Kurt Hornik<Kurt.Hornik at wu.ac.at> wrote:
>>>>>>>> Henrik Bengtsson writes:
>>>> Hi,
>>>> how is the CRAN build/check system dealing with dependencies on
>>>> non-CRAN packages?  Are there external repositories that are dealt
>>>> with in special ways, e.g. Bioconductor and Omegahat?  Is this
>>>> documented somewhere?
>>>> The most recent note on this that I could locate is "[Rd] CRAN,
>>>> Bioconductor and ctv package dependency questions", Kurt Hornik, Sept
>>>> 8, 2005;
>>>> https://stat.ethz.ch/pipermail/r-devel/2005-September/034547.html.
>>>> Does the comments in that thread still reflect how CRAN works?
>>> Not quite.  No more special casing of BioC or Ohat dependencies: they
>>> simply "work", and packages with such dependencies can fully be checked.
>> Hmm... so you're saying R CMD check pass ("work") although a package
>> is missing?
> Are you asking what happens if a CRAN package depends on a BioC package
> which is missing from BioC?

No, my question was what happens if your CRAN package depends on
non-CRAN packages.  In the above Sept 2005 thread, I read "The only
catch is that in the current setup of daily CRAN package
checking, packages with non-CRAN dependencies are checked ***using
fake or no installs***."  I though your term "work" meant the same as
"using fake or no installs".

> You can safely assume the availability of BioC and Ohat packages
> (provided we can install these).  We do not accept packages with
> unconditional (depends/imports) dependencies on package not in the
> standard repositories, but do not force the availability of suggested
> packages: so you can suggest an external package (but R CMD check should
> still pass if the package is not available).

Ok, this clarifies a few things. So:

1) One can assume that packages on CRAN, Bioconductor (release and/or
devel?), and Omegahat are available on the CRAN servers.
2) One cannot assume that packages from other repositories, including
r-forge.r-project.org, are available.
3) When R CMD check is ran on the CRAN servers it will not give an
error for non-available packages that are listed under "Suggests:" in
the DESCRIPTION file (as R CMD check would do by default).

However, in my example example() code below, I would expect R CMD
check to still fail if you list 'externalPkg' under "Suggests"; it
will pass the package/code validation, but when running the examples,
it will fail, either because of the require(...) || stop(...)
statement or because there is no way 'res' would have value 42 unless
the package really exists.

Yet another feature request (just a suggestion): It could be useful
provide a file with the packages installed on each "check" server,

data <- installed.packages();
data <- paste(data[,"Package"], data[,"Version"], sep=" ");
cat(data, sep="\n");



> Best
> -k
>> If so, what about example/test code where that external package is
>> loaded?  ...or even harder, where a function of that external package
>> is called, e.g.
>> require("externalPkg") || stop(...);
>> res <- externalPkg::specialFcn(...);
>> stopifnot(identical(res,42));
>> ...
>> This is not a constructed example; I do have some example():s].
>> Thxs
>> Henik
>>> -k
>>>> Thanks
>>>> Henrik
>>>> ______________________________________________
>>>> R-devel at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list