[squeak-dev] [ANN] DoItFirst command line goodie on SqueakSource
lists at fniephaus.com
Sat Dec 5 08:33:26 UTC 2020
This is great! +1 for adding this to trunk, leaving the when to Dave.
- Since you've started to "mess" with some #startUp: methods, why not mess
with the startUp routine as well? Let's say, you add a flag that lists all
items in the startUpList and quits the image. You can then add another flag
that lets you choose the position of the DoItFirst class within the
list, and insert the class right before processing it (e.g.
#processStartUpList:). And by default, the position could be set to some
reasonable value (right after SmallInteger, FileStream, et al.). If I don't
care about the position, I can just use the default. If I want a special
position, I can print the current list and then rerun with an index.
- I don't know how yet, but it'd be cool to be able to cut off the rest of
the startUp list with this utility, or exclude certain classes from the
startUp list. In TruffleSqueak, for example, we jump through some hoops to
set up an image for headless execution  and it'd be nice if we could
simplify that with your utility.
On Thu, Nov 26, 2020 at 9:01 PM David T. Lewis <lewis at mail.msen.com> wrote:
> On Sun, Jun 14, 2020 at 01:15:01PM -0400, David T. Lewis wrote:
> > A few cups of coffee this morning led to some enhancements to my
> > utility, so I decided to put in on SqueakSource.
> > http://www.squeaksource.com/DoItFirst
> I have been updating this since the original post, and I think it is
> in pretty good shape at this point. Latest version on SqueakSource is
> In order to make this work properly I also add a couple of references
> to DoItFirst from other class startUp methods. That is messy to add to
> a MCZ, so I'm attaching a change set containing the latest package plus
> the two additional startUp calls.
> I think this is clean enough to consider adding to trunk now, so if
> folks think it is a good idea, let me know and I'll add it.
> To summarize (from the -help command line option):
> DoItFirst image arguments:
> -doit argumentlist "evaluate each argument as a doIt expression"
> -evaluate arg "evaluate arg, print result then exit"
> -filein filelist "file in each file named in fileList"
> -cwd path "set FileDirectory defaultDirectory to path prior to
> evaluating other options"
> -debug "enter a debugger as soon as possible in the startUp
> -help "print this message"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev