Hi Laurent,
On 27 May 2011 at 17:17, Laurent Gatto wrote:
| Dear all,
|
| A basic packages with Rcpp modules produces the warning described
| below, that I would ideally, with your help, get rid of.
|
| Rscript -e "require(Rcpp); Rcpp.package.skeleton(module=FALSE)"
| R CMD check anRpackage
|
| produces obvious warnings related to badly formatted documentation and
| license. However
|
| Rscript -e "require(Rcpp); Rcpp.package.skeleton(module=TRUE)"
| R CMD check anRpackage
|
| produces this additional warning that puzzles me:
|
| [ ...checker output... ]
| * checking whether the name space can be loaded with stated
| dependencies ... WARNING
| Error: .onLoad failed in loadNamespace() for ?anRpackage?, details:
| call: value[[3L]](cond)
| error: failed to load module yada from package anRpackage
| Execution halted
|
| A namespace must be able to be loaded with just the base namespace
| loaded: otherwise if the namespace gets loaded by a saved object, the
| session will be unable to start.
|
| Probably some imports need to be declared in the NAMESPACE file.
| [ ...checker output...]
|
| I suspect this may be related to the yada module not being exposed and
| thus not available when the package is loaded. Any further explanation
| or hints would however be warmly appreciated.
I think you are pretty close. As I recall, this 'warning' has been a bit of a
wart that won't quite go away. I just checked again what we do in the unit
tests in file runit.Module.client.package.R: we build a package (ie create a
tar.gz) and then install from it. That also triggers the warning, but passes
it.
Romain may have more details about how this is related to module
initialization and startup.
Dirk