How to rename a package ?

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

How to rename a package ?

Alain Plantec-4
Thanks
Alain

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to rename a package ?

Lukas Renggli
Short answer: It is not supported by Monticello.

Long answer: By renaming all the categories and protocols (this can be
automated using the OB-Refactoring and OB-Regex tools), creating a new
package and committing that one. You'll loose the version history and
thus the ability to merge.

Lukas

On Thu, Mar 19, 2009 at 4:41 PM, Alain Plantec <[hidden email]> wrote:
> Thanks
> Alain
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to rename a package ?

Alexandre Bergel
In reply to this post by Alain Plantec-4
This question raised several times. In a general way, you can't.

Cheers,
Alexandre

On 19 Mar 2009, at 16:41, Alain Plantec wrote:

> Thanks
> Alain
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to rename a package ?

Michael Rueger-6
In reply to this post by Lukas Renggli
Lukas Renggli wrote:
> Short answer: It is not supported by Monticello.
>
> Long answer: By renaming all the categories and protocols (this can be
> automated using the OB-Refactoring and OB-Regex tools), creating a new

Would those support finding orphaned package extensions? Especially with
removing stuff and reorganizing we will have that need occasionally.

Michael

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to rename a package ?

Lukas Renggli
>> Long answer: By renaming all the categories and protocols (this can be
>> automated using the OB-Refactoring and OB-Regex tools), creating a new
>
> Would those support finding orphaned package extensions? Especially with
> removing stuff and reorganizing we will have that need occasionally.

No, but the following remnant from the Seaside 2.9 packaging effort does:

| packages |
packages := MCWorkingCopy allManagers
        collect: [ :each | each packageInfo ].
Smalltalk organization categories do: [ :cat |
        (packages anySatisfy: [ :pak | pak includesSystemCategory: cat ])
                ifFalse: [ Transcript show: 'Category: '; show: cat; cr ] ].
Smalltalk allClassesAndTraitsDo: [ :class | [ :cls |
        cls organization categories do: [ :cat |
                (packages anySatisfy: [ :pak | pak includesMethodCategory: cat ofClass: cls ])
                        ifFalse: [ Transcript show: 'Class: '; show: cls; show: ' Protocol:
'; show: cat; cr ] ] ]
        value: class; value: class class ]

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to rename a package ?

keith1y
Lukas Renggli wrote:

>>> Long answer: By renaming all the categories and protocols (this can be
>>> automated using the OB-Refactoring and OB-Regex tools), creating a new
>>>      
>> Would those support finding orphaned package extensions? Especially with
>> removing stuff and reorganizing we will have that need occasionally.
>>    
>
> No, but the following remnant from the Seaside 2.9 packaging effort does:
>
> | packages |
> packages := MCWorkingCopy allManagers
> collect: [ :each | each packageInfo ].
> Smalltalk organization categories do: [ :cat |
> (packages anySatisfy: [ :pak | pak includesSystemCategory: cat ])
> ifFalse: [ Transcript show: 'Category: '; show: cat; cr ] ].
> Smalltalk allClassesAndTraitsDo: [ :class | [ :cls |
> cls organization categories do: [ :cat |
> (packages anySatisfy: [ :pak | pak includesMethodCategory: cat ofClass: cls ])
> ifFalse: [ Transcript show: 'Class: '; show: cls; show: ' Protocol:
> '; show: cat; cr ] ] ]
> value: class; value: class class ]
>
> Lukas
>  
Why why why is the default position of whoever wrote the above code to
NOT contribute to the community? I dont get it. For me it would be the
first thought that enters my mind... "perhaps someone else might find
this useful".

That code if properly factored could easily go straight into
MCWorkingCopy. It can do, the squeaksource.com/mc repo is open for
contributions, and has been for a long time.

Keith




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to rename a package ?

Lukas Renggli
> Why why why is the default position of whoever wrote the above code to
> NOT contribute to the community? I dont get it. For me it would be the
> first thought that enters my mind... "perhaps someone else might find
> this useful".

Thank you for this excellent idea.

I added it as a Code Critics rule called 'Unpackaged Code'.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to rename a package ?

keith1y
Lukas Renggli wrote:

>> Why why why is the default position of whoever wrote the above code to
>> NOT contribute to the community? I dont get it. For me it would be the
>> first thought that enters my mind... "perhaps someone else might find
>> this useful".
>>    
>
> Thank you for this excellent idea.
>
> I added it as a Code Critics rule called 'Unpackaged Code'.
>
> Lukas
>  
Good for you, but I dont use code critics.

I cant manage to work out OB, it just seems completely unusable to me
(some docs would be nice). So thats code critic outs as well I guess.

Keith


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to rename a package ?

Stéphane Ducasse
In reply to this post by Lukas Renggli
lukas

Why don't we add it to MC?
Because it may make people  think that they can rename a package and  
do not lose
ancestry.
Stef


On Mar 20, 2009, at 5:25 PM, Lukas Renggli wrote:

>> Why why why is the default position of whoever wrote the above code  
>> to
>> NOT contribute to the community? I dont get it. For me it would be  
>> the
>> first thought that enters my mind... "perhaps someone else might find
>> this useful".
>
> Thank you for this excellent idea.
>
> I added it as a Code Critics rule called 'Unpackaged Code'.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to rename a package ?

Lukas Renggli
> Why don't we add it to MC?

I am not a big fan of random untested scripts on classes somewhere in
the system.

They rot very fast and people won't find and know how to use them. I
don't really see the relation of MCWorkingCopy to unpackaged code. For
me is more like a possible bug that can be detected by a system like
Code Critics.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to rename a package ?

Stéphane Ducasse
For me I see that more as a menu to rename a package :)

Stef

On Mar 20, 2009, at 8:28 PM, Lukas Renggli wrote:

>> Why don't we add it to MC?
>
> I am not a big fan of random untested scripts on classes somewhere in
> the system.
>
> They rot very fast and people won't find and know how to use them. I
> don't really see the relation of MCWorkingCopy to unpackaged code. For
> me is more like a possible bug that can be detected by a system like
> Code Critics.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to rename a package ?

Lukas Renggli
> For me I see that more as a menu to rename a package :)

The script does not rename a package. It just lists the code that is
not contained in any Monticello package.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to rename a package ?

Stéphane Ducasse
Ok I did not read it :)
indeed in that case definitively into SmallIint

Stef

On Mar 20, 2009, at 11:28 PM, Lukas Renggli wrote:

>> For me I see that more as a menu to rename a package :)
>
> The script does not rename a package. It just lists the code that is
> not contained in any Monticello package.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project