Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pharo Launcher cmd line should allow to work in current working directory #659

Open
demarey opened this issue Jan 24, 2024 · 3 comments
Open
Labels
cmd-line Command-line Launcher issue Enhancement

Comments

@demarey
Copy link
Contributor

demarey commented Jan 24, 2024

By default, Pharo Launcher cmd line uses the standard image repository to store the newly created image when creating an image.
PL CLI could propose a (global) setting to do not use the image repository and by so, use the current working directory to host images.
It means image listing will probably only show one image but image creation and store could happen anywhere.

There is still one open question: do we store the image directly in the current folder or in a folder with the name of the image as Pharo Launcher already do?
I would favor the second option since the creation of an image will also create a pharo.version file, a sources file a changes file, a meta-inf.stonfile, a pharo-local folder, etc. Having 2 images at the same place would not be possible.

@estebanlm WDYT?

@demarey demarey added Enhancement cmd-line Command-line Launcher issue labels Jan 24, 2024
@demarey
Copy link
Contributor Author

demarey commented Feb 6, 2024

@estebanlm What do you think of the proposition?

@guillep
Copy link
Member

guillep commented Feb 7, 2024

By default, Pharo Launcher cmd line uses the standard image repository to store the newly created image when creating an image. PL CLI could propose a (global) setting to do not use the image repository and by so, use the current working directory to host images.

Why a global setting?
Why not also a CLI flag

$ pl image create titi --here

It means image listing will probably only show one image but image creation and store could happen anywhere.

There is still one open question: do we store the image directly in the current folder or in a folder with the name of the image as Pharo Launcher already do? I would favor the second option since the creation of an image will also create a pharo.version file, a sources file a changes file, a meta-inf.stonfile, a pharo-local folder, etc. Having 2 images at the same place would not be possible.

My take, as a heavy user of command line with Pharo, is that I don't care, but this has some impact on other decisions:

  • should the launcher be able to launch images from a directory name?
  • launching that image should have the current working directory as working directory and not the image directory (as in the graphical mode) (is this the case already?)
  • Also, what if there is a naming conflict between the global repository and the local working directory?

@demarey
Copy link
Contributor Author

demarey commented Feb 16, 2024

Thank you for the feedback @guillep.

By default, Pharo Launcher cmd line uses the standard image repository to store the newly created image when creating an image. PL CLI could propose a (global) setting to do not use the image repository and by so, use the current working directory to host images.

Why a global setting? Why not also a CLI flag

$ pl image create titi --here

Could be an option too. I thought a global option would be easier for people that do not want to work with a central image repository.

It means image listing will probably only show one image but image creation and store could happen anywhere.
There is still one open question: do we store the image directly in the current folder or in a folder with the name of the image as Pharo Launcher already do? I would favor the second option since the creation of an image will also create a pharo.version file, a sources file a changes file, a meta-inf.stonfile, a pharo-local folder, etc. Having 2 images at the same place would not be possible.

My take, as a heavy user of command line with Pharo, is that I don't care, but this has some impact on other decisions:

* should the launcher be able to launch images from a directory name?

in case of a global option, the current directory would be seen as the default image repository and by so, will be scanned to find folders with images inside. If there is only one, it will also work.
It will also allow to launch an image by giving the full path to an image.

* launching that image should have the current working directory as working directory and not the image directory (as in the graphical mode) (is this the case already?)

in CLI, this is the case.

* Also, what if there is a naming conflict between the global repository and the local working directory?

In my proposition, there will be no conflict because the global repository will be the local repository.

So, I think both options are open.
The best one would be the one that fits the most user needs: global option to avoid an extra flag at each command if the user always want to work locally, or a flag when user sometimes want to work locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd-line Command-line Launcher issue Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants