You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #2306. This issue is the foundation to rework how IDEasy determines a tool's installed edition and version: a single cached EditionAndVersion lookup via the computeInstalledEditionAndVersion() hook.
Today, edition and version are resolved by two somewhat independent mechanisms. We want to make the
(sym)link the primary source of truth and demote the .ide.software.version file to a fallback:
Software installed via the repository. Resolve the version together with the edition from the (sym)link (i.e. the real path inside the software repository), in a single lookup. The .ide.software.version file should only be read as a fallback for devonfw-ide legacy compatibility, when no (sym)link could be found.
Tools without a version file in the repo (e.g. Python). Add code that determines the version from the CLI (e.g. python --version) so a lost .ide.software.version file is auto-recovered instead of leaving the tool looking "uninstalled".
What we have now
LocalToolCommandlet.getInstalledVersion(Path) reads .ide.software.version (legacy fallback .devon.software.version). If the file is missing it logs a warning and returns null.So a deleted
file makes the tool appear not installed.
LocalToolCommandlet.getInstalledEdition(Path) separately resolves the symlink (toRealPath) and
derives the edition from the repository path, falling back to the configured edition for devonfw-ide
installations.
Feature idea
Follow-up to #2306. This issue is the foundation to rework how IDEasy determines a tool's installed edition and version: a single cached
EditionAndVersionlookup via thecomputeInstalledEditionAndVersion()hook.Today, edition and version are resolved by two somewhat independent mechanisms. We want to make the
(sym)link the primary source of truth and demote the
.ide.software.versionfile to a fallback:Software installed via the repository. Resolve the version together with the edition from the (sym)link (i.e. the real path inside the software repository), in a single lookup. The
.ide.software.versionfile should only be read as a fallback for devonfw-ide legacy compatibility, when no (sym)link could be found.Tools without a version file in the repo (e.g. Python). Add code that determines the version from the CLI (e.g.
python --version) so a lost.ide.software.versionfile is auto-recovered instead of leaving the tool looking "uninstalled".What we have now
LocalToolCommandlet.getInstalledVersion(Path)reads.ide.software.version(legacy fallback.devon.software.version). If the file is missing it logs a warning and returnsnull.So a deletedfile makes the tool appear not installed.
LocalToolCommandlet.getInstalledEdition(Path)separately resolves the symlink (toRealPath) andderives the edition from the repository path, falling back to the configured edition for devonfw-ide
installations.
EditionAndVersionlookup, which is what makes point 1 possible.
Additional context
No response