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

16
Cargo.lock generated
View file

@ -260,6 +260,7 @@ dependencies = [
"maybe-owned",
"miette",
"semver",
"simple-git",
"strum",
"target-lexicon",
"tempfile",
@ -295,11 +296,9 @@ dependencies = [
"bytes",
"bzip2",
"compact_str",
"derive_destructure2",
"flate2",
"futures-util",
"generic-array",
"gix",
"httpdate",
"percent-encoding",
"quinn 0.10.2",
@ -379,6 +378,7 @@ dependencies = [
"serde",
"serde_json",
"sha2",
"simple-git",
"tempfile",
"thiserror",
"tokio",
@ -3392,6 +3392,18 @@ dependencies = [
"libc",
]
[[package]]
name = "simple-git"
version = "0.0.0"
dependencies = [
"compact_str",
"derive_destructure2",
"gix",
"thiserror",
"tokio",
"tracing",
]
[[package]]
name = "slab"
version = "0.4.8"