From jmc at r-project.org  Thu Dec 19 20:22:45 2013
From: jmc at r-project.org (John Chambers)
Date: Thu, 19 Dec 2013 11:22:45 -0800
Subject: [Rd] Strange warnings when unloading packages with S4 classes
In-Reply-To: <CAFOpNVG5S1eLSe5bb3NfOxhp3zTYthk50ODFYHTxoYvzjDMOzw@mail.gmail.com>
References: <CAFOpNVG5S1eLSe5bb3NfOxhp3zTYthk50ODFYHTxoYvzjDMOzw@mail.gmail.com>
Message-ID: <9AA8DFF7-B07E-4A14-BBD6-92449741947E@r-project.org>

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



[Rd] Strange warnings when unloading packages with S4 classes
John Chambers