dolphinsmalltalk / Dolphin

Dolphin Smalltalk Core Image
MIT License
294 stars 58 forks source link

Load IDB IDE Package Backup extension to help avoid loss of work #1267

Closed blairmcg closed 6 months ago

blairmcg commented 6 months ago

Modify the base image build to include a simple but useful extension that makes a backup copy of the last .pac file for a package before overwriting it. The files are copied to a 'Package backups' folder under the image root folder with a timestamp encoded in the name for uniqueness. The backups are not managed automatically so they will accumulate until deleted. This shouldn't be too much of a concern these days as the packages are generally not that large, but if this is a problem then there is a PackageBackup icon under Tools/Options/Inspect Options that can be used to disable the backup. Or evaluate PackageBackup disable. Some kind of cleanup, perhaps to limit the age of the backups that are kept, could be devised of course.

The motivation to add this now is #1266. This isn't a bug fix, but as I commented on the issue the particular outcome described doesn't correlate with a failure in Dolphin, so there is no actionable bug to address. Nevertheless, having backup copies created of previously saved packages will reduce the changes of losing work from many causes.

The package was originally contributed by Ian Bartholomew and was present in the repo already. It just needed a small fix, and then I enhanced it to make it fit into the IDE options framework.