Search code examples
version-controlsmalltalkpharomonticello

How to split a Package/Category in Pharo 2.0 with regard to Monticello Packages


In Pharo 2.0 i started with Classes in one Package/Category (I'm not sure, what is the right term in Pharo at the moment). I have an identically named Monticello package which i contribute to.

Now i split the Package/Category:

  • MyPackage

becomes:

  • MyPackage-Core
  • MyPackage-AddOns

What is the intended way to manage these Packages/Categories with Monticello now? Is there a way to automatically split the Monticello packages accordingly? (I created some mess doing it manually and ended up starting in a new image and manually filing in the classes and then creating new Monticello packages)


Solution

  • I found this on the pharo developers mailinglist (splitting MC packages):

    Closing the eyes and restarting from scratch. We did that too with the Seaside packages at some point. [...]

    We did the same for Moose. We kind of followed this process:

    1. create new sub-package XYZ-Sub*
    2. move classes from XYZ to XYZ-Sub*
    3. repeat until all classes and extensions from XYZ are moved away to subpackages
    4. add the Monticello repository to XYZ-Sub*
    5. commit all XYZ-Sub* packages. Make sure that there are no categories without packages left behind (in other words to not lose code)
    6. save the image
    7. load in a fresh image
    8. if problems appear, and they always appear because it is manual work, go to the previous image and recommit