Skip to content

fix(uv_venv): fixes PATH ordering with mise x#6005

Merged
jdx merged 1 commit into
mainfrom
venv-fix
Aug 13, 2025
Merged

fix(uv_venv): fixes PATH ordering with mise x#6005
jdx merged 1 commit into
mainfrom
venv-fix

Conversation

@jdx

@jdx jdx commented Aug 13, 2025

Copy link
Copy Markdown
Owner

Fixes #5999

Copilot AI review requested due to automatic review settings August 13, 2025 02:06

Copilot AI 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.

Pull Request Overview

This PR fixes PATH ordering for UV virtual environments when using mise x command to ensure project virtual environments take precedence over tool paths. The fix addresses a specific issue where UV venv paths were being added after tool paths in the PATH order.

  • Reorders PATH priority to place UV venv paths before tool_add_paths and tool paths
  • Updates comments to reflect the new ordering logic
  • Adds an end-to-end test to validate the fix

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/toolset/mod.rs Reorders PATH construction to prioritize UV venv paths over tool paths
e2e/core/test_python_uv_venv_x_tiny Adds test case to verify UV venv precedence when using mise x

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions

Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.8.8 x -- echo 19.0 ± 0.7 18.0 22.4 1.00
mise x -- echo 19.1 ± 0.8 18.0 24.0 1.00 ± 0.06

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.8.8 env 18.3 ± 0.6 17.5 22.0 1.00
mise env 18.9 ± 0.8 17.4 24.0 1.03 ± 0.06

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.8.8 hook-env 18.2 ± 0.7 17.1 20.5 1.00
mise hook-env 18.9 ± 0.8 17.1 21.0 1.04 ± 0.06

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.8.8 ls 17.3 ± 0.6 16.1 19.2 1.04 ± 0.06
mise ls 16.7 ± 0.8 15.5 20.9 1.00

xtasks/test/perf

Command mise-2025.8.8 mise Variance
install (cached) 197ms ✅ 107ms +84%
ls (cached) 84ms ✅ 64ms +31%
bin-paths (cached) 68ms 69ms -1%
task-ls (cached) 480ms 494ms -2%

✅ Performance improvement: install cached is 84%
✅ Performance improvement: ls cached is 31%

@jdx jdx merged commit d95630f into main Aug 13, 2025
18 of 19 checks passed
@jdx jdx deleted the venv-fix branch August 13, 2025 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants