[squeak-dev] FixUnderscores (was: The Trunk: GetText-edc.18.mcz)

Chris Muller asqueaker at gmail.com
Sat Mar 31 16:26:37 UTC 2012


I'm not familiar with FixUnderscores2, but the original FixUnderscores
would preserve the accounting information on changed methods.  This is
important -- at least to me -- so I hope the new one does that too.

Replacing based on assignment nodes:  wouldn't that skip the ones that
were embedded in comment strings (e.g., doIt examples, etc.)?  When
the original FixUnderscores would find an underscore in the source
code that occurred in a literal or comment, it would display it in a
methods browser so it could be manually fixed.  Usually there are none
of very few.  It's hard to imagine a "better" solution than that..


On Fri, Mar 30, 2012 at 5:41 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> On Fri, Mar 30, 2012 at 02:39:49PM +0200, Levente Uzonyi wrote:
>> On Fri, 30 Mar 2012, David T. Lewis wrote:
>>
>> >On Fri, Mar 30, 2012 at 01:11:59PM +0200, Levente Uzonyi wrote:
>> >>On Thu, 15 Mar 2012, commits at source.squeak.org wrote:
>> >>
>> >>>Edgar J. De Cleene uploaded a new version of GetText to project The
>> >>>Trunk:
>> >>>http://source.squeak.org/trunk/GetText-edc.18.mcz
>> >>>
>> >>>==================== Summary ====================
>> >>>
>> >>>Name: GetText-edc.18
>> >>>Author: edc
>> >>>Time: 15 March 2012, 6:29:37.486 pm
>> >>>UUID: 43d88f85-6e87-41fb-8dd1-883feaf3d297
>> >>>Ancestors: GetText-edc.17
>> >>>
>> >>>'_' s replaced by ':='
>> >>
>> >>The method you used to replace the assignments is wrong, because it's
>> >>just simple search and replace, which ignores the context (e.g. strings
>> >>and comments). Please review the changes by hand and fix them.
>> >
>> >I have found that Bert's FixUnderscores package works well for updating
>> >the assignment characters in a package. FixUnderscores will do most of
>> >the changes, but the updates must still be checked by hand as in a case
>> >like this one.
>> >
>> >FixUnderscores is on SqueakMap.
>>
>> There's FixUnderscores2 which is even better, because it uses the compiler
>> to find assignments and do the replacement properly. But I think the best
>> solution is to add a utility to the Trunk itself (I wrote one using
>> Eliot's parse node visitor), so it will be straightforward to find the
>> right tool.
>> Manual review is still necessary, because sometimes the comments contain
>> code with assignments.
>
> Levente,
>
> That sounds like a good idea to me. If you have the utility available,
> please add it to the inbox or trunk. It would be good to have it readily
> available, and it will help in reconciling Etoys with trunk.
>
> Dave
>
>


More information about the Squeak-dev mailing list