Skip to content
Prev 11121 / 21312 Next

[Bioc-devel] Deprecating a class

Hi Carlos,

Deprecating the constructors should be enough if you don't expect that
your users have serialized instances of the class around (i.e. objects
that they saved to disk with save() or saveRDS()).

It's actually impossible to know whether your users have done this or
not but they would typically do this only if these objects take a long
time to compute or if the typical workflow that you present in your
vignette encourages this. If it's the case then the situation is a
little bit more complicated:

   - You would need to provide a coercion method from this class to the
     replacement class.

   - You would also need to put a deprecation warning in all the methods
     defined on this class (this includes validity and show methods if
     you've defined them, and also coercion methods *to* this class. The
     deprecation warning would typically explain how to coerce the
     deprecated object to the new replacement class.

Hope this helps,
H.
On 06/27/2017 01:50 AM, Carlos Ruiz wrote: