rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwoodb73a881cdbff3355c66657e9f25e4fccafa2a548
{
"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": "8e0570288d0435eedbcf6d9e06e2916bc69e0b5e",
"author": {
"id": "did:key:z6Mko5mivMvNtheBHB67cSJeMG6BbCn7Xk6MKY9VegkAbgMH",
"alias": "Derick"
},
"title": "signals: Use `signals_receipts` crate instead",
"state": {
"status": "merged",
"conflicts": []
},
"before": "e130b4dc06ca02a035519e1ea86ffeafc788866f",
"after": "b73a881cdbff3355c66657e9f25e4fccafa2a548",
"commits": [
"b73a881cdbff3355c66657e9f25e4fccafa2a548"
],
"target": "6cfed884bf37cba1e0d8e97fa8b0e94df4a04b1f",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "8e0570288d0435eedbcf6d9e06e2916bc69e0b5e",
"author": {
"id": "did:key:z6Mko5mivMvNtheBHB67cSJeMG6BbCn7Xk6MKY9VegkAbgMH",
"alias": "Derick"
},
"description": "This fixes the following issues:\n- 111cf90 (`handler` is not async-signal-safe)\n- c8e0300 (`libc::signal` should not be used)\n- b91c6c3 (Mutex can cause signals to be missed)\n\nThe changes are all only internal to `radicle-signals`, and the API of\n`radicle-signals` is the same as before, and uses of it don't need to be\nand aren't changed.\n\nSee the commit's message that describes its changes.\nSee the comments in the new code.\nSee the below:\n\nAll those issues are fixed by a different internal approach that:\n- Uses only atomic counters and a semaphore from within the signal\n handlers, ensuring async-signal-safety portably.\n- Uses `libc::sigaction` instead. With `SA_RESTART`, which preserves\n the same behavior as the prior use of `libc::signal` on all the OSs\n that https://radicle.xyz/ provides prebuilt binaries for, and which\n now ensures consistent behavior across all further OSs.\n- Does not access the mutex from within the signal handlers, and\n separates the management of the mutex'ed global state from the\n processing of signals receipts that sends the notifications over a\n channel.\n- Has an additional internal thread that blocks on the semaphore, and,\n upon wakes, takes the counters' latest values, and, for those signals\n that have newly been delivered, sends notifications over the\n user-provided channel.\n\nAll of this approach is provided via a new external dependency, the\n`signals_receipts` crate, written by myself, that provides and manages\nit all in a very easy-to-use way. The justification for having a new\nexternal dependency is:\n\nIt was found that all the parts for this approach are better provided as\nlibraries (crates), because: that significantly shortens and simplifies\n`radicle-signals`; they are entirely reusable for other various\nprojects; their internal workings need to be encapsulated; and they're\nnot something that the Radicle team should be expected to take on the\nmaintenance of. I, as the maintainer, expect the maintenance burden to\nbe minimal and rare and my understanding to not fade too much, and I\nexpect that any team member could reasonably familiarize with it all if\nneeded, due to the medium-small size, limited, and already-complete\nnature of these crates and due to the extensive comments in them.\n\nIt was also found that no lesser approach could be truly robust and\nportable while still preserving the preexisting API and use cases of\n`radicle-signals`. The approach I settled on does achieve that and does\npreserve those.\n\nFurther information about the approach can be found in the crates'\nREADMEs and documentation:\nhttps://crates.io/crates/signals_receipts\nhttps://crates.io/crates/sem_safe\n\nTo my knowledge, the only alternative for comparable robustness and\nportability would be the `signal_hook` crate which has more use in the\nRust ecosystem. After evaluating it, I decided against it because:\n1. It can't fully uninstall the signal handlers at the OS-process level\n (it can only emulate that (without perfect fidelity, IIUC)), and not\n being able to do so would've been a more disruptive change to the\n preexisting, and perhaps future, uses of `radicle-signals` that have\n been doing, and might want to do, full uninstalling. Whereas,\n `signals_receipts` does fully uninstall.\n2. It doesn't provide the ability to send over channels. Achieving that\n would've required an additional internal thread to do such, but\n having an ad-hoc approach to managing that, *with the uninstalling\n and re-installing*, would've been error-prone. Whereas,\n `signals_receipts` does provide the ability to send over channels,\n and it automatically manages its internal thread robustly.\n3. It has other substantial features that aren't needed by\n `radicle-signals`, but those would've had to be carried in the object\n code just to use its iterator that builds on them. Whereas,\n `signals_receipts` carries only what's needed.\n4. It uses the \"self-pipe trick\" which is a hack (albeit a reliable\n one). Whereas, `signals_receipts` uses semaphores which are more\n modern and are intended for signal handling.\n\nI've confirmed this patch builds cleanly for all the currently supported\nplatforms:\n`x86_64-unknown-linux-musl`\n`aarch64-unknown-linux-musl`\n`x86_64-apple-darwin`\n`aarch64-apple-darwin`\nAs well as for:\n`x86_64-unknown-linux-gnu`\n\nI have tested this patch in these ways:\n- The dependency crates, `signals_receipts` & `sem_safe`, that provide\n the new approach, have thorough tests and have been confirmed by me to\n work correctly on numerous POSIX OSs (see their READMEs). (Their\n portability is broader than Radicle's current support, and so will\n assist in broadening its support.) I've also done thorough debugger\n stepping of their code paths.\n- I've conducted functional testing of the direct uses of\n `radicle-signals`, using the new approach of this patch, on Linux and\n macOS, x86-64.\n- I've done thorough debugger stepping of the code paths of the direct\n uses of `radicle-signals`, including of the various possibilities due\n to differences in thread-scheduling races.\n- I've spent considerable time reasoning about the dependency crates and\n the preexisting uses of `radicle-signals`.\n\nThe uses of `radicle-signals` that I tested are:\n- `radicle-node`: Simple use in `main.rs` & `runtime.rs` that only\n installs once with a bounded channel and never uninstalls.\n- `radicle-term`: Uses in `spinner.rs` & `pager.rs` that uninstall after\n installing with unbounded channels and that could be invoked multiple\n times within the same process and thus could do re-installing.\n- `rad-cli-demo`: Uses `radicle-term` spinner & pager.\n\nThe indirect uses of `radicle-signals` that I haven't tested yet are:\n- `radicle-cli`: Uses `radicle-term` spinner & pager in numerous places\n that seemed equivalent enough to what I have tested.\n\nThe uses should be tested on AArch64 for at least the OSs that Radicle\nsupports (Linux & macOS), which I haven't done yet. There's no reason\nto expect any issues with that, since OSs provide the same APIs and\nsemantics for the relevant aspects of signal handling regardless of CPU\narchitecture. I'd need to find access to such machines.\n\nI can test the remaining uses, if there's interest in accepting this\ncontribution. Or, it might be good for someone from the team to test\nthose as part of reviewing this.\n\nIf you have any questions, I'm happy to respond to them.",
"base": "e130b4dc06ca02a035519e1ea86ffeafc788866f",
"oid": "08844cf18464bb36690472da7c4d56563d164aa0",
"timestamp": 1726354530
},
{
"id": "53c799a7721bbcc706a742f3c16776ad40a40f2c",
"author": {
"id": "did:key:z6Mko5mivMvNtheBHB67cSJeMG6BbCn7Xk6MKY9VegkAbgMH",
"alias": "Derick"
},
"description": "",
"base": "e130b4dc06ca02a035519e1ea86ffeafc788866f",
"oid": "b73a881cdbff3355c66657e9f25e4fccafa2a548",
"timestamp": 1726354858
},
{
"id": "0c5e9f122da3a08688d6ff999b0e9959dd8a5c86",
"author": {
"id": "did:key:z6Mko5mivMvNtheBHB67cSJeMG6BbCn7Xk6MKY9VegkAbgMH",
"alias": "Derick"
},
"description": "Rebase.",
"base": "c05434ebd5a2335f432db9ac1820f3e4ba181e68",
"oid": "9bfef8f6ff22cb41343042778de2494e2d4a672c",
"timestamp": 1744826854
},
{
"id": "5d469e83186a6cc296d4d96af44c76074e10950c",
"author": {
"id": "did:key:z6Mko5mivMvNtheBHB67cSJeMG6BbCn7Xk6MKY9VegkAbgMH",
"alias": "Derick"
},
"description": "Rebase and sign.",
"base": "c05434ebd5a2335f432db9ac1820f3e4ba181e68",
"oid": "47c785b9160c31ab360e15c7b2f849e5225ecc66",
"timestamp": 1744827129
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "1751cb06-88fd-4687-9ae4-bfcf151ca3b0"
},
"info_url": "https://cci.rad.levitte.org//1751cb06-88fd-4687-9ae4-bfcf151ca3b0.html"
}
Started at: 2025-10-21 19:32:26.411326+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/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 125 issues · 15 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout 8e0570288d0435eedbcf6d9e06e2916bc69e0b5e
✓ Switched to branch patch/8e05702 at revision 53c799a
✓ Branch patch/8e05702 setup to track rad/patches/8e0570288d0435eedbcf6d9e06e2916bc69e0b5e
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout b73a881cdbff3355c66657e9f25e4fccafa2a548
HEAD is now at b73a881c signals: Use `signals_receipts` crate instead
Exit code: 0
$ git show b73a881cdbff3355c66657e9f25e4fccafa2a548
commit b73a881cdbff3355c66657e9f25e4fccafa2a548
Author: Derick Eddington <kcired@pm.me>
Date: Sat Sep 14 14:30:43 2024 -0700
signals: Use `signals_receipts` crate instead
This resolves issues:
- 111cf90 (`handler` is not async-signal-safe)
- c8e0300 (`libc::signal` should not be used)
- b91c6c3 (Mutex can cause signals to be missed)
See also: patch 8e05702.
The API of `radicle-signals` is the same as before, and so uses of it
don't need to be and aren't changed. The behavior is slightly different
in that:
- If the channel is full then signals will not be lost, which is an
improvement. This is achieved without blocking in the signal handler.
This is possible because of the counters approach along with the
internal receipts-processing thread of the `signals_receipts` crate.
- `install()` and `uninstall()` might block very briefly if necessary to
acquire the mutex, which is now internal to and managed by the
`signals_receipts` crate, only if there are concurrent calls to them
(which is unlikely), but such blocking is guaranteed to be bounded to
be very brief. This is done so they no longer can fail to do their
purpose, which is an improvement. They still return errors if the
handling is already installed or uninstalled, respectively, which
preserves the previous use cases.
- The new `finish()` function is introduced. This is provided in case
it's ever needed to completely clean-up the facility, by terminating
the internal receipts-processing thread, to be like it hadn't been
installed before.
- The user must ensure that the notifications channel is disconnected,
by dropping the receiver(s), when doing `uninstall()` or `finish()`.
Such dropping usually occurs naturally, and already occurs for all the
preexisting uses of `radicle_signals`. (The `signals_receipts` crate
is capable of a more robust approach, but this commit doesn't use
that, to avoid changing the preexisting uses of `radicle_signals`.)
- The `TryFrom` impl for `Signal` is of `SignalNumber` which is `c_int`,
instead of `i32`, because `c_int` (the type of signal numbers) might
not be `i32` on all platforms (POSIX only requires `c_int` to be at
least 32-bit).
The version of `radicle_signals` is incremented, to reflect those
changes and the substantially different internal implementation.
The new dependency on the `base64` crate is needed by the
`signals_receipts` crate for it to work on macOS, because its dependency
on the `sem_safe` crate uses `base64` as part of creating anonymous
semaphores on macOS (which lacks support for unnamed semaphores (in
violation of POSIX)).
Signed-off-by: Derick Eddington <kcired@pm.me>
diff --git a/Cargo.lock b/Cargo.lock
index 9feb012a..4c44e481 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -213,6 +213,12 @@ version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
[[package]]
name = "base64ct"
version = "1.6.0"
@@ -646,9 +652,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "errno"
-version = "0.3.8"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
+checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
dependencies = [
"libc",
"windows-sys 0.52.0",
@@ -741,9 +747,9 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.14"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c"
+checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"libc",
@@ -2106,10 +2112,11 @@ dependencies = [
[[package]]
name = "radicle-signals"
-version = "0.10.0"
+version = "0.11.0"
dependencies = [
"crossbeam-channel",
"libc",
+ "signals_receipts",
]
[[package]]
@@ -2357,6 +2364,18 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "sem_safe"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9110d660d39b5f65f10a978ce0dd5e0a08c50e1d5589cadfad9b9a5f221fdb14"
+dependencies = [
+ "base64 0.22.1",
+ "errno",
+ "getrandom",
+ "libc",
+]
+
[[package]]
name = "serde"
version = "1.0.198"
@@ -2428,6 +2447,18 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+[[package]]
+name = "signals_receipts"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74fa07c27e948f68f2f72241a189850526fbd3b428eee702884ba1883a39610e"
+dependencies = [
+ "cfg-if",
+ "errno",
+ "libc",
+ "sem_safe",
+]
+
[[package]]
name = "signature"
version = "1.6.4"
diff --git a/radicle-signals/Cargo.toml b/radicle-signals/Cargo.toml
index fbe61e04..968ac0e3 100644
--- a/radicle-signals/Cargo.toml
+++ b/radicle-signals/Cargo.toml
@@ -5,8 +5,9 @@ homepage = "https://radicle.xyz"
repository = "https://app.radicle.xyz/seeds/seed.radicle.xyz/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5"
license = "MIT OR Apache-2.0"
edition = "2021"
-version = "0.10.0"
+version = "0.11.0"
[dependencies]
crossbeam-channel = { version = "0.5.6" }
libc = { version = "0.2" }
+signals_receipts = { version = "0.2.0", features = ["channel_notify_facility"] }
diff --git a/radicle-signals/src/lib.rs b/radicle-signals/src/lib.rs
index 5cabe19f..f0e474c0 100644
--- a/radicle-signals/src/lib.rs
+++ b/radicle-signals/src/lib.rs
@@ -1,7 +1,12 @@
use std::io;
-use std::sync::Mutex;
use crossbeam_channel as chan;
+use signals_receipts::channel_notify_facility::{
+ self, FinishError, InstallError, SendError, SignalsChannel as _, UninstallError,
+};
+use signals_receipts::SignalNumber;
+
+use crate::channel_notify_facility_premade::SignalsChannel;
/// Operating system signal.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
@@ -16,10 +21,10 @@ pub enum Signal {
WindowChanged,
}
-impl TryFrom<i32> for Signal {
- type Error = i32;
+impl TryFrom<SignalNumber> for Signal {
+ type Error = SignalNumber;
- fn try_from(value: i32) -> Result<Self, Self::Error> {
+ fn try_from(value: SignalNumber) -> Result<Self, Self::Error> {
match value {
libc::SIGTERM => Ok(Self::Terminate),
libc::SIGINT => Ok(Self::Interrupt),
@@ -30,90 +35,97 @@ impl TryFrom<i32> for Signal {
}
}
-/// Signal notifications are sent via this channel.
-static NOTIFY: Mutex<Option<chan::Sender<Signal>>> = Mutex::new(None);
-
-/// A slice of signals to handle.
-const SIGNALS: &[i32] = &[libc::SIGINT, libc::SIGTERM, libc::SIGHUP, libc::SIGWINCH];
+// The signals of interest to handle.
+signals_receipts::channel_notify_facility! {
+ SIGINT
+ SIGTERM
+ SIGHUP
+ SIGWINCH
+}
-/// Install global signal handlers.
+/// Install global signal handlers, with notifications sent to the given
+/// `notify` channel.
pub fn install(notify: chan::Sender<Signal>) -> io::Result<()> {
- if let Ok(mut channel) = NOTIFY.try_lock() {
- if channel.is_some() {
- return Err(io::Error::new(
- io::ErrorKind::AlreadyExists,
- "signal handler is already installed",
- ));
- }
- *channel = Some(notify);
+ /// The sender type must implement the facility's trait.
+ #[derive(Debug)]
+ struct ChanSender(chan::Sender<Signal>);
- unsafe { _install() }?;
- } else {
- return Err(io::Error::new(
- io::ErrorKind::WouldBlock,
- "unable to install signal handler",
- ));
- }
- Ok(())
-}
-
-/// Uninstall global signal handlers.
-pub fn uninstall() -> io::Result<()> {
- if let Ok(mut channel) = NOTIFY.try_lock() {
- if channel.is_none() {
- return Err(io::Error::new(
- io::ErrorKind::NotFound,
- "signal handler is already uninstalled",
- ));
+ /// This also does our desired conversion from signal numbers to our
+ /// `Signal` representation.
+ impl channel_notify_facility::Sender for ChanSender {
+ fn send(&self, sig_num: SignalNumber) -> Result<(), SendError> {
+ if let Ok(sig) = sig_num.try_into() {
+ self.0.send(sig).or(Err(SendError::Disconnected))
+ } else {
+ debug_assert!(false, "only called for recognized signal numbers");
+ // Unrecognized signal numbers would be ignored, but
+ // this never occurs.
+ Err(SendError::Ignored)
+ }
}
- *channel = None;
-
- unsafe { _uninstall() }?;
- } else {
- return Err(io::Error::new(
- io::ErrorKind::WouldBlock,
- "unable to uninstall signal handler",
- ));
}
- Ok(())
-}
-/// Install global signal handlers.
-///
-/// # Safety
-///
-/// Calls `libc` functions safely.
-unsafe fn _install() -> io::Result<()> {
- for signal in SIGNALS {
- if libc::signal(*signal, handler as libc::sighandler_t) == libc::SIG_ERR {
- return Err(io::Error::last_os_error());
- }
- }
- Ok(())
+ SignalsChannel::install_with_outside_channel(ChanSender(notify)).map_err(|e| match e {
+ InstallError::AlreadyInstalled { unused_notify: _ } => io::Error::new(
+ io::ErrorKind::AlreadyExists,
+ "signal handling is already installed",
+ ),
+ _ => io::Error::other(e), // The error type is non-exhaustive.
+ })
}
/// Uninstall global signal handlers.
///
-/// # Safety
-///
-/// Calls `libc` functions safely.
-unsafe fn _uninstall() -> io::Result<()> {
- for signal in SIGNALS {
- if libc::signal(*signal, libc::SIG_DFL) == libc::SIG_ERR {
- return Err(io::Error::last_os_error());
+/// The caller must ensure that all `Receiver`s for the other end of the
+/// channel are dropped to disconnect the channel, to ensure that the
+/// internal "signals-receipt" thread wakes to clean-up (in case it's
+/// blocked on sending on the channel). Such dropping usually occurs
+/// naturally when uninstalling, since the other end is no longer needed
+/// then, and may be done after calling this. Not doing so might
+/// deadlock the "signals-receipt" thread.
+pub fn uninstall() -> io::Result<()> {
+ SignalsChannel::uninstall_with_outside_channel().map_err(|e| match e {
+ UninstallError::AlreadyUninstalled => io::Error::new(
+ io::ErrorKind::NotFound,
+ "signal handling is already uninstalled",
+ ),
+ #[allow(clippy::unreachable)]
+ UninstallError::WrongMethod => {
+ // SAFETY: Impossible, because `SignalsChannel` is private
+ // and so `SignalsChannel::install()` is never done.
+ unreachable!()
}
- }
- Ok(())
+ _ => io::Error::other(e), // The error type is non-exhaustive.
+ })
}
-/// Called by `libc` when a signal is received.
-extern "C" fn handler(sig: libc::c_int, _info: *mut libc::siginfo_t, _data: *mut libc::c_void) {
- let Ok(sig) = sig.try_into() else {
- return;
- };
- if let Ok(guard) = NOTIFY.try_lock() {
- if let Some(c) = &*guard {
- c.try_send(sig).ok();
+/// Do [`uninstall()`], terminate the internal "signals-receipt"
+/// thread, and wait for that thread to finish.
+///
+/// This is provided in case it's ever needed to completely clean-up the
+/// facility to be like it hadn't been installed before. It's
+/// unnecessary to use this, just to uninstall the handling. Usually,
+/// only using `uninstall` is desirable so that the "signals-receipt"
+/// thread is kept alive for faster reuse when re-installing the
+/// handling.
+///
+/// The caller must ensure that all `Receiver`s for the other end of the
+/// channel have **already** been dropped to disconnect the channel,
+/// before calling this, to ensure that the "signals-receipt" thread
+/// wakes (in case it's blocked on sending on the channel) to see that
+/// it must finish. If this is not done, this might deadlock.
+pub fn finish() -> io::Result<()> {
+ SignalsChannel::finish_with_outside_channel().map_err(|e| match e {
+ FinishError::AlreadyFinished => io::Error::new(
+ io::ErrorKind::NotFound,
+ "signal-handling facility is already finished",
+ ),
+ #[allow(clippy::unreachable)]
+ FinishError::WrongMethod => {
+ // SAFETY: Impossible, because `SignalsChannel` is private
+ // and so `SignalsChannel::install()` is never done.
+ unreachable!()
}
- }
+ _ => io::Error::other(e), // The error type is non-exhaustive.
+ })
}
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 1751cb06-88fd-4687-9ae4-bfcf151ca3b0 -v /opt/radcis/ci.rad.levitte.org/cci/state/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/s:/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w:/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w -w /1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:bookworm bash /1751cb06-88fd-4687-9ae4-bfcf151ca3b0/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 adler v1.0.2
Downloaded amplify v4.6.0
Downloaded aead v0.5.2
Downloaded aes v0.8.4
Downloaded amplify_num v0.5.2
Downloaded amplify_derive v4.0.0
Downloaded aes-gcm v0.10.3
Downloaded aho-corasick v1.1.3
Downloaded block-buffer v0.10.4
Downloaded blowfish v0.9.1
Downloaded bitflags v2.5.0
Downloaded gix-chunk v0.4.8
Downloaded num-conv v0.1.0
Downloaded noise-framework v0.4.0
Downloaded gix-packetline v0.17.5
Downloaded gix-pack v0.51.1
Downloaded sha3 v0.10.8
Downloaded poly1305 v0.8.0
Downloaded once_cell v1.19.0
Downloaded spki v0.7.3
Downloaded spin v0.5.2
Downloaded gix-actor v0.31.5
Downloaded signature v2.2.0
Downloaded gix-odb v0.61.1
Downloaded socks5-client v0.4.1
Downloaded socket2 v0.5.7
Downloaded gix-object v0.42.3
Downloaded gix-hashtable v0.5.2
Downloaded snapbox-macros v0.3.8
Downloaded snapbox v0.4.17
Downloaded gix-hash v0.14.2
Downloaded gix-features v0.38.2
Downloaded smallvec v1.13.2
Downloaded sqlite v0.32.0
Downloaded gix-date v0.8.7
Downloaded percent-encoding v2.3.1
Downloaded gix-diff v0.44.1
Downloaded pretty_assertions v1.4.0
Downloaded prodash v28.0.0
Downloaded radicle-std-ext v0.1.0
Downloaded same-file v1.0.6
Downloaded salsa20 v0.10.2
Downloaded sem_safe v0.2.0
Downloaded signature v1.6.4
Downloaded siphasher v0.3.11
Downloaded nonempty v0.5.0
Downloaded normalize-line-endings v0.3.0
Downloaded nonempty v0.9.0
Downloaded p384 v0.13.0
Downloaded radicle-surf v0.22.0
Downloaded polyval v0.6.2
Downloaded pkg-config v0.3.30
Downloaded parking_lot_core v0.9.9
Downloaded parking_lot v0.12.1
Downloaded regex-syntax v0.8.3
Downloaded regex-automata v0.4.6
Downloaded rand_core v0.6.4
Downloaded rustix v0.38.34
Downloaded netservices v0.8.0
Downloaded miniz_oxide v0.7.2
Downloaded memmap2 v0.9.4
Downloaded libc v0.2.155
Downloaded memchr v2.7.2
Downloaded maybe-async v0.2.10
Downloaded linux-raw-sys v0.4.13
Downloaded log v0.4.21
Downloaded localtime v1.3.1
Downloaded libgit2-sys v0.17.0+1.8.1
Downloaded idna v0.5.0
Downloaded gix-validate v0.8.5
Downloaded gix-url v0.27.3
Downloaded gix-traverse v0.39.2
Downloaded gix-trace v0.1.9
Downloaded gix-tempfile v14.0.1
Downloaded gix-sec v0.10.6
Downloaded gix-revwalk v0.13.2
Downloaded sqlite3-src v0.5.1
Downloaded universal-hash v0.5.1
Downloaded tree-sitter-md v0.1.7
Downloaded tree-sitter-c v0.20.8
Downloaded multibase v0.9.1
Downloaded lock_api v0.4.11
Downloaded libm v0.2.8
Downloaded libz-sys v1.1.16
Downloaded lexopt v0.3.0
Downloaded lazy_static v1.4.0
Downloaded keccak v0.1.5
Downloaded jobserver v0.1.31
Downloaded itoa v1.0.11
Downloaded io-reactor v0.5.2
Downloaded inquire v0.7.5
Downloaded inout v0.1.3
Downloaded indexmap v2.2.6
Downloaded iana-time-zone v0.1.60
Downloaded home v0.5.9
Downloaded hmac v0.12.1
Downloaded hashbrown v0.14.3
Downloaded group v0.13.0
Downloaded gix-utils v0.1.12
Downloaded gix-quote v0.4.12
Downloaded zeroize v1.7.0
Downloaded yansi v0.5.1
Downloaded xattr v1.3.1
Downloaded winnow v0.6.8
Downloaded walkdir v2.5.0
Downloaded version_check v0.9.4
Downloaded vcpkg v0.2.15
Downloaded utf8parse v0.2.1
Downloaded numtoa v0.1.0
Downloaded tree-sitter-json v0.20.2
Downloaded tree-sitter-highlight v0.20.1
Downloaded thiserror-impl v1.0.59
Downloaded thiserror v1.0.59
Downloaded gix-prompt v0.8.4
Downloaded gix-path v0.10.9
Downloaded gix-fs v0.11.2
Downloaded gix-command v0.3.6
Downloaded url v2.5.0
Downloaded unicode-width v0.1.11
Downloaded unicode-segmentation v1.11.0
Downloaded unicode-normalization v0.1.23
Downloaded unicode-ident v1.0.12
Downloaded unicode-display-width v0.3.0
Downloaded unicode-bidi v0.3.15
Downloaded typenum v1.17.0
Downloaded tree-sitter-html v0.20.0
Downloaded tree-sitter v0.20.10
Downloaded tree-sitter-toml v0.20.0
Downloaded tinyvec_macros v0.1.1
Downloaded tinyvec v1.6.0
Downloaded timeago v0.4.2
Downloaded termion v3.0.0
Downloaded syn v2.0.60
Downloaded bstr v1.9.1
Downloaded bloomy v1.2.0
Downloaded rand_chacha v0.3.1
Downloaded rand v0.8.5
Downloaded powerfmt v0.2.0
Downloaded popol v3.0.0
Downloaded pkcs8 v0.10.2
Downloaded pkcs1 v0.7.5
Downloaded num-bigint-dig v0.8.4
Downloaded shlex v1.3.0
Downloaded sha2 v0.10.8
Downloaded serde_derive v1.0.198
Downloaded serde v1.0.198
Downloaded sec1 v0.7.3
Downloaded scopeguard v1.2.0
Downloaded rfc6979 v0.4.0
Downloaded p256 v0.13.2
Downloaded regex v1.10.4
Downloaded opaque-debug v0.3.1
Downloaded tree-sitter-css v0.20.0
Downloaded num_threads v0.1.7
Downloaded num-integer v0.1.46
Downloaded primeorder v0.13.6
Downloaded p521 v0.13.3
Downloaded num-iter v0.1.44
Downloaded gix-transport v0.42.0
Downloaded ppv-lite86 v0.2.17
Downloaded pem-rfc7468 v0.7.0
Downloaded pbkdf2 v0.12.2
Downloaded num-traits v0.2.18
Downloaded newline-converter v0.3.0
Downloaded siphasher v1.0.1
Downloaded radicle-git-ext v0.8.0
Downloaded proc-macro2 v1.0.81
Downloaded similar v2.5.0
Downloaded signals_receipts v0.2.0
Downloaded shell-words v1.1.0
Downloaded scrypt v0.11.0
Downloaded time-macros v0.2.18
Downloaded time-core v0.1.2
Downloaded time v0.3.36
Downloaded termion v2.0.3
Downloaded ssh-key v0.6.6
Downloaded sha1_smol v1.0.0
Downloaded serde_json v1.0.116
Downloaded tempfile v3.10.1
Downloaded tar v0.4.40
Downloaded ryu v1.0.17
Downloaded rsa v0.9.6
Downloaded syn v1.0.109
Downloaded flate2 v1.0.28
Downloaded gix-protocol v0.45.0
Downloaded quote v1.0.36
Downloaded qcheck-macros v1.0.0
Downloaded qcheck v1.0.0
Downloaded proc-macro-error-attr v1.0.4
Downloaded subtle v2.5.0
Downloaded proc-macro-error v1.0.4
Downloaded ssh-encoding v0.2.0
Downloaded ssh-cipher v0.2.0
Downloaded sqlite3-sys v0.15.2
Downloaded gix-credentials v0.24.2
Downloaded gix-config-value v0.14.6
Downloaded gix-commitgraph v0.24.3
Downloaded git2 v0.19.0
Downloaded ghash v0.5.1
Downloaded fxhash v0.2.1
Downloaded form_urlencoded v1.2.1
Downloaded equivalent v1.0.1
Downloaded ecdsa v0.16.9
Downloaded ec25519 v0.1.0
Downloaded digest v0.10.7
Downloaded const-oid v0.9.6
Downloaded colorchoice v1.0.0
Downloaded cipher v0.4.4
Downloaded cbc v0.1.2
Downloaded byteorder v1.5.0
Downloaded base16ct v0.2.0
Downloaded git-ref-format-macro v0.3.0
Downloaded git-ref-format-core v0.3.0
Downloaded git-ref-format v0.3.0
Downloaded getrandom v0.2.15
Downloaded generic-array v0.14.7
Downloaded filetime v0.2.23
Downloaded ff v0.13.0
Downloaded fastrand v2.1.0
Downloaded faster-hex v0.9.0
Downloaded escargot v0.5.10
Downloaded errno v0.3.9
Downloaded elliptic-curve v0.13.8
Downloaded either v1.11.0
Downloaded ed25519 v1.5.3
Downloaded dyn-clone v1.0.17
Downloaded diff v0.1.13
Downloaded deranged v0.3.11
Downloaded der v0.7.9
Downloaded data-encoding-macro-internal v0.1.12
Downloaded tree-sitter-go v0.20.0
Downloaded data-encoding-macro v0.1.14
Downloaded data-encoding v2.5.0
Downloaded cyphernet v0.5.2
Downloaded cyphergraphy v0.3.0
Downloaded cypheraddr v0.4.0
Downloaded ctr v0.9.2
Downloaded ct-codecs v1.1.1
Downloaded crypto-common v0.1.6
Downloaded crypto-bigint v0.5.5
Downloaded crossbeam-utils v0.8.19
Downloaded crossbeam-channel v0.5.13
Downloaded crc32fast v1.4.0
Downloaded cpufeatures v0.2.12
Downloaded colored v2.1.0
Downloaded chrono v0.4.38
Downloaded chacha20poly1305 v0.10.1
Downloaded chacha20 v0.9.1
Downloaded cfg-if v1.0.0
Downloaded cc v1.0.95
Downloaded block-padding v0.3.3
Downloaded base64ct v1.6.0
Downloaded base64 v0.22.1
Downloaded bcrypt-pbkdf v0.10.0
Downloaded base64 v0.13.1
Downloaded base32 v0.4.0
Downloaded anstyle-query v1.0.2
Downloaded base64 v0.21.7
Downloaded base-x v0.2.11
Downloaded autocfg v1.2.0
Downloaded ascii v1.1.0
Downloaded arc-swap v1.7.1
Downloaded anyhow v1.0.82
Downloaded anstyle-parse v0.2.3
Downloaded anstyle v1.0.6
Downloaded anstream v0.6.13
Downloaded amplify_syn v2.0.1
Downloaded tree-sitter-python v0.20.4
Downloaded tree-sitter-rust v0.20.4
Downloaded tree-sitter-ruby v0.20.1
Downloaded tree-sitter-bash v0.20.5
Downloaded tree-sitter-typescript v0.20.5
Compiling libc v0.2.155
Compiling proc-macro2 v1.0.81
Compiling unicode-ident v1.0.12
Checking cfg-if v1.0.0
Compiling once_cell v1.19.0
Compiling version_check v0.9.4
Checking memchr v2.7.2
Compiling quote v1.0.36
Checking aho-corasick v1.1.3
Compiling jobserver v0.1.31
Compiling syn v2.0.60
Checking regex-syntax v0.8.3
Compiling cc v1.0.95
Compiling thiserror v1.0.59
Compiling typenum v1.17.0
Checking regex-automata v0.4.6
Checking getrandom v0.2.15
Compiling generic-array v0.14.7
Checking rand_core v0.6.4
Checking tinyvec_macros v0.1.1
Checking tinyvec v1.6.0
Checking crypto-common v0.1.6
Checking fastrand v2.1.0
Checking unicode-normalization v0.1.23
Checking subtle v2.5.0
Compiling syn v1.0.109
Checking bstr v1.9.1
Checking zeroize v1.7.0
Checking cpufeatures v0.2.12
Checking bitflags v2.5.0
Checking block-padding v0.3.3
Checking block-buffer v0.10.4
Checking inout v0.1.3
Compiling pkg-config v0.3.30
Checking digest v0.10.7
Checking cipher v0.4.4
Compiling thiserror-impl v1.0.59
Compiling autocfg v1.2.0
Compiling crc32fast v1.4.0
Checking sha2 v0.10.8
Checking unicode-bidi v0.3.15
Checking percent-encoding v2.3.1
Checking form_urlencoded v1.2.1
Checking idna v0.5.0
Checking universal-hash v0.5.1
Compiling vcpkg v0.2.15
Compiling serde v1.0.198
Checking opaque-debug v0.3.1
Checking url v2.5.0
Compiling amplify_syn v2.0.1
Compiling serde_derive v1.0.198
Compiling libz-sys v1.1.16
Compiling data-encoding v2.5.0
Checking byteorder v1.5.0
Compiling rustix v0.38.34
Compiling amplify_derive v4.0.0
Compiling data-encoding-macro-internal v0.1.12
Checking log v0.4.21
Checking linux-raw-sys v0.4.13
Checking signature v1.6.4
Checking amplify_num v0.5.2
Checking ascii v1.1.0
Checking itoa v1.0.11
Checking data-encoding-macro v0.1.14
Checking ed25519 v1.5.3
Checking amplify v4.6.0
Compiling libgit2-sys v0.17.0+1.8.1
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 cyphergraphy v0.3.0
Checking keccak v0.1.5
Checking sha3 v0.10.8
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
Checking ppv-lite86 v0.2.17
Checking hashbrown v0.14.3
Checking base32 v0.4.0
Checking rand_chacha v0.3.1
Checking cypheraddr v0.4.0
Checking pem-rfc7468 v0.7.0
Checking pbkdf2 v0.12.2
Compiling git-ref-format-macro v0.3.0
Checking ghash v0.5.1
Checking chacha20poly1305 v0.10.1
Checking tempfile v3.10.1
Checking aes v0.8.4
Checking ctr v0.9.2
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 socks5-client v0.4.1
Checking ssh-encoding v0.2.0
Checking rand v0.8.5
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 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle-ssh)
Compiling num-traits v0.2.18
Compiling tree-sitter v0.20.10
Compiling serde_json v1.0.116
Checking equivalent v1.0.1
Checking indexmap v2.2.6
Checking regex v1.10.4
Checking ryu v1.0.17
Checking nonempty v0.9.0
Checking radicle-dag v0.9.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle-dag)
Compiling anyhow v1.0.82
Checking anstyle-query v1.0.2
Checking lazy_static v1.4.0
Checking iana-time-zone v0.1.60
Checking chrono v0.4.38
Checking colored v2.1.0
Checking localtime v1.3.1
Checking utf8parse v0.2.1
Checking base64 v0.21.7
Checking siphasher v1.0.1
Checking anstyle-parse v0.2.3
Checking sem_safe v0.2.0
Checking errno v0.3.9
Checking anstyle v1.0.6
Checking colorchoice v1.0.0
Checking anstream v0.6.13
Checking signals_receipts v0.2.0
Checking snapbox-macros v0.3.8
Checking normalize-line-endings v0.3.0
Checking similar v2.5.0
Checking snapbox v0.4.17
Checking radicle-signals v0.11.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle-signals)
Checking gix-trace v0.1.9
Checking diff v0.1.13
Compiling adler v1.0.2
Checking numtoa v0.1.0
Checking unicode-segmentation v1.11.0
Checking yansi v0.5.1
Checking pretty_assertions v1.4.0
Compiling miniz_oxide v0.7.2
Compiling xattr v1.3.1
Compiling filetime v0.2.23
Checking shlex v1.3.0
Compiling escargot v0.5.10
Checking lexopt v0.3.0
Compiling flate2 v1.0.28
Compiling tar v0.4.40
Checking newline-converter v0.3.0
Checking termion v2.0.3
Checking fxhash v0.2.1
Checking unicode-width v0.1.11
Checking dyn-clone v1.0.17
Checking faster-hex v0.9.0
Checking inquire v0.7.5
Compiling radicle-surf v0.22.0
Checking unicode-display-width v0.3.0
Checking termion v3.0.0
Checking gix-utils v0.1.12
Compiling tree-sitter-rust v0.20.4
Compiling tree-sitter-json v0.20.2
Compiling tree-sitter-ruby v0.20.1
Compiling tree-sitter-html v0.20.0
Compiling tree-sitter-bash v0.20.5
Compiling tree-sitter-md v0.1.7
Compiling tree-sitter-go v0.20.0
Compiling tree-sitter-css v0.20.0
Compiling tree-sitter-c v0.20.8
Compiling tree-sitter-typescript v0.20.5
Compiling tree-sitter-python v0.20.4
Compiling tree-sitter-toml v0.20.0
Checking sqlite3-sys v0.15.2
Checking sqlite v0.32.0
Checking gix-hash v0.14.2
Checking same-file v1.0.6
Compiling radicle-cli v0.11.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle-cli)
Checking nonempty v0.5.0
Checking base64 v0.13.1
Checking walkdir v2.5.0
Checking tree-sitter-highlight v0.20.1
Checking prodash v28.0.0
Checking sha1_smol v1.0.0
Checking timeago v0.4.2
Checking smallvec v1.13.2
Compiling lock_api v0.4.11
Compiling parking_lot_core v0.9.9
Checking gix-features v0.38.2
Compiling time-core v0.1.2
Checking scopeguard v1.2.0
Checking powerfmt v0.2.0
Compiling num-conv v0.1.0
Compiling time-macros v0.2.18
Checking deranged v0.3.11
Checking home v0.5.9
Checking num_threads v0.1.7
Checking gix-path v0.10.9
Checking parking_lot v0.12.1
Checking winnow v0.6.8
Checking gix-validate v0.8.5
Checking gix-chunk v0.4.8
Checking memmap2 v0.9.4
Checking shell-words v1.1.0
Checking gix-command v0.3.6
Checking time v0.3.36
Checking gix-commitgraph v0.24.3
Checking gix-hashtable v0.5.2
Checking gix-config-value v0.14.6
Checking gix-url v0.27.3
Checking gix-fs v0.11.2
Checking gix-quote v0.4.12
Checking gix-sec v0.10.6
Checking gix-tempfile v14.0.1
Checking gix-prompt v0.8.4
Checking gix-packetline v0.17.5
Checking gix-credentials v0.24.2
Checking gix-date v0.8.7
Compiling maybe-async v0.2.10
Checking gix-transport v0.42.0
Checking gix-actor v0.31.5
Checking gix-object v0.42.3
Checking arc-swap v1.7.1
Checking popol v3.0.0
Checking either v1.11.0
Checking io-reactor v0.5.2
Checking salsa20 v0.10.2
Checking gix-protocol v0.45.0
Checking socket2 v0.5.7
Checking gix-revwalk v0.13.2
Checking gix-traverse v0.39.2
Checking gix-diff v0.44.1
Compiling radicle-node v0.10.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle-node)
Checking siphasher v0.3.11
Checking gix-pack v0.51.1
Checking netservices v0.8.0
Checking bloomy v1.2.0
Checking scrypt v0.11.0
Checking radicle-systemd v0.9.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle-systemd)
Compiling qcheck-macros v1.0.0
Compiling radicle-remote-helper v0.10.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle-remote-helper)
Checking gix-odb v0.61.1
Checking git2 v0.19.0
Checking radicle-git-ext v0.8.0
Checking radicle-term v0.11.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle-term)
Checking radicle-crypto v0.11.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle-crypto)
Checking radicle-cob v0.12.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle-cob)
Checking radicle-crdt v0.1.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle-crdt)
Checking radicle v0.13.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle)
Checking radicle-cli-test v0.10.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/w/radicle-cli-test)
Checking radicle-fetch v0.10.0 (/1751cb06-88fd-4687-9ae4-bfcf151ca3b0/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"
}