what is demote?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

what is demote?

Stephane Ducasse-3
demoteToRPackageNamed: aString
    | newRPackage |

    self unregister.
    newRPackage := self class organizer
              packageNamed: aString
              ifAbsent:  [ (self class named: aString) register ].
    newRPackage importPackage: self.
    newRPackage classes do: [ :each |
             SystemAnnouncer uniqueInstance
               classRepackaged: each
               from: self
               to: newRPackage ].

of course no comment because everything is obvious in Pharo, isn't?

Reply | Threaded
Open this post in threaded view
|

Re: what is demote?

CyrilFerlicot

On sam. 21 avr. 2018 at 10:12, Stephane Ducasse <[hidden email]> wrote:
demoteToRPackageNamed: aString
    | newRPackage |

    self unregister.
    newRPackage := self class organizer
              packageNamed: aString
              ifAbsent:  [ (self class named: aString) register ].
    newRPackage importPackage: self.
    newRPackage classes do: [ :each |
             SystemAnnouncer uniqueInstance
               classRepackaged: each
               from: self
               to: newRPackage ].

of course no comment because everything is obvious in Pharo, isn't?



Hi,
It's probably to change a package of the form "MyPackage-Something" to a package "MyPackage" with a "Something" tag. 
--
Cyril Ferlicot
https://ferlicot.fr
Reply | Threaded
Open this post in threaded view
|

Re: what is demote?

Sean P. DeNigris
Administrator
CyrilFerlicot wrote
> It's probably to change a package of the form "MyPackage-Something" to a
> package "MyPackage" with a "Something" tag.

Yes, breakpoint triggered from Calypso "Demote to package with tag" context
menu.

Maybe the message name could be improved too… #demoteToTagInPackageNamed:?
Also, maybe there should be a guard if `aString = self name`?

https://github.com/pharo-project/pharo/pull/1240

I don't want to be accused of talking without action ;-)



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: what is demote?

Stephane Ducasse-3
Excellent! Thanks!
:)

On Sat, Apr 21, 2018 at 7:57 PM, Sean P. DeNigris <[hidden email]> wrote:

> CyrilFerlicot wrote
>> It's probably to change a package of the form "MyPackage-Something" to a
>> package "MyPackage" with a "Something" tag.
>
> Yes, breakpoint triggered from Calypso "Demote to package with tag" context
> menu.
>
> Maybe the message name could be improved too… #demoteToTagInPackageNamed:?
> Also, maybe there should be a guard if `aString = self name`?
>
> https://github.com/pharo-project/pharo/pull/1240
>
> I don't want to be accused of talking without action ;-)
>
>
>
> -----
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
>