[squeak-dev] The Inbox: DTL-internal-sources-dtl.4.mcz

David T. Lewis lewis at mail.msen.com
Mon Jan 24 22:55:54 UTC 2022

On Mon, Jan 24, 2022 at 03:46:06PM +0100, Marcel Taeumel wrote:
> - In CompressedSources class >> #initializeSource:, you forgot a #closeSourceFiles before that #openSourceFiles
> - In CompressedSources class >> #initializeSource:, you should support a "nil" argument so that all pragma preferences can be reset; in this case a "nil" argument should just leave the current preference value as is

Thanks, I updated these in DTL-internal-sources-dtl.10 in the inbox.

> - If you disable that preference, it should write the source to the file system again if it cannot find a file already.

I would prefer not to write anything to the file system because the sources
file normally comes with the Squeak distribution. It might be located on
various places, but it is basically a read-only thing that normally should
not be modified or replaced by something that we do in the image.

So I think that disabling the preference should simply go back to the
traditional way of reading the sources file, nothing more.

> Yet, I like it that you do not delete the .source file after you enabled that preference bc. more than one .image might already on that file.

Agreed, I do not think that any existing source files should be altered
or replaced.

> ...or maybe disabling the preference MUST always write out that .source file and complain if there is already such a file. Otherwise you cannot guarantee that you have some .source that match your .image? Hmm...

I do think that it might make sense, when disabling the preference, to
first check if a file-based sources file can be located. If no file is
found, then do not allow the preference to be disabled. And as a separate
matter, I think that we have some utility methods for removing "developer
tools" (I don't recall the details, as I never do that) and those methods
would need to remove the cached sources without a check.

If we want to do this, then I think I would like to first merge System-dtl.1277
from the inbox, which will make it easier to check if a sources file can
be located on the file system.
> There seems to be another bug. After switching to the cached .sources file, I cannot "recover changes" anymore, which is strange since the .changes file is not touched.

I am not seeing this, but I suspect it is a side effect of the first
issue that you spotted. I was forgetting to close the sources files
before reopening them, and perhaps on Windows this is preventing access
to the already open changes file for "recover changes".

Thanks a lot for the review :-)


More information about the Squeak-dev mailing list