Skip to content

Commit

Permalink
port all git functionality to use git CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
ibraheemdev committed May 24, 2024
1 parent c2931e8 commit a8686e2
Show file tree
Hide file tree
Showing 16 changed files with 300 additions and 2,308 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Source distributions can run arbitrary code on build and can make unwanted modif
```bash
docker buildx build -t uv-builder -f builder.dockerfile --load .
# Build for musl to avoid glibc errors, might not be required with your OS version
cargo build --target x86_64-unknown-linux-musl --profile profiling --features vendored-openssl
cargo build --target x86_64-unknown-linux-musl --profile profiling
docker run --rm -it -v $(pwd):/app uv-builder /app/target/x86_64-unknown-linux-musl/profiling/uv-dev resolve-many --cache-dir /app/cache-docker /app/scripts/popular_packages/pypi_10k_most_dependents.txt
```

Expand Down
115 changes: 2 additions & 113 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,8 @@ flate2 = { version = "1.0.28", default-features = false }
fs-err = { version = "2.11.0" }
fs2 = { version = "0.4.3" }
futures = { version = "0.3.30" }
git2 = { version = "0.18.1" }
glob = { version = "0.3.1" }
hex = { version = "0.4.3" }
hmac = { version = "0.12.1" }
home = { version = "0.5.9" }
html-escape = { version = "0.2.13" }
http = { version = "1.1.0" }
indexmap = { version = "2.2.5" }
Expand All @@ -105,7 +102,6 @@ platform-info = { version = "2.0.2" }
pubgrub = { git = "https://github.com/astral-sh/pubgrub", rev = "0e684a874c9fb8f74738cd8875524c80e3d4820b" }
pyo3 = { version = "0.21.0" }
pyo3-log = { version = "0.10.0" }
rand = { version = "0.8.5" }
rayon = { version = "1.8.0" }
reflink-copy = { version = "0.1.15" }
regex = { version = "1.10.2" }
Expand All @@ -121,7 +117,6 @@ schemars = { version = "0.8.16", features = ["url"] }
seahash = { version = "4.1.0" }
serde = { version = "1.0.197" }
serde_json = { version = "1.0.114" }
sha1 = { version = "0.10.6" }
sha2 = { version = "0.10.8" }
sys-info = { version = "0.9.1" }
tempfile = { version = "3.9.0" }
Expand Down
2 changes: 1 addition & 1 deletion crates/distribution-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pep508_rs = { workspace = true }
platform-tags = { workspace = true }
pypi-types = { workspace = true }
uv-fs = { workspace = true }
uv-git = { workspace = true, features = ["vendored-openssl"] }
uv-git = { workspace = true }
uv-normalize = { workspace = true }

anyhow = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion crates/pypi-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ uv-normalize = { workspace = true }
uv-git = { workspace = true }

chrono = { workspace = true, features = ["serde"] }
git2 = { workspace = true }
indexmap = { workspace = true, features = ["serde"] }
mailparse = { workspace = true }
once_cell = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/pypi-types/src/parsed_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use thiserror::Error;
use url::{ParseError, Url};

use pep508_rs::{Pep508Url, UnnamedRequirementUrl, VerbatimUrl, VerbatimUrlError};
use uv_git::{GitSha, GitUrl};
use uv_git::{GitSha, GitUrl, OidParseError};

use crate::{ArchiveInfo, DirInfo, DirectUrl, VcsInfo, VcsKind};

Expand All @@ -20,7 +20,7 @@ pub enum ParsedUrlError {
#[error("Invalid path in file URL: `{0}`")]
InvalidFileUrl(Url),
#[error("Failed to parse Git reference from URL: `{0}`")]
GitShaParse(Url, #[source] git2::Error),
GitShaParse(Url, #[source] OidParseError),
#[error("Not a valid URL: `{0}`")]
UrlParse(String, #[source] ParseError),
#[error(transparent)]
Expand Down
2 changes: 1 addition & 1 deletion crates/uv-distribution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ uv-cache = { workspace = true }
uv-client = { workspace = true }
uv-extract = { workspace = true }
uv-fs = { workspace = true, features = ["tokio"] }
uv-git = { workspace = true, features = ["vendored-openssl"] }
uv-git = { workspace = true }
uv-normalize = { workspace = true }
uv-types = { workspace = true }
uv-configuration = { workspace = true }
Expand Down
14 changes: 2 additions & 12 deletions crates/uv-git/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,10 @@ cache-key = { workspace = true }
uv-fs = { workspace = true }

anyhow = { workspace = true }
base64 = { workspace = true }
thiserror = { workspace = true }
cargo-util = { workspace = true }
git2 = { workspace = true }
glob = { workspace = true }
hmac = { workspace = true }
home = { workspace = true }
rand = { workspace = true }
hex = { workspace = true }
reqwest = { workspace = true, features = ["blocking"] }
sha1 = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }
fs-err = { workspace = true }

[features]
vendored-libgit2 = ["git2/vendored-libgit2"]
vendored-openssl = ["git2/vendored-openssl"]
Loading

0 comments on commit a8686e2

Please sign in to comment.