pharo-project / pharo-launcher

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

[cmd-line] Does not recognize new image format #688

Open PalumboN opened 2 weeks ago

PalumboN commented 2 weeks ago

To use the Permanent Space (a.k.a Permi), the new feature of the Garbage Collection, we changed the image format. It seems to cause problems about how the laucher finds the images.

Reproduce it I created a new image and list them:

➜  ~ pl image list
#  Name                                 Architecture Pharo version Last modified      
-- ------------------------------------ ------------ ------------- -------------------
1  test-permi                           64           110           2024-06-14 10:57:51
2  p11-no-permi                         64           110           2024-06-14 10:42:16

Then I migrated test-permi to an image with permanent space following these instructions.

Now the image is not listed anymore.

➜  ~ pl image list 
#  Name                                 Architecture Pharo version Last modified      
-- ------------------------------------ ------------ ------------- -------------------
1  p11-no-permi                         64           110           2024-06-14 10:42:16

But the image is still in the same place:

➜  ~ ll Documents/Pharo/images/test-permi 
total 79720
-rw-r--r--  1 palumbon  staff    39M Jun 14 10:57 Pharo11.0-64bit-aece1b5.sources
-rw-r--r--  1 palumbon  staff   554B Jun 14 10:58 meta-inf.ston
drwxr-xr-x  6 palumbon  staff   192B Jun 14 10:57 pharo-local
-rw-r--r--  1 palumbon  staff     4B Jun 14 10:57 pharo.version
-rw-r--r--  1 palumbon  staff    25K Jun 14 10:58 test-permi.changes
drwxr-xr-x  7 palumbon  staff   224B Jun 14 10:58 test-permi.image

And I can not run others commands neither 😢

Probably it happens because the new image format is a folder, instead of a single file:

➜  ~ ll Documents/Pharo/images/test-permi/test-permi.image 
total 124208
-rw-r--r--  1 palumbon  staff   442B Jun 14 10:58 header.ston
-rw-r--r--  1 palumbon  staff     0B Jun 14 10:58 permSpace.data
-rw-r--r--  1 palumbon  staff    61B Jun 14 10:58 permSpace.ston
-rw-r--r--  1 palumbon  staff    61M Jun 14 10:58 seg0.data
-rw-r--r--  1 palumbon  staff    80B Jun 14 10:58 seg0.ston

Expected behavior

I would like two (kind of) different things:

  1. The launcher should recognize the new image format (folder).

  2. Anyway, I would like to run commands with local images that are not listed by pl (they are in random folders). Sending the path instead of just existingImageName. For example: pl image launch ./Documents/Pharo/images/test-permi/test-permi.image

Version information:

demarey commented 2 weeks ago

Hi @PalumboN

Indeed, Pharo Launcher has a strong requirement to manage images: it should be contained in a folder that has the same name as the image file and the image file is contained in this folder. Pharo Launcher is not ready for the new image format. It has to be done (but not yet on the roadmap). Current Pharo Launcher will fail to read the image version number, find the metadata, etc. Also, it is already doable to run an image stored anywhere on the file system. pharo-launcher image launch aPath/to/myimage.image but it will also fail to read metadata, image version, ...

PalumboN commented 2 weeks ago

Hi @demarey !

Oookkk, I'll try to help with the new image format support in the next sprint 😄

We can also talk about running an image stored anywhere. My case of use is simple because I download the image using the launcher, and then I need to move it to other folder because of a benchmark framework... But the structure of the folder is the default one.

Thank you!!