Commit graph

2 commits

Author SHA1 Message Date
Andrew Gallant
9ea03ceb38
uv-cli: add worktree support to build.rs (#6825)
Previously, we were always asking Cargo to rebuild `uv-cli` if
`.git/HEAD` had changed. But in a worktree, `.git` is a file, not a
directory. And the file contains the path to git's internal worktree
state, which also has its own `HEAD` file. So in the case of a worktree,
we read the file and tell Cargo to watch the worktree-specific `HEAD`
file instead of `.git/head`.

The main thing this fixes is that, previously, in a worktree, `cargo
build` would *always* re-compile `uv` even if nothing changed.

This doesn't impact or fix anything in "typical" clones of uv though.
Only in worktrees.

Closes #6196, Closes #6197
2024-08-29 14:11:50 -04:00
Charlie Marsh
1eee427c94
Add standalone CLI crate (#4456)
## Summary

This PR moves all the CLI code into its own crate, separate from the
`uv` crate. The `uv` crate is iterated on frequently, and the CLI code
comprises a significant portion of it but rarely changes. Removing the
CLI code reduces the `uv` crate size from 1.4MiB to 1.0MiB.
2024-06-24 06:16:22 -04:00
Renamed from crates/uv/build.rs (Browse further)