pharo-project / pharo-launcher

Lets you manage your pharo images and download new ones
https://pharo-project.github.io/pharo-launcher/
MIT License
109 stars 46 forks source link

Difference between `quit` button behaviour on Windows and on Linux #610

Closed zardoz03 closed 1 year ago

zardoz03 commented 1 year ago

Describe the bug If I were to patch PharoLauncherApplication>>start as to autoload settings, and then quit out of the launcher; on Linux the changes would persist, whereas on Windows10, I need to explicitly snapshot the image.

To Reproduce Steps to reproduce the behavior:

  1. Go to Settings,
  2. Expand PharoLauncher tab
  3. Enable Development Environment.
  4. open a browser with C-b on PharoLauncherApplication in the opened Playground.
  5. Add the following patch to PharoLauncherApplication>>start
    
    openAsWorld ifTrue: [ 
        self startFull.
        ^ self ].

Expected behavior From using pharo-launcher on Linux, this saved the image state on save. Whereas on Windows I needed to explicitly execute (code below) to get the same behaviour.

[ (Delay forSeconds: 5) wait.
   Smalltalk snapshot: true andQuit: true 
] fork.

Screenshots

Version information:

Expected development cost I do not know anything of the development effort required as I have not delved into Pharo-Launcher's codebase that extensively.

Bajger commented 1 year ago

@zardoz03 Hi! Thanks for reporting ::tada:: Anyway, it is questionable, whether image should be saved, when quitting. I guess not. Application state should be preserved in settings and business code itself should act like any other apps (read-only). If it is different on Win10 and Linux, we should fix it. I vote for to be "quit" action without persisting image state. @demarey WDYT?

Bajger commented 1 year ago

Meanwhile found this:

PhLQuitCommand>>execute
    PhLDownloadManager reset. "reset error logging"
    Smalltalk snapshot: false andQuit: true

So intended functionality is to not save image state at all.

zardoz03 commented 1 year ago

@Bajger after looking at: bde50b825056d14a3e24404caeeb0262ca52a034, the answer must be that I have a pharo-launcher install on my linux machine that was installed before this commit, compared to the one on the windows machine