[Rd] Strange warnings when unloading packages with S4 classes

John Chambers jmc at r-project.org
Thu Dec 19 20:22:45 CET 2013


Previously reported and fixed in 3.0.2-patched (Bug 15481).  Unless there is a 3.0.3, you will have to wait for 3.1.0.

On Dec 19, 2013, at 10:19 AM, Winston Chang <winstonchang1 at gmail.com> wrote:

> I've been seeing warnings when unloading packages. They can be seen with
> the shiny and sp packages, among others (this is on R 3.0.2). For example:
>> library(sp)
>> unloadNamespace('sp')
> Warning messages:
> 1: In FUN(X[[2L]], ...) :
>  Created a package name, ‘2013-12-19 12:14:24’, when none found
> 2: In FUN(X[[2L]], ...) :
>  Created a package name, ‘2013-12-19 12:14:24’, when none found
> 3: In FUN(X[[2L]], ...) :
>  Created a package name, ‘2013-12-19 12:14:24’, when none found
> 4: In FUN(X[[2L]], ...) :
>  Created a package name, ‘2013-12-19 12:14:24’, when none found
> 
> It appears to be related to the methods:::.removeSuperclassBackRefs
> function.
> 
> 
> I can get the warnings to appear when the following are both true:
> * The package has an S4 class which inherits from a class outside of the
> package.
> * The NAMESPACE file contains import(methods)
> 
> I've created some very simple test packages here which illustrate the
> problem, along with instructions on how to duplicate the warning.
> https://github.com/wch/s4unload
> 
> The warnings only appear when unloading the package where both of the
> conditions above are true. I'm not sure why import(methods) should make a
> difference, but it does.
> 
> Is this a bug in the implementation of S4?
> 
> Best,
> -Winston
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list