Skip to content

1518 uv tools are now installed locally#1885

Open
ducminh02 wants to merge 6 commits into
devonfw:mainfrom
ducminh02:1518-uv-tools-are-installed-globally
Open

1518 uv tools are now installed locally#1885
ducminh02 wants to merge 6 commits into
devonfw:mainfrom
ducminh02:1518-uv-tools-are-installed-globally

Conversation

@ducminh02
Copy link
Copy Markdown
Contributor

@ducminh02 ducminh02 commented May 4, 2026

This PR fixes #1518

Implemented changes:

  • Full Project Isolation: Redirected uv tool data and virtual environments to the project-local software/python/tools directory via UV_TOOL_DIR.

  • Explicit Binary Pathing: Replaced XDG_BIN_HOME with UV_TOOL_BIN_DIR to ensure tool executables are scoped to the project's bin folder.

  • Commandlet Updates: Modified Python.java and Uv.java to export these variables automatically, eliminating all "not on your PATH" warnings.

  • Regression Testing: Added cross-platform JUnit tests to verify environment isolation across both tools.


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

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented May 4, 2026

Coverage Report for CI Build 25508939672

Coverage increased (+0.005%) to 70.746%

Details

  • Coverage increased (+0.005%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 3 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

3 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/python/Python.java 2 76.92%
com/devonfw/tools/ide/version/VersionSegment.java 1 89.24%

Coverage Stats

Coverage Status
Relevant Lines: 15406
Covered Lines: 11361
Line Coverage: 73.74%
Relevant Branches: 6878
Covered Branches: 4404
Branch Coverage: 64.03%
Branches in Coverage %: Yes
Coverage Strength: 3.12 hits per line

💛 - Coveralls

@ducminh02 ducminh02 changed the title 1518 uv tools are installed globally 1518 uv tools are now installed locally May 4, 2026
@ducminh02 ducminh02 moved this from 🆕 New to Team Review in IDEasy board May 4, 2026
@ducminh02 ducminh02 self-assigned this May 4, 2026
@areinicke areinicke self-assigned this May 4, 2026
@areinicke areinicke self-requested a review May 4, 2026 11:24
@areinicke
Copy link
Copy Markdown
Contributor

areinicke commented May 5, 2026

I just tested your PR. Generally, it seems to work very well. uv tools are now always installed within the IDEasy project.

However, I noticed the following: uv tools that are installed within an IDEasy project are also available in all other projects. For example, if I install the tool "ruff" in the IDEasy project "A", then the tool is installed correctly under $IDE_ROOT/A/software/python/bin/ruff . But if I then switch to IDEasy project B and execute uv tools list, then the ruff tool is still available. The tool cannot be reinstalled in project B either, because it is already installed in project A. Furthermore, uninstalling (or deleting) the tool will then lead to it no longer being available in any of the projects.

The goal was that uv should be installed in an isolated way. This is also achieved for the uv installation itself. However, the fact that uv tools are then shared across projects violates this goal somewhat IMO. Can you take a look at it again?

@areinicke areinicke added configuration should be configurable or configuration change install installation process of IDE + tools and install commandlet uv fast Python package and project manager labels May 5, 2026
@ducminh02
Copy link
Copy Markdown
Contributor Author

I just tested your PR. Generally, it seems to work very well. uv tools are now always installed within the IDEasy project.

However, I noticed the following: uv tools that are installed within an IDEasy project are also available in all other projects. For example, if I install the tool "ruff" in the IDEasy project "A", then the tool is installed correctly under $IDE_ROOT/A/software/python/bin/ruff . But if I then switch to IDEasy project B and execute uv tools list, then the ruff tool is still available. The tool cannot be reinstalled in project B either, because it is already installed in project A. Furthermore, uninstalling (or deleting) the tool will then lead to it no longer being available in any of the projects.

The goal was that uv should be installed in an isolated way. This is also achieved for the uv installation itself. However, the fact that uv tools are then shared across projects violates this goal somewhat IMO. Can you take a look at it again?

I have made the adjustments to enable uv to install tools in a isolated way, can you have a look at it to see if it works now?

Copy link
Copy Markdown
Contributor

@areinicke areinicke left a comment

Choose a reason for hiding this comment

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

Everything looks good now and works as expected. Great job!
Do not forget to add this issue to the changelog.

@areinicke areinicke moved this from Team Review to 👀 In review in IDEasy board May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

configuration should be configurable or configuration change install installation process of IDE + tools and install commandlet uv fast Python package and project manager

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

uv tools are installed globally

3 participants