uv: continue Python installation after bootstrapping uv - #1872
Draft
Eleanor Boyd (eleanorjboyd) wants to merge 1 commit into
Draft
Eleanor Boyd (eleanorjboyd) wants to merge 1 commit into
Eleanor Boyd (eleanorjboyd) wants to merge 1 commit into
Conversation
Keep the standalone installer's uv path for verification, Python installation and listing, and subsequent uv operations without changing the extension host PATH. Add bootstrap, destination, and cache regression coverage for microsoft#1871. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Fixes #1871.
Problem
When uv's install directory is not already on the extension host's PATH, the official installer can succeed but the subsequent bare
uv --versionlookup still fails. Python installation then stops atuvNotOnPath.Updating shell startup files does not update the already-running extension host's environment. Resetting the availability cache alone cannot fix this.
Changes
Validation
npm run compile-testsnpm run compilenpm run unittest -- --grep 'uvPythonInstaller|Helpers|Pip and UV command parsing|InlineScriptEnvManager'— 518 passinggit diff --checkReal installation checks on macOS arm64
Used isolated VS Code development hosts, real consent dialogs/tasks, uv 0.12.21, and real Python 3.11.15 installations. All fixture home paths included spaces.
uvNotOnPath; no Python installationIn the fixed missing-PATH case, bare
uv --versionstill returnsENOENT, while the extension successfully installs and locates Python using the absolute executable path. This confirms the fix does not depend on PATH mutation.Reviewer notes
installUv's boolean return contract; the two changes address different steps of the workflow.