-
Notifications
You must be signed in to change notification settings - Fork 636
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
Change "toolchain" to "python" #4735
Conversation
3c76810
to
f0e90fd
Compare
// Support `toolchains` -> `python` migration transparently. | ||
if !root.exists() | ||
&& root | ||
.parent() | ||
.is_some_and(|parent| parent.join("toolchains").exists()) | ||
{ | ||
let deprecated = root.parent().unwrap().join("toolchains"); | ||
// Move the deprecated directory to the new location. | ||
fs::rename(&deprecated, root)?; | ||
// Create a link or junction to at the old location | ||
uv_fs::replace_symlink(root, &deprecated)?; | ||
} else { | ||
fs::create_dir_all(root)?; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This blurb is notable
I'll give this diff a careful read through as well. |
My only complaint is that |
Yeah I agree that's a little confusing and my primary hesitation. What if we provide a |
Curious, would there be a different short-hand for this similar to uvx? Say |
I think similar to |
f0e90fd
to
198cdcc
Compare
198cdcc
to
7e9f6c7
Compare
Whew this is a lot.
The user-facing changes are:
uv toolchain
touv python
e.g.uv python find
,uv python install
, ...UV_TOOLCHAIN_DIR
toUV_PYTHON_INSTALL_DIR
<UV_STATE_DIR>/toolchains
to<UV_STATE_DIR>/python
(with automatic migration)The internal changes are:
uv-toolchain
crate touv-python
Toolchain
no longer referenced in type namesSystemPython
type (previously replaced)