uv: fall back to workspace-local executable - #1821
Merged
Eleanor Boyd (eleanorjboyd) merged 2 commits intoSep 25, 2026
Merged
Eleanor Boyd (eleanorjboyd) merged 2 commits into
Eleanor Boyd (eleanorjboyd) merged 2 commits into
Conversation
Prefer uv on PATH, then use a trusted workspace pyprojectx executable for environments in that workspace. Carry the resolved command through package operations and venv creation without modifying terminal PATH, with focused multi-root and trust coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Construct mocked executable paths from Uri.fsPath, matching the path returned by workspace folder resolution on Windows where URI drive letters may be lowercased. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Eleanor Boyd (eleanorjboyd)
September 25, 2026 17:29
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved findings include repeated UV probing, remote-workspace URI handling, and fallback telemetry.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Adds trusted workspace-local uv fallback and propagates the selected executable through environment creation and package commands.
Changes:
- Falls back to
.pyprojectx/main/uvwhen PATH lookup fails. - Passes the resolved executable to UV operations.
- Adds tests and documents fallback behavior.
| File | Summary |
|---|---|
src/test/managers/builtin/venvUtils.createWithProgress.unit.test.ts |
Tests UV executable propagation during environment creation. |
src/test/managers/builtin/pipPackageManager.unit.test.ts |
Tests package manager behavior. |
src/test/managers/builtin/helpers.runUV.unit.test.ts |
Tests UV execution. |
src/test/managers/builtin/helpers.isUvInstalled.unit.test.ts |
Tests UV discovery and fallback. |
src/test/managers/builtin/commands.unit.test.ts |
Tests command executable propagation. |
src/managers/builtin/venvUtils.ts |
Uses resolved UV during creation. |
src/managers/builtin/helpers.ts |
Resolves and runs UV executables. |
src/managers/builtin/commands/version.ts |
Supports the configured UV executable. |
src/managers/builtin/commands/uninstall.ts |
Supports the configured UV executable. |
src/managers/builtin/commands/listDirectNames.ts |
Supports the configured UV executable. |
src/managers/builtin/commands/list.ts |
Supports the configured UV executable. |
src/managers/builtin/commands/install.ts |
Supports the configured UV executable. |
src/managers/builtin/commands/factory.ts |
Supplies the UV executable to commands. |
src/managers/builtin/commands/availableVersions.ts |
Supports the configured UV executable. |
src/managers/base/commands/packageManagerCommand.ts |
Stores executable configuration. |
src/common/workspace.apis.ts |
Exposes workspace trust access. |
README.md |
Documents fallback and PATH behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| UvCommand: CommandConstructor<U>, | ||
| ): Promise<PipOrUvCommand<P, U>> { | ||
| if (await shouldUseUv(options.log, environmentPath)) { | ||
| const uvExecutable = await getUvExecutable(options.log, environmentPath); |
Vritant Bhardwaj (vritant24)
approved these changes
Sep 25, 2026
Eleanor Boyd (eleanorjboyd)
merged commit Sep 25, 2026
97dd21c
into
microsoft:main
44 of 45 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
uvon the extension PATH, then check a trusted workspace’s.pyprojectx/main/uv(uv.exeon Windows) for environments within that workspace.uvon PATH; the integrated terminal PATH is unchanged.Closes #812.