[Bioc-devel] check failure: prerequisit package does not use NAMESPACE
Seth Falcon
sfalcon at fhcrc.org
Fri Sep 15 17:10:04 CEST 2006
Hi Paul,
Paul Shannon <pshannon at systemsbiology.org> writes:
> If there's a way to work around it, I haven't been able to find it.
> Here's what happens if rJava is in the DESCRIPTION
The truth is, we haven't figured out all of the intricacies of recent
changes to R and R CMD check related to these warnings. I'm not even
convinced of the utility of checking that Bioconductor packages can be
loaded without default packages. Yes, it _should_ work, but this is a
rare use case AFAICT.
And now after responding to one developer that they should avoid calls
to require() in their code, I'm going to send you a patch that does
just this :-\
Anyhow, for me the following patch seems to fix the warnings and more
or less make sense to me. While I'm at it, I have two comments:
1. The status message from .onLoad that prints out 'First.lib' is
confusing.
2. <code_police=ON> You are among a fairly small crowd writing func
(args) instead of func(args). Just because you can be different,
doesn't mean you should be</code_police=OFF> -- its your package,
suite yourself, but it hurts my eyes [I'm sure my code is equally
painful for you to look at] ;-)
Here's the patch:
Index: R/gaggle.R
===================================================================
--- R/gaggle.R (revision 19853)
+++ R/gaggle.R (working copy)
@@ -2,6 +2,8 @@
#---------------------------------------------------------------------------------
.onLoad <- function (libname, pkgname)
{
+ require("methods")
+ require("rJava")
cat (paste ('\nFirst.lib -- libname:', libname, 'pkgname:', pkgname, '\n'))
# All Bioconductor packages should use an x.y.z version scheme. The following rules apply:
Index: DESCRIPTION
===================================================================
--- DESCRIPTION (revision 19853)
+++ DESCRIPTION (working copy)
@@ -4,7 +4,7 @@
Title: R Goose functions
Author: Paul Shannon <pshannon at systemsbiology.org>
Maintainer: Paul Shannon <pshannon at systemsbiology.org>
-Depends: R (>= 2.3.0), rJava (>= 0.4), Ruuid (>= 1.10.0), graph (>= 1.10.2)
+Depends: R (>= 2.3.0), methods, rJava (>= 0.4), Ruuid (>= 1.10.0), graph (>= 1.10.2)
Description: this package contains functions connecting R with the Gaggle
License: GPL version 2 or newer
URL: http://gaggle.systemsbiology.org
Index: NAMESPACE
===================================================================
--- NAMESPACE (revision 19853)
+++ NAMESPACE (working copy)
@@ -1,3 +1,4 @@
+import(methods)
import(graph)
export(
More information about the Bioc-devel
mailing list