[squeak-dev] MC API's

Chris Muller asqueaker at gmail.com
Wed Apr 6 14:59:53 UTC 2011


Just to clarify, the problem we're having right now relates to using
Installer to load explicit versions of a Package, as in:

(Installer ss project: 'MaBase')
  install: ''Ma base additions-cmm.194'

The legacy behavior, visible from InstallerMonticello>>#mcThing (nice
2/11/2010 20:44) is that it would scan all filenames in the repository
and then prefix-match.  This has two problems:

  - slower and slower as the repository grows -- ultimately unsustainable
  - when there are multiple prefix matches, you don't really know
which one you will get (unless we also require some kind of sorting
API of MCRepositorys.  Maybe this is not a problem or maybe it is).

That's why it was changed to utilize the new MCRepository API; to only
ask the MCRepository (which may not be FileBased) for all
versionNamesForPackageNamed: theSpecifiedPackage and then enumerate
just those versions accordingly.

Levente says we truly need prefix matching.  Most databases are able
to do that, so should be able to do that.  In that case, the solution
is to replace the part of the API:

    versionNamesForPackageNamed: packageNameString

with:

    versionNamesBeginningWith: prefixString

There are four senders of #versionNamesForPackageNamed: which all look
replaceable.

OTOH, if we can get by without prefix-matching, then I think another
solution is for SqueakSource to be changed to accept a version-name
without a suffix.  Since it is a FileBased, IT can enumerate all names
and select the one which matches the specified "prefix" (without
extension).  This is my preference.

Let's talk about this..

 - Chris



More information about the Squeak-dev mailing list