[squeak-dev] The Inbox: Monticello-cmm.491.mcz

Chris Muller asqueaker at gmail.com
Fri Dec 16 19:50:24 UTC 2011


I recently renamed a lot of my packages and, as part of the process,
determined that I wanted to consolidate some of the packages.

To consolidate PackageA into PackageB I:

  - load PackageA into a fresh image
  - rename PackageA to PackageB
  - merge the real PackageB
  - Save the merged code and ancestry as a new version of PackageB.

Except, oops, now I see I have two method categories for PackageB
extensions, *packageb and *PackageB -- even in the same class!
Unacceptable.

Using a star (*) and all-lowercase method category names has been the
convention for PackageInfo / Monticello for method extensions since
the beginning.  I've used all lowercase through the years not because
it was my preference but to follow convention.

But by not consistently following that convention with the rename
function, it led to the inconsistency problem I described above.

 - Chris





On Thu, Dec 15, 2011 at 3:52 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
>
> Am 2011-12-15 um 19:54 schrieb commits at source.squeak.org:
>
>> A new version of Monticello was added to project The Inbox:
>> http://source.squeak.org/inbox/Monticello-cmm.491.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Monticello-cmm.491
>> Author: cmm
>> Time: 15 December 2011, 1:54:06.122 pm
>> UUID: d852bc61-4ef2-4cee-92e4-eb91123c1ea6
>> Ancestors: Monticello-cmm.490
>>
>> Fix for package renaming.
>
> Why do you force lowercase here?
> Just curious. all my extension method categories are
> uppercase for my projects…
>
> Best
>        -Tobias
>>
>> =============== Diff against Monticello-cmm.489 ===============
>>
>> Item was changed:
>>  ----- Method: MCMethodDefinition>>handlePackageRename:to: (in category 'renaming') -----
>>  handlePackageRename: oldPackageName to: newPackageName
>>       "If I'm an extension or override method, rename the category to be prefixed with newPackageName."
>>       ((self isExtensionMethod or: [ self isOverrideMethod ]) and: [ (self category allButFirst beginsWith: newPackageName asLowercase) not ]) ifTrue:
>>               [ self actualClass organization
>>                       renameCategory: self category
>>                       toBe:
>>                               '*' ,
>>                                       (self
>>                                               newCategoryNameFor: self category allButFirst
>>                                               givenRenameFrom: oldPackageName
>> +                                             to: newPackageName) asLowercase ]!
>> -                                             to: newPackageName) ]!
>>
>>
>
>



More information about the Squeak-dev mailing list