[squeak-dev] The Inbox: DTL-internal-sources-dtl.4.mcz
marcel.taeumel at hpi.de
Tue Jan 25 10:27:28 UTC 2022
Hi Dave --
> So I think that disabling the preference should simply go back to the
> traditional way of reading the sources file, nothing more.
And that's not very user friendly. Users that just play around with the settings might disable the cache and then save the image. Boom! They get errors and have no idea where to get the .sources file. Posts on squeak-dev will appear. How remembers the "traditional way" just in time? Not many, I suppose. That issue can easily be avoided. I guess we have all the information. All preferences should work in both states, enabled and disabled. The system should take care of this.
Anyway, you may push the current version into Trunk. :-) But I would really want to tweak the user experience a little bit more to avoid unnecessary surprises. But we can do that later on.
Am 24.01.2022 23:56:04 schrieb David T. Lewis <lewis at mail.msen.com>:
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 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 :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev