Hi all,
In the issue tracker, there are many issues to deprecate several classes. so, What do you do in order to deprecate a class? Could you explain the procedure to deprecate a class? Thanks. |
This is not easy. So far I saw several things:
1) move the class to a package Deprecated12 or Deprecated13 or whatever pharo version. 2) Nuke the class: empty the method dictionary. That way, you can load code that use such class but you will have lots of dnu at runtime I am not sure which is the desired behavior now. Of course, a correct way to deprecate classes would be awesome, but I guess it is not that easy. On Mon, Aug 1, 2011 at 8:18 PM, Bernardo Ezequiel Contreras <[hidden email]> wrote: Hi all, -- Mariano http://marianopeck.wordpress.com |
In reply to this post by vonbecmann
On Aug 1, 2011, at 8:18 PM, Bernardo Ezequiel Contreras wrote: > Hi all, > In the issue tracker, there are many issues to deprecate several classes. so, What do you do in order to deprecate a class? > Could you explain the procedure to deprecate a class? > often it's just moving it to the Deprecated package. (Deprecated14, does not exist yet I think). Sometimes it makes sense to deprecate the class instatiaton methods in addition. Marcus -- Marcus Denker -- http://marcusdenker.de |
In reply to this post by vonbecmann
The most important aspects is that there is not reference to it.
and that if we replace it by something else, it works. After we can write in the comments in big that the class is deprecated. Stef On Aug 1, 2011, at 8:18 PM, Bernardo Ezequiel Contreras wrote: > Hi all, > In the issue tracker, there are many issues to deprecate several classes. so, What do you do in order to deprecate a class? > Could you explain the procedure to deprecate a class? > > Thanks. > |
On Mon, Aug 1, 2011 at 12:21 PM, Stéphane Ducasse
<[hidden email]> wrote: > The most important aspects is that there is not reference to it. > and that if we replace it by something else, it works. > After we can write in the comments in big that the class is deprecated. > Could you (we) also deprecate all the methods in the class? Ideally in some automated way, of course. |
On Thu, Aug 4, 2011 at 1:42 AM, Chris Cunningham <[hidden email]> wrote:
Or remove all methods and implement doesNotUnderstand: ^Error new signal: 'All mehtods of this class are deprecated, please use ....' hehheheh :) -- Mariano http://marianopeck.wordpress.com |
Why not make this class a factory in the interim ?
DeprecatedClass class>>new self deprecated: 'DeprecatedClass use BrandNewClass instead'. ^BrandNewClass new 2011/8/4 Mariano Martinez Peck <[hidden email]>: > > > On Thu, Aug 4, 2011 at 1:42 AM, Chris Cunningham <[hidden email]> > wrote: >> >> On Mon, Aug 1, 2011 at 12:21 PM, Stéphane Ducasse >> <[hidden email]> wrote: >> > The most important aspects is that there is not reference to it. >> > and that if we replace it by something else, it works. >> > After we can write in the comments in big that the class is deprecated. >> > >> >> Could you (we) also deprecate all the methods in the class? Ideally >> in some automated way, of course. >> > > Or remove all methods and implement > > doesNotUnderstand: > > ^Error new signal: 'All mehtods of this class are deprecated, please use > ....' > > > hehheheh :) > > > > -- > Mariano > http://marianopeck.wordpress.com > > |
I'd rather use trait.
Note that in both cases, subclasses will be made deprecated too. Noury On 4 août 2011, at 10:17, Nicolas Cellier wrote: > Why not make this class a factory in the interim ? > > DeprecatedClass class>>new > self deprecated: 'DeprecatedClass use BrandNewClass instead'. > ^BrandNewClass new > > 2011/8/4 Mariano Martinez Peck <[hidden email]>: >> >> >> On Thu, Aug 4, 2011 at 1:42 AM, Chris Cunningham <[hidden email]> >> wrote: >>> >>> On Mon, Aug 1, 2011 at 12:21 PM, Stéphane Ducasse >>> <[hidden email]> wrote: >>>> The most important aspects is that there is not reference to it. >>>> and that if we replace it by something else, it works. >>>> After we can write in the comments in big that the class is deprecated. >>>> >>> >>> Could you (we) also deprecate all the methods in the class? Ideally >>> in some automated way, of course. >>> >> >> Or remove all methods and implement >> >> doesNotUnderstand: >> >> ^Error new signal: 'All mehtods of this class are deprecated, please use >> ....' >> >> >> hehheheh :) >> >> >> >> -- >> Mariano >> http://marianopeck.wordpress.com >> >> > Noury Bouraqadi http://car.mines-douai.fr/noury -- -19èmes Journées Francophones sur les Systèmes Multi-Agents (JFSMA’11) http://www.univ-valenciennes.fr/congres/jfsma2011/ 17-19 Octobre 2011, Valenciennes, France -5th International Conference on Smalltalk Technologies http://www.fast.org.ar November 3th - 5th, 2011 Universidad Nacional de Quilmes (Argentina) |
Free forum by Nabble | Edit this page |