rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood73d7db9d87ea624ec6414eec7d2255745f8b4d6a
{
"request": "trigger",
"version": 1,
"event_type": "patch",
"repository": {
"id": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
"name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack",
"private": false,
"default_branch": "master",
"delegates": [
"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
"did:key:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Created",
"patch": {
"id": "6c3b14ac47b2d305e2330055d09ddd39e12f9ebe",
"author": {
"id": "did:key:z6Mksvd5tMVCuU317t7c9wg8caNzWY4BJNvm6waQdvQXgeZL",
"alias": null
},
"title": "fetch: integrate the latest `gix-protocol` into `radicle-fetch`",
"state": {
"status": "merged",
"conflicts": []
},
"before": "87cb7bf52da9ea5def8fd6ba80703dbdf5104d21",
"after": "73d7db9d87ea624ec6414eec7d2255745f8b4d6a",
"commits": [
"73d7db9d87ea624ec6414eec7d2255745f8b4d6a",
"274d156297fe0ec28257bd382d4fa7223481f94e"
],
"target": "6cfed884bf37cba1e0d8e97fa8b0e94df4a04b1f",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "6c3b14ac47b2d305e2330055d09ddd39e12f9ebe",
"author": {
"id": "did:key:z6Mksvd5tMVCuU317t7c9wg8caNzWY4BJNvm6waQdvQXgeZL",
"alias": null
},
"description": "It makes only minimal changes, but overall allows to remove a lot of \npreviously duplicated code.",
"base": "87cb7bf52da9ea5def8fd6ba80703dbdf5104d21",
"oid": "73d7db9d87ea624ec6414eec7d2255745f8b4d6a",
"timestamp": 1735045746
},
{
"id": "eba00a6bfb9722a17b0424497126ee68b3485eaa",
"author": {
"id": "did:key:z6Mksvd5tMVCuU317t7c9wg8caNzWY4BJNvm6waQdvQXgeZL",
"alias": null
},
"description": "Changes:\n- removed the commented out `gix-actor` dependency\n- removed `repo` field from `ls_refs::Config`\n- fixed documentation linking in fetch",
"base": "87cb7bf52da9ea5def8fd6ba80703dbdf5104d21",
"oid": "268b4118f96c0a4a1987d7f5278263a554141c62",
"timestamp": 1736254045
},
{
"id": "6c4826ead658a88a6501d0649b95623e2be75118",
"author": {
"id": "did:key:z6Mksvd5tMVCuU317t7c9wg8caNzWY4BJNvm6waQdvQXgeZL",
"alias": null
},
"description": "Changes:\n- Apply better error handling changes",
"base": "87cb7bf52da9ea5def8fd6ba80703dbdf5104d21",
"oid": "6228889683bf9eaa1533aeb72ed4dec8fa94ef10",
"timestamp": 1737027882
},
{
"id": "dcb954b42b9746b260bba0ee1cf499c81fa01ebc",
"author": {
"id": "did:key:z6Mksvd5tMVCuU317t7c9wg8caNzWY4BJNvm6waQdvQXgeZL",
"alias": null
},
"description": "Changes:\n- Rebased\n- Squashed commits",
"base": "96637aca7ee004620e35d8d495b33e6601270aca",
"oid": "8a7af65931638ed659d44388c680b13d71ebb7f9",
"timestamp": 1744886685
},
{
"id": "43a22b28b555da9dc206e0beb2a18f03788ab224",
"author": {
"id": "did:key:z6Mksvd5tMVCuU317t7c9wg8caNzWY4BJNvm6waQdvQXgeZL",
"alias": null
},
"description": "Allow license \"Unlicense\".",
"base": "96637aca7ee004620e35d8d495b33e6601270aca",
"oid": "72913b8c152e588e14f42aaa851df9de642f390d",
"timestamp": 1744891830
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "44f3e838-299a-4cdf-8683-15a32897d096"
},
"info_url": "https://cci.rad.levitte.org//44f3e838-299a-4cdf-8683-15a32897d096.html"
}
Started at: 2025-10-21 20:17:53.331673+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW added
✓ Remote-tracking branch cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW/master created for z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz added
✓ Remote-tracking branch erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz/master created for z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz
✓ Remote lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz added
✓ Remote-tracking branch lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz/master created for z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz
✓ Repository successfully cloned under /opt/radcis/ci.rad.levitte.org/cci/state/44f3e838-299a-4cdf-8683-15a32897d096/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 125 issues · 15 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout 6c3b14ac47b2d305e2330055d09ddd39e12f9ebe
✓ Switched to branch patch/6c3b14a at revision 6c3b14a
✓ Branch patch/6c3b14a setup to track rad/patches/6c3b14ac47b2d305e2330055d09ddd39e12f9ebe
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 73d7db9d87ea624ec6414eec7d2255745f8b4d6a
HEAD is now at 73d7db9d fetch: integrate the latest `gix-protocol` into `radicle-fetch`
Exit code: 0
$ git show 73d7db9d87ea624ec6414eec7d2255745f8b4d6a
commit 73d7db9d87ea624ec6414eec7d2255745f8b4d6a
Author: Sebastian Thiel <sebastian.thiel@icloud.com>
Date: Tue Dec 17 18:34:37 2024 +0100
fetch: integrate the latest `gix-protocol` into `radicle-fetch`
Signed-off-by: Sebastian Thiel <sebastian.thiel@icloud.com>
diff --git a/Cargo.lock b/Cargo.lock
index cb528a24..eb1731f0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -836,9 +836,9 @@ dependencies = [
[[package]]
name = "gix-command"
-version = "0.3.11"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d7d6b8f3a64453fd7e8191eb80b351eb7ac0839b40a1237cd2c137d5079fe53"
+checksum = "9405c0a56e17f8365a46870cd2c7db71323ecc8bda04b50cb746ea37bd091e90"
dependencies = [
"bstr",
"gix-path",
@@ -875,9 +875,9 @@ dependencies = [
[[package]]
name = "gix-credentials"
-version = "0.25.1"
+version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2be87bb8685fc7e6e7032ef71c45068ffff609724a0c897b8047fde10db6ae71"
+checksum = "82a50c56b785c29a151ab4ccf74a83fe4e21d2feda0d30549504b4baed353e0a"
dependencies = [
"bstr",
"gix-command",
@@ -892,9 +892,9 @@ dependencies = [
[[package]]
name = "gix-date"
-version = "0.9.2"
+version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "691142b1a34d18e8ed6e6114bc1a2736516c5ad60ef3aa9bd1b694886e3ca92d"
+checksum = "c57c477b645ee248b173bb1176b52dd528872f12c50375801a58aaf5ae91113f"
dependencies = [
"bstr",
"itoa",
@@ -904,9 +904,9 @@ dependencies = [
[[package]]
name = "gix-diff"
-version = "0.48.0"
+version = "0.49.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a327be31a392144b60ab0b1c863362c32a1c8f7effdfa2141d5d5b6b916ef3bf"
+checksum = "a8e92566eccbca205a0a0f96ffb0327c061e85bc5c95abbcddfe177498aa04f6"
dependencies = [
"bstr",
"gix-hash",
@@ -934,9 +934,9 @@ dependencies = [
[[package]]
name = "gix-fs"
-version = "0.12.0"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34740384d8d763975858fa2c176b68652a6fcc09f616e24e3ce967b0d370e4d8"
+checksum = "3b3d4fac505a621f97e5ce2c69fdc425742af00c0920363ca4074f0eb48b1db9"
dependencies = [
"fastrand",
"gix-features",
@@ -964,11 +964,38 @@ dependencies = [
"parking_lot",
]
+[[package]]
+name = "gix-lock"
+version = "15.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1cd3ab68a452db63d9f3ebdacb10f30dba1fa0d31ac64f4203d395ed1102d940"
+dependencies = [
+ "gix-tempfile",
+ "gix-utils",
+ "thiserror 2.0.7",
+]
+
+[[package]]
+name = "gix-negotiate"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d27f830a16405386e9c83b9d5be8261fe32bbd6b3caf15bd1b284c6b2b7ef1a8"
+dependencies = [
+ "bitflags 2.5.0",
+ "gix-commitgraph",
+ "gix-date",
+ "gix-hash",
+ "gix-object",
+ "gix-revwalk",
+ "smallvec",
+ "thiserror 2.0.7",
+]
+
[[package]]
name = "gix-object"
-version = "0.46.0"
+version = "0.46.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65d93e2bbfa83a307e47f45e45de7b6c04d7375a8bd5907b215f4bf45237d879"
+checksum = "e42d58010183ef033f31088479b4eb92b44fe341b35b62d39eb8b185573d77ea"
dependencies = [
"bstr",
"gix-actor",
@@ -976,6 +1003,7 @@ dependencies = [
"gix-features",
"gix-hash",
"gix-hashtable",
+ "gix-path",
"gix-utils",
"gix-validate",
"itoa",
@@ -986,9 +1014,9 @@ dependencies = [
[[package]]
name = "gix-odb"
-version = "0.65.0"
+version = "0.66.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93bed6e1b577c25a6bb8e6ecbf4df525f29a671ddf5f2221821a56a8dbeec4e3"
+checksum = "cb780eceb3372ee204469478de02eaa34f6ba98247df0186337e0333de97d0ae"
dependencies = [
"arc-swap",
"gix-date",
@@ -1007,9 +1035,9 @@ dependencies = [
[[package]]
name = "gix-pack"
-version = "0.55.0"
+version = "0.56.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b91fec04d359544fecbb8e85117ec746fbaa9046ebafcefb58cb74f20dc76d4"
+checksum = "4158928929be29cae7ab97afc8e820a932071a7f39d8ba388eed2380c12c566c"
dependencies = [
"gix-chunk",
"gix-diff",
@@ -1028,9 +1056,9 @@ dependencies = [
[[package]]
name = "gix-packetline"
-version = "0.18.1"
+version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a720e5bebf494c3ceffa85aa89f57a5859450a0da0a29ebe89171e23543fa78"
+checksum = "911aeea8b2dabeed2f775af9906152a1f0109787074daf9e64224e3892dde453"
dependencies = [
"bstr",
"faster-hex",
@@ -1053,9 +1081,9 @@ dependencies = [
[[package]]
name = "gix-prompt"
-version = "0.8.9"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a7822afc4bc9c5fbbc6ce80b00f41c129306b7685cac3248dbfa14784960594"
+checksum = "82433a19aa44688e3bde05c692870eda50b5db053df53ed5ae6d8ea594a6babd"
dependencies = [
"gix-command",
"gix-config-value",
@@ -1066,15 +1094,23 @@ dependencies = [
[[package]]
name = "gix-protocol"
-version = "0.46.1"
+version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a7e7e51a0dea531d3448c297e2fa919b2de187111a210c324b7e9f81508b8ca"
+checksum = "c84642e8b6fed7035ce9cc449593019c55b0ec1af7a5dce1ab8a0636eaaeb067"
dependencies = [
"bstr",
"gix-credentials",
"gix-date",
"gix-features",
"gix-hash",
+ "gix-lock",
+ "gix-negotiate",
+ "gix-object",
+ "gix-ref",
+ "gix-refspec",
+ "gix-revwalk",
+ "gix-shallow",
+ "gix-trace",
"gix-transport",
"gix-utils",
"maybe-async",
@@ -1093,6 +1129,56 @@ dependencies = [
"thiserror 2.0.7",
]
+[[package]]
+name = "gix-ref"
+version = "0.49.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a91b61776c839d0f1b7114901179afb0947aa7f4d30793ca1c56d335dfef485f"
+dependencies = [
+ "gix-actor",
+ "gix-features",
+ "gix-fs",
+ "gix-hash",
+ "gix-lock",
+ "gix-object",
+ "gix-path",
+ "gix-tempfile",
+ "gix-utils",
+ "gix-validate",
+ "memmap2",
+ "thiserror 2.0.7",
+ "winnow",
+]
+
+[[package]]
+name = "gix-refspec"
+version = "0.27.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00c056bb747868c7eb0aeb352c9f9181ab8ca3d0a2550f16470803500c6c413d"
+dependencies = [
+ "bstr",
+ "gix-hash",
+ "gix-revision",
+ "gix-validate",
+ "smallvec",
+ "thiserror 2.0.7",
+]
+
+[[package]]
+name = "gix-revision"
+version = "0.31.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61e1ddc474405a68d2ce8485705dd72fe6ce959f2f5fe718601ead5da2c8f9e7"
+dependencies = [
+ "bstr",
+ "gix-commitgraph",
+ "gix-date",
+ "gix-hash",
+ "gix-object",
+ "gix-revwalk",
+ "thiserror 2.0.7",
+]
+
[[package]]
name = "gix-revwalk"
version = "0.17.0"
@@ -1120,6 +1206,18 @@ dependencies = [
"windows-sys 0.52.0",
]
+[[package]]
+name = "gix-shallow"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "88d2673242e87492cb6ff671f0c01f689061ca306c4020f137197f3abc84ce01"
+dependencies = [
+ "bstr",
+ "gix-hash",
+ "gix-lock",
+ "thiserror 2.0.7",
+]
+
[[package]]
name = "gix-tempfile"
version = "15.0.0"
@@ -1141,9 +1239,9 @@ checksum = "04bdde120c29f1fc23a24d3e115aeeea3d60d8e65bab92cc5f9d90d9302eb952"
[[package]]
name = "gix-transport"
-version = "0.43.1"
+version = "0.44.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39a1a41357b7236c03e0c984147f823d87c3e445a8581bac7006df141577200b"
+checksum = "dd04d91e507a8713cfa2318d5a85d75b36e53a40379cc7eb7634ce400ecacbaf"
dependencies = [
"bstr",
"gix-command",
@@ -1157,9 +1255,9 @@ dependencies = [
[[package]]
name = "gix-traverse"
-version = "0.43.0"
+version = "0.43.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ff2ec9f779680f795363db1c563168b32b8d6728ec58564c628e85c92d29faf"
+checksum = "6ed47d648619e23e93f971d2bba0d10c1100e54ef95d2981d609907a8cabac89"
dependencies = [
"bitflags 2.5.0",
"gix-commitgraph",
@@ -1174,13 +1272,14 @@ dependencies = [
[[package]]
name = "gix-url"
-version = "0.28.1"
+version = "0.28.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e09f97db3618fb8e473d7d97e77296b50aaee0ddcd6a867f07443e3e87391099"
+checksum = "d096fb733ba6bd3f5403dba8bd72bdd8809fe2b347b57844040b8f49c93492d9"
dependencies = [
"bstr",
"gix-features",
"gix-path",
+ "percent-encoding",
"thiserror 2.0.7",
"url",
]
diff --git a/radicle-fetch/src/transport.rs b/radicle-fetch/src/transport.rs
index 9b08f79e..eeaa3bc4 100644
--- a/radicle-fetch/src/transport.rs
+++ b/radicle-fetch/src/transport.rs
@@ -10,9 +10,7 @@ use std::sync::Arc;
use bstr::BString;
use gix_features::progress::prodash::progress;
use gix_protocol::handshake;
-use gix_protocol::FetchConnection;
use gix_transport::client;
-use gix_transport::client::TransportWithoutIO as _;
use gix_transport::Protocol;
use gix_transport::Service;
use radicle::git::Oid;
@@ -85,7 +83,7 @@ where
log::trace!(target: "fetch", "Performing handshake for {}", self.repo);
let (read, write) = self.stream.open().map_err(io_other)?;
gix_protocol::fetch::handshake(
- &mut Connection::new(read, write, FetchConnection::AllowReuse, self.repo.clone()),
+ &mut Connection::new(read, write, self.repo.clone()),
|_| Ok(None),
vec![],
&mut progress::Discard,
@@ -105,11 +103,10 @@ where
ls_refs::run(
ls_refs::Config {
prefixes,
- extra_params: vec![],
repo: self.repo.clone(),
},
handshake,
- Connection::new(read, write, FetchConnection::AllowReuse, self.repo.clone()),
+ Connection::new(read, write, self.repo.clone()),
&mut progress::Discard,
)
.map_err(io_other)
@@ -137,7 +134,7 @@ where
interrupt,
},
handshake,
- Connection::new(read, write, FetchConnection::AllowReuse, self.repo.clone()),
+ Connection::new(read, write, self.repo.clone()),
&mut progress::Discard,
)
.map_err(io_other)?
@@ -184,7 +181,6 @@ where
pub(crate) struct Connection<R, W> {
inner: client::git::Connection<R, W>,
- mode: FetchConnection,
}
impl<R, W> Connection<R, W>
@@ -192,7 +188,7 @@ where
R: io::Read,
W: io::Write,
{
- pub fn new(read: R, write: W, mode: FetchConnection, repo: BString) -> Self {
+ pub fn new(read: R, write: W, repo: BString) -> Self {
Self {
inner: client::git::Connection::new(
read,
@@ -203,7 +199,6 @@ where
client::git::ConnectMode::Daemon,
false,
),
- mode,
}
}
}
@@ -256,20 +251,6 @@ where
}
}
-fn indicate_end_of_interaction<R, W>(transport: &mut Connection<R, W>) -> Result<(), client::Error>
-where
- R: io::Read,
- W: io::Write,
-{
- // An empty request marks the (early) end of the interaction. Only relevant in stateful transports though.
- if transport.connection_persists_across_multiple_requests() {
- transport
- .request(client::WriteMode::Binary, client::MessageKind::Flush, false)?
- .into_read()?;
- }
- Ok(())
-}
-
fn io_other(err: impl std::error::Error + Send + Sync + 'static) -> io::Error {
io::Error::new(io::ErrorKind::Other, err)
}
diff --git a/radicle-fetch/src/transport/fetch.rs b/radicle-fetch/src/transport/fetch.rs
index 41a97fde..ee5f0bba 100644
--- a/radicle-fetch/src/transport/fetch.rs
+++ b/radicle-fetch/src/transport/fetch.rs
@@ -1,27 +1,19 @@
-use std::borrow::Cow;
use std::io;
-use std::io::BufRead;
use std::path::PathBuf;
use std::sync::{atomic::AtomicBool, Arc};
-use gix_features::progress::NestedProgress;
+use gix_features::progress::{DynNestedProgress, NestedProgress};
use gix_pack as pack;
use gix_protocol::fetch;
-use gix_protocol::fetch::{Delegate, DelegateBlocking};
+use gix_protocol::fetch::negotiate::one_round::State;
use gix_protocol::handshake;
use gix_protocol::handshake::Ref;
-use gix_protocol::ls_refs;
-use gix_protocol::FetchConnection;
-use gix_transport::bstr::BString;
-use gix_transport::client;
-use gix_transport::client::{ExtendedBufRead, MessageKind};
-use gix_transport::Protocol;
-use crate::git::packfile;
+use crate::git::{oid, packfile};
-use super::{agent_name, indicate_end_of_interaction, Connection, WantsHaves};
+use super::{agent_name, Connection, WantsHaves};
-pub type Error = gix_protocol::fetch::Error;
+pub type Error = fetch::Error;
pub mod error {
use std::io;
@@ -50,15 +42,11 @@ pub struct PackWriter {
impl PackWriter {
/// Write the packfile read from `pack` to the `objects/pack`
/// directory.
- pub fn write_pack<P>(
+ pub fn write_pack(
&self,
- mut pack: impl BufRead,
- mut progress: P,
- ) -> Result<pack::bundle::write::Outcome, error::PackWriter>
- where
- P: NestedProgress,
- P::SubProgress: 'static,
- {
+ pack: &mut dyn std::io::BufRead,
+ progress: &mut dyn DynNestedProgress,
+ ) -> Result<pack::bundle::write::Outcome, error::PackWriter> {
let options = pack::bundle::write::Options {
// N.b. use all cores. Can make configurable if needed
// later.
@@ -80,9 +68,9 @@ impl PackWriter {
)?);
let thickener = thickener.to_handle_arc();
Ok(pack::Bundle::write_to_directory(
- &mut pack,
+ pack,
Some(&self.git_dir.join("objects").join("pack")),
- &mut progress,
+ progress,
&self.interrupt,
Some(thickener),
options,
@@ -92,10 +80,8 @@ impl PackWriter {
/// The fetch [`Delegate`] that negotiates the fetch with the
/// server-side.
-pub struct Fetch {
+pub struct Negotiate {
wants_haves: WantsHaves,
- pack_writer: PackWriter,
- out: FetchOut,
}
/// The result of running a fetch via [`run`].
@@ -105,77 +91,50 @@ pub struct FetchOut {
pub keepfile: Option<packfile::Keepfile>,
}
-// FIXME: the delegate pattern will be removed in the near future and
-// we should look at the fetch code being used in gix to see how we
-// can migrate to the proper form of fetching.
-impl<'a> Delegate for &'a mut Fetch {
- fn receive_pack(
+impl fetch::Negotiate for Negotiate {
+ fn mark_complete_and_common_ref(
&mut self,
- input: impl io::BufRead,
- progress: impl NestedProgress + 'static,
- _refs: &[handshake::Ref],
- previous_response: &fetch::Response,
- ) -> io::Result<()> {
- self.out
- .refs
- .extend(previous_response.wanted_refs().iter().map(
- |fetch::response::WantedRef { id, path }| Ref::Direct {
- full_ref_name: path.clone(),
- object: *id,
- },
- ));
- let pack = self
- .pack_writer
- .write_pack(input, progress)
- .map_err(|err| io::Error::new(io::ErrorKind::Other, err))?;
- self.out.keepfile = pack.keep_path.as_ref().and_then(packfile::Keepfile::new);
- self.out.pack = Some(pack);
- Ok(())
+ ) -> Result<fetch::negotiate::Action, fetch::negotiate::Error> {
+ Ok(fetch::negotiate::Action::MustNegotiate {
+ remote_ref_target_known: vec![],
+ })
}
-}
-impl<'a> DelegateBlocking for &'a mut Fetch {
- fn negotiate(
+ fn add_wants(
&mut self,
- _refs: &[handshake::Ref],
arguments: &mut fetch::Arguments,
- _previous_response: Option<&fetch::Response>,
- ) -> io::Result<fetch::Action> {
- use crate::git::oid;
-
+ _remote_ref_target_known: &[bool],
+ ) -> bool {
+ let mut has_want = false;
for oid in &self.wants_haves.wants {
arguments.want(oid::to_object_id(*oid));
+ has_want = true;
}
+ has_want
+ }
+ /// We don't actually negotiate, just provides all our haves and wants, while telling the
+ /// server to make the best of it and just send a pack.
+ /// Real Git negotiation can be done with calls to [`fetch::negotiate::one_round()`], but that
+ /// requires a [`fetch::RefMap`] which can be instantiated with refspecs.
+ fn one_round(
+ &mut self,
+ _state: &mut State,
+ arguments: &mut fetch::Arguments,
+ _previous_response: Option<&fetch::Response>,
+ ) -> Result<(fetch::negotiate::Round, bool), fetch::negotiate::Error> {
for oid in &self.wants_haves.haves {
arguments.have(oid::to_object_id(*oid));
}
- // N.b. sends `done` packet
- Ok(fetch::Action::Cancel)
- }
-
- fn prepare_ls_refs(
- &mut self,
- _server: &client::Capabilities,
- _arguments: &mut Vec<BString>,
- _features: &mut Vec<(&str, Option<Cow<'_, str>>)>,
- ) -> io::Result<ls_refs::Action> {
- // N.b. we performed ls-refs before the fetch already.
- Ok(ls_refs::Action::Skip)
- }
-
- fn prepare_fetch(
- &mut self,
- _version: Protocol,
- _server: &client::Capabilities,
- _features: &mut Vec<(&str, Option<Cow<'_, str>>)>,
- _refs: &[handshake::Ref],
- ) -> io::Result<fetch::Action> {
- if self.wants_haves.wants.is_empty() {
- return Err(io::Error::new(io::ErrorKind::InvalidData, "empty fetch"));
- }
- Ok(fetch::Action::Continue)
+ let round = fetch::negotiate::Round {
+ haves_sent: self.wants_haves.haves.len(),
+ in_vain: 0,
+ haves_to_send: 0,
+ previous_response_had_at_least_one_in_common: false,
+ };
+ let is_done = true;
+ Ok((round, is_done))
}
}
@@ -200,116 +159,59 @@ where
{
log::trace!(target: "fetch", "Performing fetch");
- let mut delegate = Fetch {
- wants_haves,
- pack_writer,
- out: FetchOut {
- refs: Vec::new(),
- pack: None,
- keepfile: None,
- },
- };
-
- let handshake::Outcome {
- server_protocol_version: protocol,
- refs: _refs,
- v1_shallow_updates: _,
- capabilities,
- } = handshake;
- let agent = agent_name()?;
- let fetch = gix_protocol::Command::Fetch;
-
- let mut features = fetch.default_features(*protocol, capabilities);
- match (&mut delegate).prepare_fetch(*protocol, capabilities, &mut features, &[]) {
- Ok(fetch::Action::Continue) => {
- // FIXME: this is a private function in gitoxide
- // fetch.validate_argument_prefixes_or_panic(protocol, &capabilities, &[], &features)
- }
- // N.b. we always return Action::Continue
- Ok(fetch::Action::Cancel) => unreachable!(),
- Err(err) => {
- indicate_end_of_interaction(&mut conn)?;
- return Err(err.into());
- }
- }
-
- gix_protocol::fetch::Response::check_required_features(*protocol, &features)?;
- let sideband_all = features.iter().any(|(n, _)| *n == "sideband-all");
- features.push(("agent", Some(Cow::Owned(agent))));
- let mut args = fetch::Arguments::new(*protocol, features, false);
-
- let mut previous_response = None::<fetch::Response>;
- let mut round = 1;
- 'negotiation: loop {
- progress.step();
- progress.set_name(format!("negotiate (round {round})"));
- round += 1;
- let action = (&mut delegate).negotiate(&[], &mut args, previous_response.as_ref())?;
- let mut reader = args.send(&mut conn, action == fetch::Action::Cancel)?;
- if sideband_all {
- setup_remote_progress(progress, &mut reader);
- }
- let response = fetch::Response::from_line_reader(*protocol, &mut reader, true, false)?;
- previous_response = if response.has_pack() {
- progress.step();
- if !sideband_all {
- setup_remote_progress(progress, &mut reader);
- }
- let timer = std::time::Instant::now();
- // TODO: remove delegate in favor of functional style to fix progress-hack,
- // needed as it needs `'static`. As the top-level seems to pass `Discard`,
- // there should be no repercussions right now.
- (&mut delegate).receive_pack(
- &mut reader,
- progress.add_child("receiving pack"),
- &[],
- &response,
- )?;
- log::trace!(target: "fetch", "Received pack ({}ms)", timer.elapsed().as_millis());
- assert_eq!(
- reader.stopped_at(),
- None,
- "packs are read without 'overshooting', hence it never encountered EOF"
- );
- // Consume anything that might still be left on the wire - this is 'EOF' most of the time,
- // but some tests have 'garbage' here as well.
- std::io::copy(&mut reader, &mut std::io::sink())?;
- assert_eq!(
- reader.stopped_at(),
- Some(MessageKind::Flush),
- "the flush packet was now consumed"
- );
- break 'negotiation;
- } else {
- match action {
- fetch::Action::Cancel => break 'negotiation,
- fetch::Action::Continue => Some(response),
- }
- }
- }
- if matches!(protocol, Protocol::V2)
- && matches!(conn.mode, FetchConnection::TerminateOnSuccessfulCompletion)
- {
- log::trace!(target: "fetch", "Indicating end of interaction");
- indicate_end_of_interaction(&mut conn)?;
+ if wants_haves.wants.is_empty() {
+ return Err(Error::ReadRemainingBytes(io::Error::new(
+ io::ErrorKind::InvalidData,
+ "empty fetch",
+ )));
}
-
- log::trace!(target: "fetch", "fetched refs: {:?}", delegate.out.refs);
- Ok(delegate.out)
-}
-
-fn setup_remote_progress<'a, P>(
- progress: &mut P,
- reader: &mut Box<dyn gix_transport::client::ExtendedBufRead<'a> + Unpin + 'a>,
-) where
- P: NestedProgress,
- P::SubProgress: 'static,
-{
- reader.set_progress_handler(Some(Box::new({
- let mut remote_progress = progress.add_child("remote");
- move |is_err: bool, data: &[u8]| {
- gix_protocol::RemoteProgress::translate_to_progress(is_err, data, &mut remote_progress);
- gix_transport::packetline::read::ProgressAction::Continue
- }
- }) as gix_transport::client::HandleProgress<'a>));
+ let mut out = FetchOut {
+ refs: Vec::new(),
+ pack: None,
+ keepfile: None,
+ };
+ let mut negotiate = Negotiate { wants_haves };
+ let agent = agent_name().map_err(Error::ReadRemainingBytes)?;
+
+ let mut pack_out = None;
+ let mut handshake = handshake.clone();
+ let fetch_out = gix_protocol::fetch(
+ &mut negotiate,
+ |read_pack, progress, _should_interrupt| -> Result<_, error::PackWriter> {
+ let res = pack_writer.write_pack(read_pack, progress)?;
+ pack_out = Some(res);
+ Ok(true)
+ },
+ progress,
+ &pack_writer.interrupt,
+ fetch::Context {
+ handshake: &mut handshake,
+ transport: &mut conn,
+ user_agent: ("agent", Some(agent.into())),
+ trace_packetlines: false,
+ },
+ fetch::Options {
+ shallow_file: "no shallow file required as we reject shallow remotes (and we aren't shallow ourselves)".into(),
+ reject_shallow_remote: true,
+ shallow: &fetch::Shallow::NoChange,
+ tags: fetch::Tags::None,
+ },
+ )?.expect("we always get a pack");
+
+ out.refs
+ .extend(fetch_out.last_response.wanted_refs().iter().map(
+ |fetch::response::WantedRef { id, path }| Ref::Direct {
+ full_ref_name: path.clone(),
+ object: *id,
+ },
+ ));
+ let pack_out = pack_out.expect("we always get a pack");
+ out.keepfile = pack_out
+ .keep_path
+ .as_ref()
+ .and_then(packfile::Keepfile::new);
+ out.pack = Some(pack_out);
+
+ log::trace!(target: "fetch", "fetched refs: {:?}", out.refs);
+ Ok(out)
}
diff --git a/radicle-fetch/src/transport/ls_refs.rs b/radicle-fetch/src/transport/ls_refs.rs
index 3151c646..5a25d735 100644
--- a/radicle-fetch/src/transport/ls_refs.rs
+++ b/radicle-fetch/src/transport/ls_refs.rs
@@ -1,16 +1,13 @@
use std::borrow::Cow;
-use std::io::{self, BufRead};
+use std::io;
-use bstr::ByteSlice;
use gix_features::progress::Progress;
-use gix_protocol::fetch::{self, Delegate, DelegateBlocking};
use gix_protocol::handshake::{self, Ref};
+use gix_protocol::ls_refs;
use gix_protocol::transport::Protocol;
-use gix_protocol::{ls_refs, Command};
use gix_transport::bstr::{BString, ByteVec};
-use gix_transport::client::{self, TransportV2Ext};
-use super::{agent_name, indicate_end_of_interaction, Connection};
+use super::{agent_name, Connection};
/// Configuration for running an ls-refs process.
///
@@ -19,84 +16,10 @@ pub struct Config {
/// The repository name, i.e. `/<rid>`.
#[allow(dead_code)]
pub repo: BString,
- /// Extra parameters to pass to the ls-refs process.
- pub extra_params: Vec<(String, Option<String>)>,
/// Ref prefixes for filtering the output of the ls-refs process.
pub prefixes: Vec<BString>,
}
-/// The Gitoxide delegate for running the ls-refs process.
-struct LsRefs {
- /// Configuration for the ls-refs process.
- config: Config,
- /// The resulting references returned by the ls-refs process.
- refs: Vec<Ref>,
-}
-
-impl LsRefs {
- fn new(config: Config) -> Self {
- Self {
- config,
- refs: Vec::new(),
- }
- }
-}
-
-// FIXME: the delegate pattern will be removed in the near future and
-// we should look at the fetch code being used in gix to see how we
-// can migrate to the proper form of fetching.
-impl DelegateBlocking for LsRefs {
- fn handshake_extra_parameters(&self) -> Vec<(String, Option<String>)> {
- self.config.extra_params.clone()
- }
-
- fn prepare_ls_refs(
- &mut self,
- _caps: &client::Capabilities,
- args: &mut Vec<BString>,
- _: &mut Vec<(&str, Option<Cow<'_, str>>)>,
- ) -> io::Result<ls_refs::Action> {
- for prefix in &self.config.prefixes {
- let mut arg = BString::from("ref-prefix ");
- arg.push_str(prefix);
- args.push(arg)
- }
- Ok(ls_refs::Action::Continue)
- }
-
- fn prepare_fetch(
- &mut self,
- _: Protocol,
- _: &client::Capabilities,
- _: &mut Vec<(&str, Option<Cow<'_, str>>)>,
- refs: &[Ref],
- ) -> io::Result<fetch::Action> {
- self.refs.extend_from_slice(refs);
- Ok(fetch::Action::Cancel)
- }
-
- fn negotiate(
- &mut self,
- _: &[Ref],
- _: &mut fetch::Arguments,
- _: Option<&fetch::Response>,
- ) -> io::Result<fetch::Action> {
- unreachable!("`negotiate` called even though no `fetch` command was sent")
- }
-}
-
-impl Delegate for LsRefs {
- fn receive_pack(
- &mut self,
- _: impl BufRead,
- _: impl Progress,
- _: &[Ref],
- _: &fetch::Response,
- ) -> io::Result<()> {
- unreachable!("`receive_pack` called even though no `fetch` command was sent")
- }
-}
-
/// Run the ls-refs process using the provided `config`.
///
/// It is expected that the `handshake` was run outside of this
@@ -116,7 +39,6 @@ where
W: io::Write,
{
log::trace!(target: "fetch", "Performing ls-refs: {:?}", config.prefixes);
- let mut delegate = LsRefs::new(config);
let handshake::Outcome {
server_protocol_version: protocol,
capabilities,
@@ -130,48 +52,21 @@ where
)));
}
- let ls = Command::LsRefs;
- let mut features = ls.default_features(Protocol::V2, capabilities);
- // N.b. copied from gitoxide
- let mut args = vec![
- b"symrefs".as_bstr().to_owned(),
- b"peel".as_bstr().to_owned(),
- ];
- if capabilities
- .capability("ls-refs")
- .and_then(|cap| cap.supports("unborn"))
- .unwrap_or_default()
- {
- args.push("unborn".into());
- }
- let refs = match delegate.prepare_ls_refs(capabilities, &mut args, &mut features) {
- Ok(ls_refs::Action::Skip) => Vec::new(),
- Ok(ls_refs::Action::Continue) => {
- // FIXME: this is a private function
- // ls.validate_argument_prefixes_or_panic(Protocol::V2, capabilities, &args, &features);
-
- let agent = agent_name()?;
- features.push(("agent", Some(Cow::Owned(agent))));
-
- progress.step();
- progress.set_name("list refs".into());
- let mut remote_refs = conn.invoke(
- ls.as_str(),
- features.clone().into_iter(),
- if args.is_empty() {
- None
- } else {
- Some(args.into_iter())
- },
- false,
- )?;
- handshake::refs::from_v2_refs(&mut remote_refs)?
- }
- Err(err) => {
- indicate_end_of_interaction(&mut conn)?;
- return Err(err.into());
- }
- };
+ let refs = gix_protocol::ls_refs(
+ &mut conn,
+ capabilities,
+ |_caps, args, features| {
+ for prefix in &config.prefixes {
+ let mut arg = BString::from("ref-prefix ");
+ arg.push_str(prefix);
+ args.push(arg)
+ }
+ features.push(("agent", Some(Cow::Owned(agent_name()?))));
+ Ok(gix_protocol::ls_refs::Action::Continue)
+ },
+ progress,
+ false, /* trace packetlines */
+ )?;
Ok(refs)
}
Exit code: 0
shell: 'cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny clippy::all cargo build --all-targets --workspace cargo doc --workspace cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 44f3e838-299a-4cdf-8683-15a32897d096 -v /opt/radcis/ci.rad.levitte.org/cci/state/44f3e838-299a-4cdf-8683-15a32897d096/s:/44f3e838-299a-4cdf-8683-15a32897d096/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/44f3e838-299a-4cdf-8683-15a32897d096/w:/44f3e838-299a-4cdf-8683-15a32897d096/w -w /44f3e838-299a-4cdf-8683-15a32897d096/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:bookworm bash /44f3e838-299a-4cdf-8683-15a32897d096/s/script.sh
+ cargo --version
info: syncing channel updates for '1.80-x86_64-unknown-linux-gnu'
info: latest update on 2024-08-08, rust version 1.80.1 (3f5fd8dd4 2024-08-06)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-src'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
cargo 1.80.1 (376290515 2024-07-16)
+ rustc --version
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
+ cargo fmt --check
+ cargo clippy --all-targets --workspace -- --deny clippy::all
Updating crates.io index
Downloading crates ...
Downloaded rfc6979 v0.4.0
Downloaded sec1 v0.7.3
Downloaded scrypt v0.11.0
Downloaded writeable v0.5.5
Downloaded ryu v1.0.17
Downloaded zerofrom-derive v0.1.5
Downloaded serde_json v1.0.116
Downloaded gix-tempfile v15.0.0
Downloaded amplify v4.6.0
Downloaded amplify_derive v4.0.0
Downloaded synstructure v0.13.1
Downloaded aead v0.5.2
Downloaded sqlite3-sys v0.15.2
Downloaded utf8parse v0.2.1
Downloaded adler2 v2.0.0
Downloaded subtle v2.5.0
Downloaded aes-gcm v0.10.3
Downloaded thiserror v1.0.69
Downloaded url v2.5.4
Downloaded termion v3.0.0
Downloaded parking_lot_core v0.9.9
Downloaded signature v1.6.4
Downloaded universal-hash v0.5.1
Downloaded walkdir v2.5.0
Downloaded signature v2.2.0
Downloaded gix-quote v0.4.14
Downloaded tree-sitter-rust v0.23.2
Downloaded tree-sitter-css v0.23.1
Downloaded zeroize v1.7.0
Downloaded thiserror-impl v2.0.7
Downloaded tree-sitter-go v0.23.4
Downloaded tree-sitter v0.24.4
Downloaded winnow v0.6.20
Downloaded newline-converter v0.3.0
Downloaded zerovec-derive v0.10.3
Downloaded tinyvec_macros v0.1.1
Downloaded gix-features v0.39.1
Downloaded gix-pack v0.56.0
Downloaded gix-utils v0.1.13
Downloaded gix-protocol v0.47.0
Downloaded zerovec v0.10.4
Downloaded gix-refspec v0.27.0
Downloaded home v0.5.9
Downloaded git-ref-format-core v0.3.0
Downloaded gix-trace v0.1.11
Downloaded hmac v0.12.1
Downloaded tree-sitter-python v0.23.4
Downloaded fastrand v2.1.0
Downloaded icu_provider v1.5.0
Downloaded syn v2.0.89
Downloaded ed25519 v1.5.3
Downloaded icu_properties_data v1.5.0
Downloaded git2 v0.19.0
Downloaded gix-hashtable v0.6.0
Downloaded gix-config-value v0.14.10
Downloaded tree-sitter-typescript v0.23.2
Downloaded cc v1.2.2
Downloaded lock_api v0.4.11
Downloaded pkg-config v0.3.30
Downloaded radicle-git-ext v0.8.0
Downloaded linux-raw-sys v0.4.13
Downloaded numtoa v0.1.0
Downloaded gix-url v0.28.2
Downloaded popol v3.0.0
Downloaded gix-revwalk v0.17.0
Downloaded pkcs1 v0.7.5
Downloaded rand_chacha v0.3.1
Downloaded ppv-lite86 v0.2.17
Downloaded once_cell v1.19.0
Downloaded percent-encoding v2.3.1
Downloaded memmap2 v0.9.4
Downloaded icu_locid_transform_data v1.5.0
Downloaded gix-diff v0.49.0
Downloaded displaydoc v0.2.5
Downloaded miniz_oxide v0.8.1
Downloaded pretty_assertions v1.4.0
Downloaded gix-sec v0.10.10
Downloaded num-bigint-dig v0.8.4
Downloaded regex-automata v0.4.9
Downloaded group v0.13.0
Downloaded gix-transport v0.44.0
Downloaded jiff v0.1.15
Downloaded libm v0.2.8
Downloaded regex v1.11.1
Downloaded libc v0.2.155
Downloaded pkcs8 v0.10.2
Downloaded libgit2-sys v0.17.0+1.8.1
Downloaded bloomy v1.2.0
Downloaded idna v1.0.3
Downloaded base-x v0.2.11
Downloaded p521 v0.13.3
Downloaded memchr v2.7.2
Downloaded prodash v29.0.0
Downloaded hashbrown v0.14.3
Downloaded indexmap v2.2.6
Downloaded icu_normalizer v1.5.0
Downloaded proc-macro2 v1.0.92
Downloaded lexopt v0.3.0
Downloaded num-iter v0.1.44
Downloaded libz-sys v1.1.16
Downloaded nonempty v0.9.0
Downloaded multibase v0.9.1
Downloaded poly1305 v0.8.0
Downloaded gix-validate v0.9.2
Downloaded base32 v0.4.0
Downloaded p256 v0.13.2
Downloaded io-reactor v0.5.2
Downloaded icu_locid_transform v1.5.0
Downloaded rand_core v0.6.4
Downloaded flate2 v1.0.35
Downloaded polyval v0.6.2
Downloaded p384 v0.13.0
Downloaded faster-hex v0.9.0
Downloaded gix-traverse v0.43.1
Downloaded gix-shallow v0.1.0
Downloaded gix-revision v0.31.1
Downloaded normalize-line-endings v0.3.0
Downloaded itoa v1.0.11
Downloaded idna_adapter v1.2.0
Downloaded icu_provider_macros v1.5.0
Downloaded icu_properties v1.5.1
Downloaded icu_normalizer_data v1.5.0
Downloaded icu_locid v1.5.0
Downloaded icu_collections v1.5.0
Downloaded quote v1.0.36
Downloaded qcheck-macros v1.0.0
Downloaded qcheck v1.0.0
Downloaded pem-rfc7468 v0.7.0
Downloaded pbkdf2 v0.12.2
Downloaded parking_lot v0.12.1
Downloaded nonempty v0.5.0
Downloaded noise-framework v0.4.0
Downloaded maybe-async v0.2.10
Downloaded lazy_static v1.5.0
Downloaded keccak v0.1.5
Downloaded inout v0.1.3
Downloaded iana-time-zone v0.1.60
Downloaded radicle-surf v0.22.0
Downloaded radicle-std-ext v0.1.0
Downloaded proc-macro-error-attr v1.0.4
Downloaded gix-object v0.46.1
Downloaded gix-hash v0.15.1
Downloaded gix-credentials v0.26.0
Downloaded git-ref-format v0.3.0
Downloaded equivalent v1.0.1
Downloaded ct-codecs v1.1.1
Downloaded cfg-if v1.0.0
Downloaded byteorder v1.5.0
Downloaded blowfish v0.9.1
Downloaded bitflags v2.5.0
Downloaded anstream v0.6.13
Downloaded amplify_syn v2.0.1
Downloaded num-traits v0.2.18
Downloaded log v0.4.21
Downloaded litemap v0.7.4
Downloaded proc-macro-error v1.0.4
Downloaded primeorder v0.13.6
Downloaded inquire v0.7.5
Downloaded gix-odb v0.66.0
Downloaded cyphernet v0.5.2
Downloaded rand v0.8.5
Downloaded sqlite3-src v0.5.1
Downloaded sha3 v0.10.8
Downloaded crc32fast v1.4.0
Downloaded opaque-debug v0.3.1
Downloaded num-integer v0.1.46
Downloaded netservices v0.8.0
Downloaded jobserver v0.1.31
Downloaded localtime v1.3.1
Downloaded gix-commitgraph v0.25.1
Downloaded gix-chunk v0.4.10
Downloaded fxhash v0.2.1
Downloaded ctr v0.9.2
Downloaded colored v2.1.0
Downloaded cipher v0.4.4
Downloaded arc-swap v1.7.1
Downloaded gix-negotiate v0.17.0
Downloaded digest v0.10.7
Downloaded base64 v0.21.7
Downloaded anstyle-parse v0.2.3
Downloaded escargot v0.5.10
Downloaded anyhow v1.0.82
Downloaded tree-sitter-md v0.3.2
Downloaded tree-sitter-bash v0.23.3
Downloaded regex-syntax v0.8.5
Downloaded gix-date v0.9.3
Downloaded getrandom v0.2.14
Downloaded either v1.11.0
Downloaded ec25519 v0.1.0
Downloaded colorchoice v1.0.0
Downloaded chacha20poly1305 v0.10.1
Downloaded autocfg v1.2.0
Downloaded aho-corasick v1.1.3
Downloaded cyphergraphy v0.3.0
Downloaded gix-packetline v0.18.2
Downloaded vcpkg v0.2.15
Downloaded filetime v0.2.23
Downloaded crossbeam-utils v0.8.19
Downloaded cbc v0.1.2
Downloaded bcrypt-pbkdf v0.10.0
Downloaded data-encoding v2.5.0
Downloaded crypto-bigint v0.5.5
Downloaded der v0.7.9
Downloaded gix-prompt v0.9.0
Downloaded bstr v1.9.1
Downloaded block-buffer v0.10.4
Downloaded gix-ref v0.49.1
Downloaded unicode-normalization v0.1.23
Downloaded serde v1.0.198
Downloaded ascii v1.1.0
Downloaded unicode-display-width v0.3.0
Downloaded crypto-common v0.1.6
Downloaded anstyle-query v1.0.2
Downloaded tree-sitter-json v0.24.8
Downloaded ssh-cipher v0.2.0
Downloaded sha2 v0.10.8
Downloaded gix-command v0.4.0
Downloaded dyn-clone v1.0.17
Downloaded block-padding v0.3.3
Downloaded anstyle v1.0.6
Downloaded amplify_num v0.5.2
Downloaded yoke v0.7.5
Downloaded xattr v1.3.1
Downloaded thiserror v2.0.7
Downloaded smallvec v1.13.2
Downloaded serde_derive v1.0.198
Downloaded gix-lock v15.0.1
Downloaded gix-fs v0.12.1
Downloaded ghash v0.5.1
Downloaded data-encoding-macro-internal v0.1.12
Downloaded base64 v0.13.1
Downloaded utf16_iter v1.0.5
Downloaded tree-sitter-toml-ng v0.6.0
Downloaded elliptic-curve v0.13.8
Downloaded ecdsa v0.16.9
Downloaded base64ct v1.6.0
Downloaded base16ct v0.2.0
Downloaded form_urlencoded v1.2.1
Downloaded ff v0.13.0
Downloaded chrono v0.4.38
Downloaded git-ref-format-macro v0.3.0
Downloaded cypheraddr v0.4.0
Downloaded tempfile v3.10.1
Downloaded errno v0.3.8
Downloaded const-oid v0.9.6
Downloaded aes v0.8.4
Downloaded zerofrom v0.1.5
Downloaded gix-actor v0.33.1
Downloaded yansi v0.5.1
Downloaded unicode-width v0.1.11
Downloaded tree-sitter-html v0.23.2
Downloaded sqlite v0.32.0
Downloaded sha1_smol v1.0.0
Downloaded salsa20 v0.10.2
Downloaded generic-array v0.14.7
Downloaded crossbeam-channel v0.5.13
Downloaded cpufeatures v0.2.12
Downloaded chacha20 v0.9.1
Downloaded write16 v1.0.0
Downloaded utf8_iter v1.0.4
Downloaded tree-sitter-language v0.1.2
Downloaded timeago v0.4.2
Downloaded spin v0.9.8
Downloaded snapbox v0.4.17
Downloaded siphasher v0.3.11
Downloaded diff v0.1.13
Downloaded data-encoding-macro v0.1.14
Downloaded unicode-ident v1.0.12
Downloaded tree-sitter-c v0.23.2
Downloaded rustix v0.38.34
Downloaded spki v0.7.3
Downloaded socket2 v0.5.7
Downloaded shell-words v1.1.0
Downloaded gix-path v0.10.13
Downloaded yoke-derive v0.7.5
Downloaded unicode-segmentation v1.11.0
Downloaded typenum v1.17.0
Downloaded tree-sitter-ruby v0.23.1
Downloaded tinyvec v1.6.0
Downloaded thiserror-impl v1.0.69
Downloaded tar v0.4.40
Downloaded socks5-client v0.4.1
Downloaded snapbox-macros v0.3.8
Downloaded siphasher v1.0.1
Downloaded similar v2.5.0
Downloaded scopeguard v1.2.0
Downloaded same-file v1.0.6
Downloaded streaming-iterator v0.1.9
Downloaded stable_deref_trait v1.2.0
Downloaded ssh-key v0.6.6
Downloaded tinystr v0.7.6
Downloaded ssh-encoding v0.2.0
Downloaded tree-sitter-highlight v0.24.4
Downloaded syn v1.0.109
Downloaded version_check v0.9.4
Downloaded rsa v0.9.6
Downloaded termion v2.0.3
Downloaded shlex v1.3.0
Compiling libc v0.2.155
Compiling proc-macro2 v1.0.92
Compiling unicode-ident v1.0.12
Checking cfg-if v1.0.0
Compiling shlex v1.3.0
Compiling version_check v0.9.4
Checking memchr v2.7.2
Compiling quote v1.0.36
Compiling syn v2.0.89
Compiling typenum v1.17.0
Compiling jobserver v0.1.31
Checking getrandom v0.2.14
Compiling cc v1.2.2
Compiling generic-array v0.14.7
Checking aho-corasick v1.1.3
Checking regex-syntax v0.8.5
Checking rand_core v0.6.4
Checking regex-automata v0.4.9
Compiling serde v1.0.198
Checking smallvec v1.13.2
Checking crypto-common v0.1.6
Checking fastrand v2.1.0
Checking log v0.4.21
Compiling autocfg v1.2.0
Checking bitflags v2.5.0
Compiling synstructure v0.13.1
Checking subtle v2.5.0
Compiling syn v1.0.109
Checking stable_deref_trait v1.2.0
Checking once_cell v1.19.0
Checking zeroize v1.7.0
Checking cpufeatures v0.2.12
Checking tinyvec_macros v0.1.1
Checking tinyvec v1.6.0
Checking bstr v1.9.1
Compiling crc32fast v1.4.0
Checking unicode-normalization v0.1.23
Checking block-padding v0.3.3
Checking writeable v0.5.5
Checking litemap v0.7.4
Compiling serde_derive v1.0.198
Compiling zerofrom-derive v0.1.5
Compiling yoke-derive v0.7.5
Compiling zerovec-derive v0.10.3
Checking zerofrom v0.1.5
Checking yoke v0.7.5
Compiling displaydoc v0.2.5
Compiling icu_provider_macros v1.5.0
Checking inout v0.1.3
Checking block-buffer v0.10.4
Checking zerovec v0.10.4
Compiling pkg-config v0.3.30
Checking digest v0.10.7
Checking cipher v0.4.4
Checking icu_locid_transform_data v1.5.0
Checking icu_properties_data v1.5.0
Checking tinystr v0.7.6
Checking icu_collections v1.5.0
Compiling thiserror v1.0.69
Checking icu_locid v1.5.0
Compiling thiserror-impl v1.0.69
Checking write16 v1.0.0
Checking utf16_iter v1.0.5
Checking icu_provider v1.5.0
Checking icu_normalizer_data v1.5.0
Checking utf8_iter v1.0.4
Compiling rustix v0.38.34
Checking icu_locid_transform v1.5.0
Checking sha2 v0.10.8
Checking icu_properties v1.5.1
Checking percent-encoding v2.3.1
Checking itoa v1.0.11
Checking linux-raw-sys v0.4.13
Checking hashbrown v0.14.3
Checking form_urlencoded v1.2.1
Checking universal-hash v0.5.1
Compiling vcpkg v0.2.15
Checking opaque-debug v0.3.1
Compiling amplify_syn v2.0.1
Checking icu_normalizer v1.5.0
Checking idna_adapter v1.2.0
Compiling libz-sys v1.1.16
Checking idna v1.0.3
Checking byteorder v1.5.0
Compiling data-encoding v2.5.0
Checking url v2.5.4
Compiling amplify_derive v4.0.0
Checking amplify_num v0.5.2
Checking signature v1.6.4
Checking ascii v1.1.0
Compiling data-encoding-macro-internal v0.1.12
Checking ed25519 v1.5.3
Checking tempfile v3.10.1
Compiling libgit2-sys v0.17.0+1.8.1
Checking data-encoding-macro v0.1.14
Checking aead v0.5.2
Compiling proc-macro-error-attr v1.0.4
Checking ct-codecs v1.1.1
Checking base-x v0.2.11
Checking ec25519 v0.1.0
Checking multibase v0.9.1
Checking poly1305 v0.8.0
Checking chacha20 v0.9.1
Compiling proc-macro-error v1.0.4
Checking keccak v0.1.5
Checking amplify v4.6.0
Checking sha3 v0.10.8
Checking cyphergraphy v0.3.0
Compiling git-ref-format-core v0.3.0
Checking polyval v0.6.2
Compiling sqlite3-src v0.5.1
Checking hmac v0.12.1
Checking base64ct v1.6.0
Compiling thiserror v2.0.7
Checking ppv-lite86 v0.2.17
Checking base32 v0.4.0
Checking cypheraddr v0.4.0
Checking pem-rfc7468 v0.7.0
Checking rand_chacha v0.3.1
Compiling git-ref-format-macro v0.3.0
Checking pbkdf2 v0.12.2
Checking ghash v0.5.1
Checking chacha20poly1305 v0.10.1
Checking aes v0.8.4
Checking ctr v0.9.2
Compiling thiserror-impl v2.0.7
Compiling crossbeam-utils v0.8.19
Checking aes-gcm v0.10.3
Checking git-ref-format v0.3.0
Checking noise-framework v0.4.0
Checking rand v0.8.5
Checking socks5-client v0.4.1
Checking ssh-encoding v0.2.0
Checking blowfish v0.9.1
Checking cbc v0.1.2
Checking radicle-std-ext v0.1.0
Checking ssh-cipher v0.2.0
Checking bcrypt-pbkdf v0.10.0
Checking cyphernet v0.5.2
Checking signature v2.2.0
Checking ssh-key v0.6.6
Checking crossbeam-channel v0.5.13
Checking qcheck v1.0.0
Checking radicle-ssh v0.9.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-ssh)
Compiling num-traits v0.2.18
Checking equivalent v1.0.1
Compiling serde_json v1.0.116
Checking indexmap v2.2.6
Checking ryu v1.0.17
Checking tree-sitter-language v0.1.2
Checking nonempty v0.9.0
Compiling lock_api v0.4.11
Checking radicle-dag v0.10.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-dag)
Checking lazy_static v1.5.0
Compiling anyhow v1.0.82
Compiling parking_lot_core v0.9.9
Checking anstyle-query v1.0.2
Checking iana-time-zone v0.1.60
Checking scopeguard v1.2.0
Checking gix-trace v0.1.11
Checking chrono v0.4.38
Checking colored v2.1.0
Checking localtime v1.3.1
Checking siphasher v1.0.1
Checking base64 v0.21.7
Checking utf8parse v0.2.1
Checking anstyle-parse v0.2.3
Checking parking_lot v0.12.1
Checking faster-hex v0.9.0
Checking colorchoice v1.0.0
Checking anstyle v1.0.6
Checking gix-utils v0.1.13
Checking adler2 v2.0.0
Checking anstream v0.6.13
Checking miniz_oxide v0.8.1
Checking snapbox-macros v0.3.8
Checking gix-hash v0.15.1
Checking same-file v1.0.6
Checking normalize-line-endings v0.3.0
Checking similar v2.5.0
Checking walkdir v2.5.0
Checking snapbox v0.4.17
Checking flate2 v1.0.35
Checking prodash v29.0.0
Checking radicle-signals v0.10.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-signals)
Compiling tree-sitter v0.24.4
Checking sha1_smol v1.0.0
Checking gix-features v0.39.1
Checking numtoa v0.1.0
Checking diff v0.1.13
Checking yansi v0.5.1
Checking unicode-segmentation v1.11.0
Checking pretty_assertions v1.4.0
Compiling xattr v1.3.1
Compiling filetime v0.2.23
Compiling escargot v0.5.10
Checking home v0.5.9
Checking lexopt v0.3.0
Checking gix-path v0.10.13
Compiling tar v0.4.40
Checking newline-converter v0.3.0
Checking termion v2.0.3
Checking fxhash v0.2.1
Checking regex v1.11.1
Checking dyn-clone v1.0.17
Checking streaming-iterator v0.1.9
Checking unicode-width v0.1.11
Checking inquire v0.7.5
Checking sqlite3-sys v0.15.2
Checking sqlite v0.32.0
Compiling radicle-surf v0.22.0
Checking unicode-display-width v0.3.0
Checking termion v3.0.0
Compiling tree-sitter-ruby v0.23.1
Compiling tree-sitter-json v0.24.8
Compiling tree-sitter-rust v0.23.2
Compiling tree-sitter-go v0.23.4
Compiling tree-sitter-bash v0.23.3
Compiling tree-sitter-python v0.23.4
Compiling tree-sitter-css v0.23.1
Compiling tree-sitter-toml-ng v0.6.0
Compiling tree-sitter-typescript v0.23.2
Compiling tree-sitter-html v0.23.2
Compiling tree-sitter-md v0.3.2
Compiling tree-sitter-c v0.23.2
Checking nonempty v0.5.0
Checking base64 v0.13.1
Compiling radicle-cli v0.12.1 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-cli)
Checking tree-sitter-highlight v0.24.4
Checking timeago v0.4.2
Checking jiff v0.1.15
Checking winnow v0.6.20
Checking gix-hashtable v0.6.0
Checking gix-validate v0.9.2
Checking memmap2 v0.9.4
Checking gix-chunk v0.4.10
Checking gix-commitgraph v0.25.1
Checking gix-fs v0.12.1
Checking gix-tempfile v15.0.0
Checking shell-words v1.1.0
Checking gix-command v0.4.0
Checking gix-lock v15.0.1
Checking gix-config-value v0.14.10
Checking gix-url v0.28.2
Checking gix-quote v0.4.14
Checking gix-sec v0.10.10
Checking gix-prompt v0.9.0
Checking gix-packetline v0.18.2
Checking gix-credentials v0.26.0
Checking gix-transport v0.44.0
Checking gix-shallow v0.1.0
Compiling maybe-async v0.2.10
Checking arc-swap v1.7.1
Checking popol v3.0.0
Checking either v1.11.0
Checking gix-date v0.9.3
Checking io-reactor v0.5.2
Checking gix-actor v0.33.1
Checking gix-object v0.46.1
Checking salsa20 v0.10.2
Checking socket2 v0.5.7
Compiling radicle-node v0.10.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-node)
Checking siphasher v0.3.11
Checking netservices v0.8.0
Checking bloomy v1.2.0
Checking gix-revwalk v0.17.0
Checking gix-diff v0.49.0
Checking gix-ref v0.49.1
Checking gix-traverse v0.43.1
Checking gix-revision v0.31.1
Checking gix-refspec v0.27.0
Checking gix-pack v0.56.0
Checking gix-negotiate v0.17.0
Checking scrypt v0.11.0
Checking radicle-systemd v0.9.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-systemd)
Compiling qcheck-macros v1.0.0
Checking gix-protocol v0.47.0
Compiling radicle-remote-helper v0.10.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-remote-helper)
Checking gix-odb v0.66.0
Checking git2 v0.19.0
Checking radicle-git-ext v0.8.0
Checking radicle-term v0.12.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-term)
Checking radicle-crypto v0.11.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-crypto)
Checking radicle-cob v0.13.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-cob)
Checking radicle-crdt v0.1.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-crdt)
Checking radicle v0.14.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle)
Checking radicle-cli-test v0.10.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-cli-test)
Checking radicle-fetch v0.10.0 (/44f3e838-299a-4cdf-8683-15a32897d096/w/radicle-fetch)
error: all variants have the same prefix: `File`
--> radicle-cli/src/commands/patch/review/builder.rs:140:1
|
140 | / pub enum ReviewItem {
141 | | FileAdded {
142 | | path: PathBuf,
143 | | header: FileHeader,
... |
178 | | },
179 | | }
| |_^
|
= help: remove the prefixes and use full paths to the variants instead of glob imports
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
= note: `-D clippy::enum-variant-names` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::enum_variant_names)]`
error: very complex type used. Consider factoring parts into `type` definitions
--> radicle-cli/src/commands/patch/review/builder.rs:195:24
|
195 | fn paths(&self) -> (Option<(&Path, Oid)>, Option<(&Path, Oid)>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `-D clippy::type-complexity` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::type_complexity)]`
error: could not compile `radicle-cli` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
Exit code: 101
{
"response": "finished",
"result": "failure"
}