[squeak] Re: SLOC in Squeak History

goran.krampe at bluefish.se goran.krampe at bluefish.se
Tue May 11 11:27:21 UTC 2004


michael.cole at nimiq.net wrote:
> Wandering back on topic, .... My main interest is in the SLOC for the
> whole enterprise, limited only by work that adds some functionality to
> Squeak (so count Connectors, SqueakMap, Monticello etc., but not demos
> and Squeak eyes). I doubt, however that whatever might be left out would
> make that much of a difference in version SLOC to version SLOC
> comparisions. 
> So, once again, anyone, what is it that I am enumerating instances of to
> enable this (arbitrary) counting exercise?
> Michael

Well, going top-bottom you would first want to suck down all the (only
the last?) releases from SM to your hard drive. That is easy enough, I
just did the following using a 5905 image, open a transcript first and
then run this in a workspace:

| map |
map _ SMSqueakMap default.
map loadUpdates. "makes sure we have the latest map"
"Let us iterate over all packages and make sure the last release is in
the cache"
map packages do: [:package |
	Transcript show: 'Package ', package name;cr.
	(package isReleased and: [package lastRelease isDownloadable])
		ifTrue: [package ensureInCache]].

This takes a while :) and you may also get some "data was slow" for a
few packages.
Eventually I ended up with an "sm/cache" directory with 396 files,

When that is done the tricky part starts! :)
Packages come in a variety of formats, and we can't install them all
because our image would most probably go bonkers. So you need to hack up
a way to iterate over the source files I presume. It might help looking
a bit at the SMInstaller classes.

regards, Göran

More information about the Squeak-dev mailing list