Re: [Rd] Strange warnings when unloading packages with S4 classes

2013-12-19 Thread Winston Chang
(Sorry, this was previously sent with HTML mail. Resending in plain text.)

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

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Strange warnings when unloading packages with S4 classes

2013-12-19 Thread John Chambers
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 winstoncha...@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@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Strange warnings when unloading packages with S4 classes

2013-12-19 Thread Winston Chang
Excellent, thanks.

-Winston

On Thu, Dec 19, 2013 at 1:22 PM, John Chambers j...@r-project.org wrote:
 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 winstoncha...@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@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel