Anybody want to help us Guides fix a process bug? (was:Re:[Fwd:
Package Loader version filtering ...
dway at riskmetrics.com
Thu Feb 13 06:09:06 UTC 2003
On Wednesday, February 12, 2003, at 03:57 PM, Daniel Vainsencher wrote:
> So what I'm looking for is more like a simple fix for the existing
> filter in SML that shows you just the packages your image supports (in
> it's own simplistic way).
> Actually, I've just thought of a better fix that will be applicable as
> soon as we have services (we can write services that can act as
> and put arbitrarily complex code there).
> Goran: the problem is with 3.3, for example, where it simply isn't the
> release previous to 3.4. This might happen in the future, too (though I
> hope not).
Well, Goran mentioned one possibility being to remove 3.3alpha from the
list of versions in SqueakMap?
Or, a simpler solution might be to just use the brilliant hack which I
have attached here. (Which is basically just Goran's fix, except that
it explicitly skips over 3.3alpha. :-) ) I tested it in 3.5alpha and
3.4alpha and it seems to do the right thing. (Actually, it uses 3.2 as
the predecessor to 3.4, since it didn't seem to be worth bothering with
Since 3.3 was sort of an abberation, I think something like my fix here
might do for now. It's a little ugly, but I bet it would last a year
or two before cropping up with a bug. :-)
And if you have a nicer fix planned once we have services in place
(which would be reasonably soon), we could remove this fix and use
yours instead. But do you think this current fix might be okay for now?
- Doug Way
'From Squeak3.5alpha of ''7 January 2003'' [latest update: #5169] on 13
February 2003 at 12:27:09 am'!
!SMLoader methodsFor: 'filters' stamp: 'dew 2/13/2003 00:27'!
"Ignore spaces in the version string, they're sometimes spurious.
If this is an alpha image, also include packages for the previous
Note that the version category names do not include alpha/beta/gamma
| myVersion previousVersion name versionCategory |
myVersion _ (Smalltalk version copyWithout: $ ) asLowercase.
versionCategory _ squeakMap categoryWithId:
(myVersion endsWith: 'alpha') ifTrue: [
previousVersion _ (versionCategory subCategories before:
(squeakMap categories detect:
[:c | myVersion beginsWith: c name asLowercase]))
myVersion = 'squeak3.4alpha' ifTrue: [previousVersion _ 'squeak3.2'].
^[:package | package categories anySatisfy:
[:cat | cat parent == versionCategory and: [
name := cat name asLowercase.
(myVersion beginsWith: name)
or: [previousVersion notNil
and: [previousVersion beginsWith: name]]]]]
More information about the Squeak-dev