Take care with Package renaming in Pharo 3/4

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

Take care with Package renaming in Pharo 3/4

Torsten Bergmann
Take care when renaming a package in Pharo: when you rename
by just changing upper/lower case the package and code vanishes away.

https://pharo.fogbugz.com/f/cases/14310/Renaming-a-package-just-by-changing-upper-lowercase-removes-the-package

This is in Pharo 4.0 (up to 40324) and 3.0 (up to 30858).

Nice way to get rid of fresh written code, even change sorter, changes file or
recover lost changes will not help anymore :(




Reply | Threaded
Open this post in threaded view
|

Re: Take care with Package renaming in Pharo 3/4

stepharo
Are you sure that the class is not there because it happens to me and it
was that the class was packaged elsewere.

On 24/10/14 12:48, Torsten Bergmann wrote:

> Take care when renaming a package in Pharo: when you rename
> by just changing upper/lower case the package and code vanishes away.
>
> https://pharo.fogbugz.com/f/cases/14310/Renaming-a-package-just-by-changing-upper-lowercase-removes-the-package
>
> This is in Pharo 4.0 (up to 40324) and 3.0 (up to 30858).
>
> Nice way to get rid of fresh written code, even change sorter, changes file or
> recover lost changes will not help anymore :(
>
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Take care with Package renaming in Pharo 3/4

EstebanLM
most probably the class is still there. Just not packaged.
you can execute

RPackageOrganizer default initializeFromMC.

to rebuild the packaging and see what happens.

(anyway is a bug, but well… at least you have a workaround to not lose your changes)

Esteban

> On 24 Oct 2014, at 13:18, stepharo <[hidden email]> wrote:
>
> Are you sure that the class is not there because it happens to me and it was that the class was packaged elsewere.
>
> On 24/10/14 12:48, Torsten Bergmann wrote:
>> Take care when renaming a package in Pharo: when you rename
>> by just changing upper/lower case the package and code vanishes away.
>>
>> https://pharo.fogbugz.com/f/cases/14310/Renaming-a-package-just-by-changing-upper-lowercase-removes-the-package
>>
>> This is in Pharo 4.0 (up to 40324) and 3.0 (up to 30858).
>>
>> Nice way to get rid of fresh written code, even change sorter, changes file or
>> recover lost changes will not help anymore :(
>>
>>
>>
>>
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Take care with Package renaming in Pharo 3/4

Torsten Bergmann
In reply to this post by stepharo
stepharo wrote:
> Are you sure that the class is not there because it happens to me and it
> was that the class was packaged elsewere.

and

Esteban wrote:
>try
>   RPackageOrganizer default initializeFromMC.
>
>(anyway is a bug, but well… at least you have a workaround to not lose your changes)



No, nothing helped. Try yourself:

Pharo4.0 Latest update: #40324:

- create a package "Foobaz"
- create a class "Bar" in it
- now rename the package "FooBaz"  (same name but one uppercase letter in it)

=> the package is not there anymore, also the class "Bar" is gone

according to change sorter the package was unloaded!

Running Estebans Expression does not help, you could also not open a browser on the class Bar

Bye
T.