Hi Guille,
On Jan 8, 2019, at 3:19 AM, Guillermo Polito <guillermopolito@gmail.com> wrote:
Hi all,
I was checking issue https://pharo.fogbugz.com/f/cases/19852 which is about the problems that arise when we move an image of location, and moreover when we move it between different platforms (windows to linux or mac for example).
The problem are dangling file references pointing to invalid locations.
We have found 4 of them:
SystemResolver localdirectory is cached in a class variable GTPlaybook caches the cache and stash directories in class variables OMSessionStore retrieves at some point during startup an invalid file reference from the (wrongly cached) local directory IceLibgitRepository Sharedrepositorieslocation is also cached
All these are actually caused by settings, whose behavior is not defined when an image is moved. There are several strange issues like, if we store settings, the local directory is stored, and then all images will (wrongly) use the same pharo-local directory of the first image. This is particularly annoying when using the launcher for example :).
Now, we can leave this as it is right now and just move it to pharo8. A quick fix for Pharo7 would be removing those settings and avoiding caching, but that is probably very disruptive too...
Opinions?
While a âproperâ fix might involve adding symbolic names that can be cross-platform (including using environment variables, etc) and that would indeed mean waiting for Pharo 8, surely something simple can be fine in the mean time. Why not have those classes maintain a âcurrent platformâ class var and a current directory on start up flush the file names if either the current platform or the current directory has changed? One would of course have to test the platform before the directory. Or even simpler, if the image name and directory are saved as strings (eg in Smalltalk as PreviousImageAndDirectory := { ... } and thereâs an accessor such as imageNameAndOrDirectoryHasChanged) then the file names can easily be changed on start up. Getting the startup order right might be a little tricky but surely not that hard in this case. On a related note I think time boxed releases are a bad idea. A system is ready when it is ready, based on proper acceptance criteria, such as tests, user experience reports, etc. when it is clearly broken it is clearly broken. Releasing a system that is clearly broken helps nobody. (I say that as the US prepares to enter the 2020 election cycle...)
Guille