[squeak-dev] Method Finder and deprecated method(s)

Eliot Miranda eliot.miranda at gmail.com
Thu Mar 15 04:15:25 UTC 2018


On Tue, Mar 13, 2018 at 1:57 PM, H. Hirzel <hannes.hirzel at gmail.com> wrote:

> Is is about using the 'Inbox' (for non core developers)
> http://wiki.squeak.org/squeak/6545


and this is the kind of documentation that, IMO, would be much more useful
if there was a like to it from www.squeak.org, for example a curated page
of links to the development process.


>
>
> On 3/13/18, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> > Hi Tim,
> >
> >
> >     it's great you're taking a look at MethodFinder.  Thanks! No one has
> > responded but I expect that's because we're all busy.  You might make it
> > easier for people to review and accept your work if you commit the
> changes
> > packages to inbox instead of mailing a change set.  If that works for
> you go
> > ahead, make sure the commit comment is helpful, and then report to the
> > mailing list.
> >
> > _,,,^..^,,,_ (phone)
> >
> >> On Mar 11, 2018, at 11:23 AM, Tim Johnson <digit at sonic.net> wrote:
> >>
> >> Hi all,
> >>
> >> I seem to have stumbled into a few issues, and am taking the bold step
> of
> >> including them all in a single email.  My apologies.  Tested/explored in
> >> 6.0a-#17799.
> >>
> >> Issues:
> >>
> >> [1] The deprecation of SequenceableCollection>>#upTo:
> >>
> >> [2] Removing deprecated #defaultBackgroundColor from MethodFinder
> >>
> >> [3] MethodFinder class variable Dangerous and
> >> MethodFinder>>#organizationFiltered:
> >>
> >> So:
> >>
> >> [1]
> >>
> >> The deprecation of SequenceableCollection>>#upTo: means Method Finder
> >> (a.k.a. Selector Browser) now pops up two modal dialogs if one enters
> >> something like:
> >>
> >> 'deprecated '. 'method'. 'deprecated method'
> >>
> >> ...into its code entry pane and hits 'save'.
> >>
> >> This appears to be due to the inclusion of #upTo: in
> >> MethodFinder>>#initialize2 as a method which would be sent to a
> >> PositionableStream... which seems reasonable.
> >>
> >> According to ReadStream>>#readStream, a ReadStream is intended to be
> >> polymorphic with SequencableCollection.  So, then, if #upTo: is an
> >> intrinsic method of a Stream, does this mean it must be retained in
> >> SequencableCollection? E.g. should it become undeprecated?
> >>
> >> Though never until now have I thought about what it would take to use
> >> Method Finder on a stream!  So I tried something similar to (but not
> >> exactly) the following in a Workspace:
> >>
> >> MethodFinder methodFor: { { 'deprecated' readStream . $c }.  'depre' }
> >> "changed to protect the innocent user who put array braces in the wrong
> >> place on his first attempt"
> >>
> >> [2]
> >>
> >> ...and /another/ deprecation warning popped up:
> >>
> >> "Object>>#defaultBackgroundColor has been deprecated. Implement
> >> #uniformWindowColor and #customWindowColor in your model."
> >>
> >> ...#defaultBackgroundColor appears in method source 23 times, so there
> are
> >> probably still a number of places where this deprecated method needs to
> be
> >> engineered around :)   However, the place where it's probably causing
> >> trouble in this case is in MethodFinder>>#initialize.  Attached is a
> >> change set to remove it from that method.
> >>
> >> [3]
> >>
> >> However, there is another problem with MethodFinder>>#initialize and
> >> #initialize2.  They both include comments at their respective ends which
> >> call MethodFinder>>#organizationFiltered:, but that method fails due to
> >> the class variable Dangerous being uninitialized.  The method which
> >> initializes Dangerous, MethodFinder>>#noteDangerous, looks to be unsent.
> >> If I add "self noteDangerous" to one of the #initialize methods (I added
> >> it to #initialize3 to test), this makes #organizationFiltered: work
> again
> >> (after initializing MethodFinder).  Note that Dangerous is not mentioned
> >> in the MethodFinder class comment, but other class variables are.  I
> >> didn't do any research for how Dangerous is intended to be useful.
> >>
> >> Thanks for reading.
> >>
> >> Best,
> >> Tim
> >> <MethodFinder-Deprecated.cs>
> >>
> >
> >
>
>


-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180314/6cfe7f21/attachment.html>


More information about the Squeak-dev mailing list