[squeak-dev] new VM directory structure for 5.3

tim Rowledge tim at rowledge.org
Sun Jan 12 03:24:51 UTC 2020

Simplifying is good but we need to make sure we keep things mutually up to date.

The .sources files must not be in an architecture or minor release specific directory - SqueakV5.0.sources should be in the root of the vm directory tree rather than buried down in Squeak5.3beta-19316-64bit-201912311458-Linux/bin - that would mean each and every downloaded vm update having another copy. Very wasteful of both bandwidth and disk space. Since the path for searching for the sources is in the image we need to update that method to suit whatever is chosen - I mentioned a while back that the all-in-one directory tree had this issue.

We also have expected directory paths in the ExternalSettings class(es). In ExternalSettings class>>#preferenceDirectory we refer to vmPath and then look for vmPath/prefs/{assorted preferences files}. If we want those preference files to be reasonably shared, they should likely go under the directory the sources are kept in.

Whilst looking at usage of #vmPath it seems we have a potential clash between methods like FileDirectory class>>#openSources:forImage: and SmalltalkImage>>#locateSourcesEntry

 - SmalltalkImage>>#openSourceFiles sends
 - SmalltalkImage>>#sourcesName which use #locateSourceEntry to look in the vmPath, the default directory (which may be set by the SecurityPlugin) and the 'slash' root; the found file (or one assumed in the vmPath even if it wasn't found there) is then used by
 - FileDirectory class>>#openSources:andChanges:forImage: which sends
 - FileDirectory class>>#openSources:forImage: (which does weird shit looking for a compressed file) and even weirder and dangerously *strips the carefully found full path name* and then does yet another search in several places - in this case the vmPath, the directory derived from the imagename and finally the default directory (which typically we'd anticipate is the image directory unless the SecurityPlugin has altered)

Now that lot is just plain nuts.

Just for fun there is also a useful looking FileDirectory class>>#lookInUsualPlaces: method that could likely be used to clean up a lot of this but is only sent by ServerPassword>>#serverPasswords - which actually surely ought to be integrated into the ExternalSettings stuff! Oh and GetTextTranslator class>>#setupLocaleDirs.

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Don't sweat petty things....or pet sweaty things.

More information about the Squeak-dev mailing list