[squeak-dev] Loading code without adding to the changes file (was Re: The Trunk: System-cmm.1214.mcz)

tim Rowledge tim at rowledge.org
Thu Feb 25 22:09:26 UTC 2021



> On 2021-02-05, at 9:15 PM, tim Rowledge <tim at rowledge.org> wrote:
> 
> Ah, that reminds me of a related issue I've been meaning to bring up for , oy, 6 years.
> 
> Last time I tried, it was not possible to load code into a system with no changes file because of an issue to do with the method tail - the bit where we keep the source details. Has that been solved?

I made some time to look at this yesterday and I think we probably have a fairly simple path to solution.

It looks like the key is the ClassDescription>>#acceptsLoggingOfCompilation method and other implementors. If I make it return false it becomes possible to add code and avoid writing anything out. 

Actually, I had fun testing this because I had turned off the no sources/no changes preference and the deleted the changes file; upon trying to recompile the method it of course failed because of no changes file and I used the debugger to change the value of the boolean on the stack to false, thus letting me complete the compilation of the method that lets me compile with no logging. Smalltalk is so very cool.

There are several implementors to also consider here. MorphicModel, for example does a modestly gnarly check for the class of the compilation. So thinking of making a Preference (yes, I know I've railed against too many preferences frequently) for this, I think that 
a) making a preference in ClassDescription>>#acceptsLoggingOfCompilation
b) changing all the other implementors except the Metaclass version to add a 
`super acceptsLoggingOfCompilation and: [` clause
... should do the job.

An interesting benefit of having this working would be cases where we want a base image running that perhaps gets a web request to spawn a new instance to run some website or application. Currently anything that causes logging can make for an 'interesting' mess in the parent's changes file.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
"Bother" said Pooh, as he realised Piglet was undercooked.




More information about the Squeak-dev mailing list