-
Couldn't load subscription status.
- Fork 45
Description
Expected behavior
As a IDEasy user, I want to install and run tools seamlessly even if they have complex dependencies so that I do not have to worry about it.
Actual behavior
If I run the tool (e.g. tomcat) for the first time it is installed together with its dependencies.
This is also setting the environment variables and PATH extensions of dependent tools:
| setEnvironment(environmentContext, toolInstallation, extraInstallation); |
This is called from installTool method but this is skipped if the tool is already installed:
IDEasy/cli/src/main/java/com/devonfw/tools/ide/tool/LocalToolCommandlet.java
Lines 80 to 84 in 42201ed
| if (configuredVersion.equals(installedVersion)) { // here we can add https://github.com/devonfw/IDEasy/issues/637 | |
| return toolAlreadyInstalled(silent, installedVersion, step); | |
| } | |
| // install configured version of our tool in the software repository if not already installed | |
| ToolInstallation installation = installTool(configuredVersion, environmentContext); |
Therefore on the first run of tomcat the environment variables will be set for tomcat including java but on the second run this does not happen.
Steps to reproduce (bug) / Use Case of feature request (enhancement)
- ide tomcat
- ide tomcat
Related/Dependent Issues
Comments/Hints:
IMHO we have to run installTool also if the tool is already installed.
That will imply that additional things like MacOSWorkaround, etc. have to be done even if the tool is already installed wasting some performance. But fist we need to have things functionally correct and then we can think of how to optimize for performance.
After all such optimizations may save less than 1 second most probably and are therefore less important - much more important is the boostrapping performance we also waste for completion that massively slows down tab-completion that needs to be much faster whereas saving 1s on top of tool installation (check) is not very relevant.
Affected version:
- 2024.09.002-beta-SNAPSHOT
Metadata
Metadata
Assignees
Labels
Type
Projects
Status