Skip to content
Prev 16947 / 21312 Next

[Bioc-devel] Deprecated a contained class

Hi Martin,

Don't know how/where to implement a deprecation message that wouldn't be 
confusing for the end users.

FWIW if the replacement of class Original with class New is just a 
renaming (everything else remains the same), a situation I've dealt with 
a lot in the S4Vectors/IRanges/GenomicRanges infrastructure, I like to 
use the following pragmatic approach:

In package A:

   ## Replace Original with New in the Original class definition.
   setClass("New", ...)

   ## Define Original as an "alias" for New:
   setClass("Original", contains="New", representation("VIRTUAL"))

Then contact maintainers of packages that implement subclasses of 
Original that they should use New instead of Original. They can take 
their time because the cost of keeping the Original alias around is 
virtually zero.

H.
On 6/26/20 08:10, Martin Morgan wrote: