Skip to content

Instantly share code, notes, and snippets.

@dalehenrich
Created September 19, 2012 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalehenrich/3746823 to your computer and use it in GitHub Desktop.
Save dalehenrich/3746823 to your computer and use it in GitHub Desktop.
package load order for Metacello

MetacelloPackagesSpec>>packageSpecsInLoadOrder is the basic driver method that orders the packages/projects based upon requires: and includes: methods.

MetacelloPackagesSpec>>packageSpecsInLoadOrder is called by MetacelloVersionSpec>>packageSpecsInLoadOrder.

To take advantage of MetacelloVersionSpec>>packageSpecsInLoadOrder you need to really have your own MetacelloPackageSpec with the following (rough list of methods):

  • requires:constructor:
  • includes:constructor:
  • projectDo:packageDo:groupDo:

and you will want to have your own MetacelloMCVersionSpec clone with these methods (roughly):

  • package:with:constructor:
  • package:constructor:

These methods will allow you to construct a versionSpec that looks like the following:

spec for: #common do: [
  spec package: 'A'.
  spec package: 'B' with: [spec requires: 'A'].
].

And the packageSpecsInLoadOrder for the versionSpec should be #('A' 'B')...

I've probably missed a couple of things but now that you're using the master branch there is too much additional to do ...

You'll want to add some stuff the package (repositories, file names, etc.) which can be copied from MC and then turned to your own purposes ...

The loader will be a bigger challenge, but you can follow the basic structure of the MC loaders ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment