Could you be more specific about what you mean by "wrong"?
On Thu, Dec 29, 2011 at 5:21 AM, Bernhard Pieber bernhard@pieber.com wrote:
FWIW, it just occurred to me that the SqueakMap Publishing Guidelines at http://wiki.squeak.org/squeak/6182 seem to use the Installer in this - at least currently - wrong way. Maybe existing scripts are affected?
Cheers, Bernhard
Am 27.12.2011 um 01:16 schrieb Chris Muller:
Yes, AlgebraicDataType will be installed three times, Unification twice. This is because #install: is implemented as #addPackage:, then #install.
That seems like a very wrong implementation..
Since the Installer subinstance is kept between #install sends, therefore the installations will repeat. The solution is to use #addPackage: and #install directly:
Installer cache addPackage: 'AlgebraicDataType'; addPackage: 'Unification'; addPackage: 'Zippers'; install
or using a collection:
Installer cache install: #('AlgebraicDataType' 'Unification' 'Zippers')
These solutions would seem to offer a lot less configuratory control -- since nothing could be done between installations. And, even unnecessarily so, since it's really easy for the user to just write #install:. Why have a two-word/two-step API instead of just one that also happens to be a lot more flexible?
I know you were just helping out, it is not your design, but since we all use Installer it's worth to discuss the API in case one of us gets an itch to "fix" it..