Skip to content

#2102 set ideRoot during msi installation correctly#2149

Open
quando632 wants to merge 16 commits into
devonfw:mainfrom
quando632:feature/2102-missing-ide-root
Open

#2102 set ideRoot during msi installation correctly#2149
quando632 wants to merge 16 commits into
devonfw:mainfrom
quando632:feature/2102-missing-ide-root

Conversation

@quando632

@quando632 quando632 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #2102

Implemented changes:

  • AbstractIdeContext: ideRoot is no longer final; added setIdeRoot(Path) so the context can
    reflect the derived install target.
  • IdeContext: added setIdeRoot(Path) to the interface.
  • IdeasyCommandlet.installIdeasy(...): after deriving the target via determineIdeRoot(cwd), it
    now calls context.setIdeRoot(...), keeping the whole install run consistent.
  • AbstractIdeTestContext: removed the now-redundant ideRoot/ideRootSet fields and
    getIdeRoot/setIdeRoot overrides the test context inherits the production setter, aligning
    test and production behaviour.
  • Added test IdeasyCommandletTest#testInstallIdeasyUpdatesIdeRoot (windows/mac/linux) that fails
    without the fix and passes with it.

Verified the invariants called out in the issue are unaffected: the isIdeRootRequired gate in
applyAndRun, and the temp-download-path creation guarded by ideRoot != null in the constructor.


Testing instructions

  1. Automated: in cli/, run mvn -Dtest=IdeasyCommandletTest test all cases pass, including
    the new testInstallIdeasyUpdatesIdeRoot. (Reverting the context.setIdeRoot(...) line makes the
    3 new cases fail, confirming the test reproduces the bug.)

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@coveralls

coveralls commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 29415537689

Warning

No base build found for commit a88c41e on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 72.281%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 16736
Covered Lines: 12603
Line Coverage: 75.3%
Relevant Branches: 7464
Covered Branches: 4889
Branch Coverage: 65.5%
Branches in Coverage %: Yes
Coverage Strength: 3.19 hits per line

💛 - Coveralls

@quando632 quando632 moved this from 🆕 New to 🏗 In progress in IDEasy board Jul 10, 2026
@quando632 quando632 changed the title #2102 delete final of ideRoot #2102 set ideRoot during msi installation correctly Jul 10, 2026
@quando632 quando632 added install installation process of IDE + tools and install commandlet bugfix PR that fixes a bug issue labels Jul 10, 2026
@quando632 quando632 moved this from 🏗 In progress to Team Review in IDEasy board Jul 10, 2026
@quando632
quando632 marked this pull request as ready for review July 13, 2026 08:47
@oanding-blrng oanding-blrng self-assigned this Jul 14, 2026

@oanding-blrng oanding-blrng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provided testing instructions are working as expected, other tests are running successfully. I added four suggestion as part of my review.

Also, in case, that the behaviour mentioned in ticket #2102 negatively impacts the user, the testing instructions should be extended to include proper instructions for manually testing correct behaivour.

Comment thread cli/src/main/java/com/devonfw/tools/ide/context/IdeContext.java
Comment thread cli/src/main/java/com/devonfw/tools/ide/context/IdeContext.java
Comment thread cli/src/main/java/com/devonfw/tools/ide/tool/IdeasyCommandlet.java
Comment thread cli/src/test/java/com/devonfw/tools/ide/tool/IdeasyCommandletTest.java Outdated
@oanding-blrng oanding-blrng added the windows specific for Microsoft Windows OS label Jul 14, 2026
quando632 and others added 7 commits July 15, 2026 13:30
@quando632

Copy link
Copy Markdown
Contributor Author

So, the issue does not negatively impact the user. At its core, it is a robustness and root-cause fix. The only actual user-visible symptom was issue #1517

@oanding-blrng

Copy link
Copy Markdown
Contributor

So, the issue does not negatively impact the user. At its core, it is a robustness and root-cause fix. The only actual user-visible symptom was issue #1517

Then the current testing instructions are fine. This ticket can move forward.

@oanding-blrng oanding-blrng moved this from Team Review to 👀 In review in IDEasy board Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR that fixes a bug issue install installation process of IDE + tools and install commandlet windows specific for Microsoft Windows OS

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

IDE_ROOT environment variable is not available to ideasy.exe during MSI installation

3 participants