Skip to content

Tool dependencies and environment variables still not working properly #664

@hohwille

Description

@hohwille

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:

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)

  1. ide tomcat
  2. ide tomcat

Related/Dependent Issues

#131
#439

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

No one assigned

    Labels

    bugSomething isn't workingdependencyTool dependencies (if tool A requires tool B)

    Type

    Projects

    Status

    ✅ Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions