[squeak-dev] Sake/Packages

Stephen Pair stephen at pairhome.net
Wed Apr 9 13:20:36 UTC 2008


On Wed, Apr 9, 2008 at 1:50 AM, Keith Hodges <keith_hodges at yahoo.co.uk>
wrote:

> Dear All,
>
> For those not familiar with the idea, Sake is an attempt to provide
> similar functionality to Make and Rake, only using Smalltalk as the DSL. I
> hope that Sake is simple and sufficiently useful for all Squeak forks make
> use of it.


At work, we built something very similar to this...what you call a SakeTask
is similar to what we call a target.  We define them a bit differently
however and our targets produce one or more files in the file system.  A
target is defined by writing a method with a special pragma (this is
VisualWorks).  The pragma typically specifies prerequisite targets (names of
methods that return a filename) as well as its product (usually just one
method that specifies the name of some file produced).  The body of the
method then does the work of producing the target (producing a tarball is a
typical example).  A slight variation on a target is one that transforms an
image...you provide the name of a starting image and it launches that image,
shuffles the code in the method over to it, runs that code, then snapshots
the image as the filename specified as the product of the target.  The build
system just checks to see whether a target's product exists on disk to
determine whether that target has already been produced or not.  The classes
and methods defining targets and the code implementing the build system are
all versioned along with our product's code so that everything is highly
reproducible.  Only a small bit of bootstrapping logic lives outside.  On
launching a build, we gather all the methods implementing these pragmas,
create instances of a target class, and construct a dependency graph and
begin building the requested targets.  This system has served us well for
several years now.

I think a target/task boils do to the following operations: prerequisites
(identifiers of prerequisite tasks), product (some kind of identifier) do,
isDone, and undo (though we do not have that in our system).  Does SakeTask
have any means of testing isDone?  Also, is it generalized to the degree
that do and undo actions could perform pretty much any action (i.e. actions
in the file system) and not be tied to a concept of code packages?

In any case, this looks promising.

- Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080409/d67ffec8/attachment.htm


More information about the Squeak-dev mailing list