2012/2/7 Frank Shearar <frank.shearar@gmail.com>:
On 7 February 2012 16:12, Schwab,Wilhelm K <bschwab@anest.ufl.edu> wrote:
Friends,
I know it's not a popular position, but I consider Metacello to be poorly factored, unstable, and a bit confusing.
Would you please expand a bit on the above? Confusing, I'll happily agree with, but then configuration management is not pretty at the best of times. It's no worse than Maven's pom.xml files, except for the Turing-completeness of the DSL.
The issues I've had with Metacello have either been addressed in the not-yet-released latest release (beta32, IIRC), or not the fault of Metacello: many folks write their specs assuming an available network. Instead, one should always attempt the package-cache (MCCacheRepository default, in other words) FIRST, and IF the package isn't already there, then try load it.
I suspect a nasty side effect is that an erroneous network address in the Metacello configuration will get undetected. This can happen easily because you previously loaded some package with Monticello, but then edited your Metacello configuration by hand. There is also a more subtle possible problem if names match but GUID don't. That easily happens, I created such mess when noob working with multiple images and local repositories. At least, the configuration needs to be validated with an available network. And the validation process shall check these two potential problems. Nicolas
Metacello's next release will be able to bootstrap itself without relying on the network, but there are many configurations out there that won't be able to. (I must still submit a fix to MetacelloBaseConfiguration (if I remember the name correctly - whatever MetacelloToolBox [1] uses ) to fix the issue for new configurations. Bad me.)
[1] https://gist.github.com/1438930
 How many times do we type things like:
 Gofer new     squeaksource: 'Fuel';     package: 'ConfigurationOfFuel';     load.  (Smalltalk at: #ConfigurationOfFuel) load.
Well, I don't ever type that, but that's because Squeak doesn't ship with Gofer, so I use Installer instead :)
This is concise, but it is also arguably syntactic sugar. I have been trying to condense the redundant information, and have been (trying to) capture the details in a tool I call Migrate.
Which redundant information? There isn't any in the above, except maybe 'ConfigurationOfFuel', or 'Fuel'. If you ASSUME that you only want to use SqueakSource, you could say
[:packageName | | confName |  confName := 'ConfigurationOf', packageName.  Gofer new   squeaksource: packageName;   package: confName;   load.  (Smalltalk at: confName asSymbol) load] value: 'Fuel'.
Not exactly what I'd call clear and concise, but it does remove redundancies.It looks like you're trying to do something vaguely similar in Migrate - #loadMetacelloPackage:name:version: in particular.
But I _don't_ see much of Metacello in any of this. Well, let me be clearer: I don't see any talk of specs, and that's pretty much most of Metacello right there. A properly written Metacello spec will also take care of pulling in transitive dependencies, which #web looks like it's doing by hand.
You can't have a common base class for configurations because that would be part of Metacello, and you would need to have Metacello in your image in order to load Metacello!
frank
 I have filed out the main class (attached). The idea is that one can save the Migrate package, load that into a new image, and quickly configure the new image. At least that's the plan.
Of interest now are the helper-metacello methods. What do you think? I'm trying to help here...
Bill