devonfw / IDEasy

Tool to automate the setup and updates of a development environment for any project (Successor of devonfw-ide).
Apache License 2.0
8 stars 20 forks source link

Redesign get/set-version/edition and add get-installed-version/edition #428

Closed hohwille closed 2 months ago

hohwille commented 3 months ago

Thoughts on the current state:

Shouldn't get-version be symmetric to set-version? Currently when I do ide set-version mvn 3.9.6 I will configure MVN_VERSION=3.9.6. Now what would a new IDEasy expect to get if he after that runs ide get-version mvn what should get the mvn version? Without knowing details about IDEasy, I would expect to get 3.9.6 as output. However, if maven was already installed before, I then will get the installed version that might be different so maybe I will get 3.9.7.

Therefore I am thinking about adding new commandlets get-installed-version and get-installed-edition that will give me the version/edition that is actually installed. The commandlets get-version and get-edition can then be simplified to only print the configured values and the UX would be IMHO more intuitive.

slskiba commented 2 months ago

To not overload the user with available commands, I would suggest to keep only get-version and get-edition, where the user can specify with a flag (--configured or --installed) which one he wants to grab. If no flag is set, we provide the user with both. I.e. a version if configured and installed coincide; or both versions with a mismatch warning and install instructions if they do not coincide.