From hb at stat.berkeley.edu  Mon Jun  8 10:02:36 2009
From: hb at stat.berkeley.edu (Henrik Bengtsson)
Date: Mon, 8 Jun 2009 01:02:36 -0700
Subject: [Rd] CRAN build/checks: Dependencies on non-CRAN packages?
In-Reply-To: <18988.48588.186348.111974@fangorn.hornik.net>
References: <59d7961d0906071351l3ac15583l1a780c92c11df7a3@mail.gmail.com> 
	<18988.46193.914032.842613@fangorn.hornik.net>
	<59d7961d0906080023h443e2e23i88aa5932bfda2d05@mail.gmail.com> 
	<18988.48588.186348.111974@fangorn.hornik.net>
Message-ID: <59d7961d0906080102m4458c3c1we33d891d37b434f7@mail.gmail.com>

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,
e.g.:

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

Cheers

Henrik

>
> 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
>>>
>>>
>
>



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