[squeak-dev] recent RecentMessages issues
frank.shearar at gmail.com
Thu Sep 26 12:15:12 UTC 2013
On 26 September 2013 12:28, Bob Arning <arning315 at comcast.net> wrote:
> I got fully up-to-date this am, started making some changes, went to look at
> recent submissions and was told there were none.
> Seems like
> RecentMessages startUp
> would have been a useful inclusion somewhere in the update process.
My understanding of #startUp is it's automatic magic. But perhaps it's
automatic magic only when starting up an image?
> So, I
> did that, made some more changes and asked for recent submissions again.
> This time walkback in
> [methodReferences notEmpty and: [methodReferences last isValid not]]
> whileTrue: [methodReferences removeLast].
> ^ methodReferences last.
> the reason being that none of the methodReferences were valid, all got
> removed and #last failed.
> Why weren't they valid?
> RecentMessages>>event: anEvent
> "Hook for SystemChangeNotifier"
> (anEvent isCommented and: [anEvent itemKind = SystemChangeNotifier
> ifTrue: [self recordSelector: #Comment forClass: anEvent item
> inEnvironment: anEvent environment].
> ((anEvent isAdded or: [anEvent isModified]) and: [anEvent itemKind =
> SystemChangeNotifier methodKind])
> ifTrue: [
> anEvent itemRequestor
> ifNotNil: [self recordSelector: anEvent itemSelector
> forClass: anEvent itemClass inEnvironment: anEvent environment].
> InMidstOfFileinNotification signal
> ifFalse: [Utilities changed: #recentMethodSubmissions]].
> the change is being gathered with an environment copied from the event, but
> an event's notion of environment is something rather different from what
> MethodReference is expecting:
Yes, the Event's idea of an environment is wrong:
AbstractEvent >> item: anItem kind: anItemKind
item := anItem.
itemKind := anItemKind.
environment := Dictionary new
That's wrong. (It might have been right in 2003, but it's not right today.)
Oh, man. I'm thinking that it all just worked in my image because of
an accidental accumulation of incidental state.
Thanks for the debugging, Bob, and apologies.
More information about the Squeak-dev