Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update uv run and uv tool run to use Toolchain::find #4134

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Jun 7, 2024

Extends #4121

@zanieb zanieb added the internal A refactor or improvement that is not user-facing label Jun 7, 2024
Comment on lines 111 to 120
} else if let Some(python) = python.as_ref() {
Toolchain::find_requested(python, SystemPython::Allowed, preview, cache)?
.into_interpreter()
} else {
Toolchain::find_default(preview, cache)?.into_interpreter()
// Note we force preview on during `uv run` for now since the entire interface is in preview
Toolchain::find(python, SystemPython::Allowed, PreviewMode::Enabled, cache)?
.into_interpreter()
};
Copy link
Member Author

Choose a reason for hiding this comment

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

These were reimplementing logic that's inside of find anyway.

@zanieb zanieb force-pushed the zb/toolchain-iiii branch from a504672 to 350ebab Compare June 7, 2024 17:14
@zanieb zanieb marked this pull request as ready for review June 7, 2024 18:15
@zanieb zanieb force-pushed the zb/toolchain-iii branch from a5ad118 to 3b6a685 Compare June 7, 2024 18:59
Base automatically changed from zb/toolchain-iii to main June 7, 2024 19:20
@zanieb zanieb force-pushed the zb/toolchain-iiii branch from 350ebab to 948cd64 Compare June 7, 2024 19:20
@zanieb zanieb enabled auto-merge (squash) June 7, 2024 19:21
@zanieb zanieb merged commit 0f4f3b4 into main Jun 7, 2024
46 checks passed
@zanieb zanieb deleted the zb/toolchain-iiii branch June 7, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal A refactor or improvement that is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant