Refactor: Extract new crate simple-git (#1304)

`binstalk-downloader` contains stuff about http(s) before the
git code is moved into it and now it becomes http and git.

While git indeed uses http stuff, which is why I decided to put
it into binstalk-downloader, it is more than just downloading
since it is stateful (can be cached locally and updated)
where as http is stateless.

Also `binstalk-downloader`'s codegen time now increases
dramatically and it also creates extra dependencies for
binstalk-fetchers, delaying its execution.

The git code also don't use anything from `binstalk-downloader`
at all, it makes sense to be an independent crate.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-08-19 11:08:55 +10:00 committed by GitHub
parent 20a57a9a9b
commit dc77a1ab93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 258 additions and 24 deletions

View file

@ -17,11 +17,9 @@ binstalk-types = { version = "0.5.0", path = "../binstalk-types" }
bytes = "1.4.0"
bzip2 = "0.4.4"
compact_str = "0.7.0"
derive_destructure2 = "0.1"
flate2 = { version = "1.0.26", default-features = false }
futures-util = "0.3.28"
generic-array = "0.14.7"
gix = { version = "0.51.0", features = ["blocking-http-transport-reqwest"], optional = true }
httpdate = "1.0.2"
reqwest = { version = "0.11.18", features = ["stream", "gzip", "brotli", "deflate"], default-features = false }
percent-encoding = "2.2.0"
@ -76,15 +74,11 @@ rustls = [
# trust-dns-resolver currently supports https with rustls
"trust-dns-resolver?/dns-over-https-rustls",
"trust-dns-resolver?/dns-over-quic",
"gix?/blocking-http-transport-reqwest-rust-tls",
]
native-tls = [
"__tls",
"reqwest/native-tls",
"trust-dns-resolver?/dns-over-native-tls",
"gix?/blocking-http-transport-reqwest-native-tls",
]
# Enable trust-dns-resolver so that features on it will also be enabled.
@ -101,9 +95,6 @@ cross-lang-fat-lto = ["zstd/fat-lto"]
gh-api-client = ["json"]
json = ["serde", "serde_json"]
git = ["dep:gix"]
git-max-perf = ["gix?/max-performance"]
[package.metadata.docs.rs]
features = ["gh-api-client", "git"]
rustdoc-args = ["--cfg", "docsrs"]