rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood5516153b2af0fa94599127925a630991fdbf2f48
{
"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:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Created",
"patch": {
"id": "52f287f50c5d62c815bf3878b398b708f60c9b46",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"title": "radicle: introduce identity document version",
"state": {
"status": "merged",
"conflicts": []
},
"before": "0c9a7419dcfd265b6c1efe85c915d126feaef649",
"after": "5516153b2af0fa94599127925a630991fdbf2f48",
"commits": [
"5516153b2af0fa94599127925a630991fdbf2f48"
],
"target": "3fc92f83fe089263c470b328414d923227cf0e4a",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "52f287f50c5d62c815bf3878b398b708f60c9b46",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"description": "This change introduces versioning to the identity document format.\n\nThe `Version` type is introduced to captured this. Importantly, it is\nvery restricted in its construction and API. Since we primarily only\ncare about serializing and deserializing documents, the `Version` is\nconstructed via `Deserialize`. The only other ways to get a `Version`\nis to use the `IDENTITY_VERSION` constant or by using\n`Version::default`.\n\nThe `Deserialize` implementation ensures that the version is within\nthe accepted bounds, i.e. that it is not 0 and that it is not a\nversion that may not have been released yet \u2013 the user may be running\na previous client.\nIf it does encounter a future version, it will provide a helpful error\nmessage to check version compatabilities, and possibly upgrade their\nbinaries.\n\nNote that changing the `Doc` means that the hashes for tests\nchange. This requires updating a few of the library tests and many of\nthe CLI tests.\nOne important note is the introduction of the `advance_timestamp` helper\nin `cob::identity::test`, which allows us to manipulate the timestamp\nso that we keep a stable order for the `timeline` tests and get the\ncorrect series of events.",
"base": "97965d41ea66c01e7023ae38d1bb4e133f312c25",
"oid": "ab6951ab02977e8bdb35d1e7e270145757a610e2",
"timestamp": 1729090509
},
{
"id": "a3267808497ba397a67db77610a6e5f38853209c",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"description": "Changes:\n- Rebased on f6b2c5110741b776655eca8228ec66de40b7243d\n- Added docs to `Version`\n- Moved `radicle_cob::git::STABLE_TIME` to this patch",
"base": "7ff426a2d477b3545ad19b29394ce43bb23cf356",
"oid": "664a69e64a7d306eb21e83400bfb8374158b7051",
"timestamp": 1729678885
},
{
"id": "3510a9570b2dab377e573283a7b82328e15a4760",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"description": "Changes:\n- Use function for setting default value of document version\n- Update docs for with_timestamp",
"base": "0c9a7419dcfd265b6c1efe85c915d126feaef649",
"oid": "d780f13f0616cfeb3ae6250dda28904315beff12",
"timestamp": 1729872706
},
{
"id": "2fa9325b236585675e056c4dcda1d7ac78c50549",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"description": "Changes:\n- Simplify version check by removing the `ACCEPTED_VERSIONS` static and using a\n range check instead.\n- Introduced `Version::new` and `Version::try_from `to help with construction of\n a `Version`, along with `VersionError` for error cases.",
"base": "0c9a7419dcfd265b6c1efe85c915d126feaef649",
"oid": "7018cb3d5e6079a7ae00c98efdab44f4075bacf7",
"timestamp": 1730195972
},
{
"id": "dacecd3558e8b5894f821dfa5204791606d9ba8a",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"description": "Changes:\n- Skip serializing `Doc::version` when the `version <= 1`",
"base": "0c9a7419dcfd265b6c1efe85c915d126feaef649",
"oid": "4510394ee83dfb489ad54c46096ce56f273f073c",
"timestamp": 1730205904
},
{
"id": "fafbd3028a05ca4ba0d2afc7bebf0263cd679535",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"description": "Changes:\n- Use NonZeroU32 since we do not allow the version 0",
"base": "0c9a7419dcfd265b6c1efe85c915d126feaef649",
"oid": "c7f00b1c6cebd2adeb1738f061990bd131804ca7",
"timestamp": 1730208467
},
{
"id": "0252b66b2993ea5330ecb0e392050128633ac1ae",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"description": "Changes:\n- Simplify deserialize of version",
"base": "0c9a7419dcfd265b6c1efe85c915d126feaef649",
"oid": "7bc7cb2d9794305e4f814079be4718bb52438fc3",
"timestamp": 1730287056
},
{
"id": "02951489592651b2de322ce932d4e99fc5f563d7",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"description": "Changes:\n- Clean up typos and comments\n- More concise error message for unknown versions\n- Renamed `FutureVersion` to `UnkownVersion`\n- Rename `deserialize_default_version` to `missing_version`\n- Add `RawDoc::version` and `Doc::version` getters\n- `VersionError::verbose` for more verbose version of the error",
"base": "0c9a7419dcfd265b6c1efe85c915d126feaef649",
"oid": "5516153b2af0fa94599127925a630991fdbf2f48",
"timestamp": 1731429289
},
{
"id": "8b0aa236d660bf0f6de115c5d78afadd4307d9aa",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"description": "Rebase.",
"base": "ccc0297b5acb5a375cebfa7868dd9b891462fe03",
"oid": "088339850b8a355b954a26856a8bcbf66350f44c",
"timestamp": 1731582701
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "1d0c90b4-1928-4776-aa2a-e03ebce9373f"
},
"info_url": "https://cci.rad.levitte.org//1d0c90b4-1928-4776-aa2a-e03ebce9373f.html"
}
Started at: 2026-09-07 21:35:34.866518+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ 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/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 189 issues · 38 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout 52f287f50c5d62c815bf3878b398b708f60c9b46
✓ Switched to branch patch/52f287f at revision 0295148
✓ Branch patch/52f287f setup to track rad/patches/52f287f50c5d62c815bf3878b398b708f60c9b46
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 5516153b2af0fa94599127925a630991fdbf2f48
HEAD is now at 5516153b radicle: introduce identity document version
Exit code: 0
$ rad patch show 52f287f50c5d62c815bf3878b398b708f60c9b46 -p
╭───────────────────────────────────────────────────────────────────────────────╮
│ Title radicle: introduce identity document version │
│ Patch 52f287f50c5d62c815bf3878b398b708f60c9b46 │
│ Author fintohaps z6Mkire…SQZ3voM │
│ Head 5516153b2af0fa94599127925a630991fdbf2f48 │
│ Base 0c9a7419dcfd265b6c1efe85c915d126feaef649 │
│ Target master │
│ Branches patch/52f287f │
│ Commits ahead 1, behind 1177 │
│ Status merged │
│ │
│ This change introduces versioning to the identity document format. │
│ │
│ The `Version` type is introduced to captured this. Importantly, it is │
│ very restricted in its construction and API. Since we primarily only │
│ care about serializing and deserializing documents, the `Version` is │
│ constructed via `Deserialize`. The only other ways to get a `Version` │
│ is to use the `IDENTITY_VERSION` constant or by using │
│ `Version::default`. │
│ │
│ The `Deserialize` implementation ensures that the version is within │
│ the accepted bounds, i.e. that it is not 0 and that it is not a │
│ version that may not have been released yet – the user may be running │
│ a previous client. │
│ If it does encounter a future version, it will provide a helpful error │
│ message to check version compatabilities, and possibly upgrade their │
│ binaries. │
│ │
│ Note that changing the `Doc` means that the hashes for tests │
│ change. This requires updating a few of the library tests and many of │
│ the CLI tests. │
│ One important note is the introduction of the `advance_timestamp` helper │
│ in `cob::identity::test`, which allows us to manipulate the timestamp │
│ so that we keep a stable order for the `timeline` tests and get the │
│ correct series of events. │
├───────────────────────────────────────────────────────────────────────────────┤
│ 5516153 radicle: introduce identity document version │
├───────────────────────────────────────────────────────────────────────────────┤
│ ● Revision 52f287f @ 97965d4..ab6951a by fintohaps z6Mkire…SQZ3voM 1 year ago │
│ ↑ Revision a326780 @ 7ff426a..664a69e by fintohaps z6Mkire…SQZ3voM 1 year ago │
│ ↑ Revision 3510a95 @ 0c9a741..d780f13 by fintohaps z6Mkire…SQZ3voM 1 year ago │
│ ↑ Revision 2fa9325 @ 0c9a741..7018cb3 by fintohaps z6Mkire…SQZ3voM 1 year ago │
│ ↑ Revision dacecd3 @ 0c9a741..4510394 by fintohaps z6Mkire…SQZ3voM 1 year ago │
│ ↑ Revision fafbd30 @ 0c9a741..c7f00b1 by fintohaps z6Mkire…SQZ3voM 1 year ago │
│ ↑ Revision 0252b66 @ 0c9a741..7bc7cb2 by fintohaps z6Mkire…SQZ3voM 1 year ago │
│ ↑ Revision 0295148 @ 0c9a741..5516153 by fintohaps z6Mkire…SQZ3voM 1 year ago │
│ ↑ Revision 8b0aa23 @ ccc0297..0883398 by cloudhead z6MksFq…bS9wzpT 1 year ago │
│ └─ ✓ merged by cloudhead z6MksFq…bS9wzpT │
╰───────────────────────────────────────────────────────────────────────────────╯
commit 5516153b2af0fa94599127925a630991fdbf2f48
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Tue Oct 15 12:40:26 2024 +0100
radicle: introduce identity document version
This change introduces versioning to the identity document format.
The `Version` type is introduced to capture this. Importantly, it is very
restricted in its construction and API. `Version::new` provides a smart
constructor to ensure that it is only ever constructed within the expected
bounds of `0 < v <= IDENTITY_VERSION`, where `IDENTITY_VERSION` is the constant
for the current version.
Note that serializing of the `Doc::version` is skipped to preserve the `Oid`
outputs of all the tests – which means that the first `version` is always
implicit and is not really expected to exist in the serialized forms of the
identity document.
diff --git a/radicle/src/identity/doc.rs b/radicle/src/identity/doc.rs
index e47702f29..1beb36007 100644
--- a/radicle/src/identity/doc.rs
+++ b/radicle/src/identity/doc.rs
@@ -2,7 +2,7 @@ mod id;
use std::collections::{BTreeMap, BTreeSet};
use std::fmt;
-use std::num::NonZeroUsize;
+use std::num::{NonZeroU32, NonZeroUsize};
use std::ops::{Deref, Not};
use std::path::Path;
use std::str::FromStr;
@@ -11,7 +11,7 @@ use nonempty::NonEmpty;
use once_cell::sync::Lazy;
use radicle_cob::type_name::{TypeName, TypeNameParse};
use radicle_git_ext::Oid;
-use serde::{Deserialize, Serialize};
+use serde::{de, Deserialize, Serialize};
use thiserror::Error;
use crate::canonical::formatter::CanonicalFormatter;
@@ -32,6 +32,9 @@ pub static PATH: Lazy<&Path> = Lazy::new(|| Path::new("radicle.json"));
pub const MAX_STRING_LENGTH: usize = 255;
/// Maximum number of a delegates in the identity document.
pub const MAX_DELEGATES: usize = 255;
+/// The current, most recent version of the identity document.
+// SAFETY: identity version should never be 0, so we can use `unsafe` here
+pub const IDENTITY_VERSION: Version = Version(unsafe { NonZeroU32::new_unchecked(1) });
#[derive(Error, Debug)]
pub enum DocError {
@@ -69,6 +72,120 @@ impl DocError {
}
}
+/// The version number of the identity document.
+///
+/// It is used to ensure compatibility when parsing identity documents.
+///
+/// If an invalid version is found – either the `0` version, or an unrecognized
+/// future version – the parsing of a version will fail.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
+pub struct Version(NonZeroU32);
+
+impl Version {
+ /// Construct a [`Version`].
+ ///
+ /// # Errors
+ ///
+ /// - `n` is 0
+ /// - `n` is greater than the latest version, specified by
+ /// [`IDENTITY_VERSION`].
+ pub fn new(n: u32) -> Result<Version, VersionError> {
+ match NonZeroU32::new(n) {
+ None => Err(VersionError::ZeroVersion),
+ Some(n) if n > IDENTITY_VERSION.into() => Err(VersionError::UnkownVersion(n)),
+ Some(n) => Ok(Version(n)),
+ }
+ }
+
+ /// Return the underlying [`NonZeroU32`] number of the `Version`.
+ pub fn number(&self) -> NonZeroU32 {
+ self.0
+ }
+
+ /// Check if the provided version is part of the set of accepted versions.
+ pub fn is_valid_version(v: &u32) -> bool {
+ 0 < *v && *v <= IDENTITY_VERSION.into()
+ }
+
+ /// Helper for skipping the serialization of the version if `version <= 1`.
+ ///
+ /// Note that we shouldn't allow `version: 0`, but there is no harm in
+ /// skipping it anyway.
+ fn skip_serializing(&self) -> bool {
+ u32::from(*self) <= 1
+ }
+}
+
+impl From<Version> for NonZeroU32 {
+ fn from(Version(n): Version) -> Self {
+ n
+ }
+}
+
+impl From<Version> for u32 {
+ fn from(Version(n): Version) -> Self {
+ n.into()
+ }
+}
+
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum VersionError {
+ #[error("the version 0 is not supported")]
+ ZeroVersion,
+ #[error("unknown identity document version {0}, only version {IDENTITY_VERSION} is supported")]
+ UnkownVersion(NonZeroU32),
+}
+
+impl VersionError {
+ /// Provide a verbose error.
+ ///
+ /// This will give a user more information on how to upgrade to a newer
+ /// version of an identity document, if there is one.
+ pub fn verbose(&self) -> String {
+ const UNKOWN_VERSION_ERROR: &str = r#"
+Perhaps a new version of the identity document is released which is not supported by the current client.
+See https://radicle.xyz for the latest versions of Radicle.
+The CLI command `rad id migrate` will help to migrate to an up-to-date versions."#;
+
+ match self {
+ err @ Self::ZeroVersion => err.to_string(),
+ err @ Self::UnkownVersion(_) => format!("{err}{UNKOWN_VERSION_ERROR}"),
+ }
+ }
+}
+
+impl TryFrom<u32> for Version {
+ type Error = VersionError;
+
+ fn try_from(n: u32) -> Result<Self, Self::Error> {
+ Version::new(n)
+ }
+}
+
+impl fmt::Display for Version {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ write!(f, "{}", self.0)
+ }
+}
+
+impl<'de> Deserialize<'de> for Version {
+ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+ where
+ D: serde::Deserializer<'de>,
+ {
+ u32::deserialize(deserializer)
+ .and_then(|v| Version::new(v).map_err(|e| de::Error::custom(e.to_string())))
+ }
+}
+
+/// Used for [`Deserialize`] of a [`Version`] in [`RawDoc`], so that
+/// deserializing a missing version results in `Version(1)`.
+fn missing_version() -> Version {
+ // N.B. the default version is `1` which is non-zero so unsafe is fine here
+ unsafe { Version(NonZeroU32::new_unchecked(1)) }
+}
+
/// Identifies an identity document payload type.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
#[serde(transparent)]
@@ -231,6 +348,9 @@ impl Visibility {
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RawDoc {
+ /// Version of the identity document.
+ #[serde(default = "missing_version")]
+ version: Version,
/// The payload section.
pub payload: BTreeMap<PayloadId, Payload>,
/// The delegates section.
@@ -264,6 +384,7 @@ impl RawDoc {
serde_json::to_value(project).expect("Doc::initial: payload must be serializable");
Self {
+ version: IDENTITY_VERSION,
payload: BTreeMap::from_iter([(PayloadId::project(), Payload::from(project))]),
delegates,
threshold,
@@ -271,6 +392,11 @@ impl RawDoc {
}
}
+ /// Get the version of the document.
+ pub fn version(&self) -> &Version {
+ &self.version
+ }
+
/// Get the project payload, if it exists and is valid, out of this document.
pub fn project(&self) -> Result<Project, PayloadError> {
let value = self
@@ -319,6 +445,7 @@ impl RawDoc {
/// - [`RawDoc::threshold`]: ensure that it is in the range `[1, delegates.len()]`.
pub fn verified(self) -> Result<Doc, DocError> {
let RawDoc {
+ version,
payload,
delegates,
threshold,
@@ -327,6 +454,7 @@ impl RawDoc {
let delegates = Delegates::new(delegates)?;
let threshold = Threshold::new(threshold, &delegates)?;
Ok(Doc {
+ version,
payload,
delegates,
threshold,
@@ -496,6 +624,8 @@ impl Threshold {
#[serde(rename_all = "camelCase")]
#[serde(try_from = "RawDoc")]
pub struct Doc {
+ #[serde(skip_serializing_if = "Version::skip_serializing")]
+ version: Version,
payload: BTreeMap<PayloadId, Payload>,
delegates: Delegates,
threshold: Threshold,
@@ -514,6 +644,7 @@ impl Doc {
serde_json::to_value(project).expect("Doc::initial: payload must be serializable");
Self {
+ version: IDENTITY_VERSION,
payload: BTreeMap::from_iter([(PayloadId::project(), Payload::from(project))]),
delegates: Delegates(NonEmpty::new(delegate)),
threshold: Threshold(NonZeroUsize::MIN),
@@ -530,12 +661,14 @@ impl Doc {
/// re-verifying.
pub fn edit(self) -> RawDoc {
let Doc {
+ version,
payload,
delegates,
threshold,
visibility,
} = self;
RawDoc {
+ version,
payload,
delegates: delegates.into(),
threshold: threshold.into(),
@@ -554,6 +687,11 @@ impl Doc {
raw.verified()
}
+ /// Get the version of the document.
+ pub fn version(&self) -> &Version {
+ &self.version
+ }
+
/// Return the associated payloads for this [`Doc`].
pub fn payload(&self) -> &BTreeMap<PayloadId, Payload> {
&self.payload
@@ -726,6 +864,7 @@ impl Doc {
mod test {
use radicle_crypto::test::signer::MockSigner;
use radicle_crypto::Signer as _;
+ use serde_json::json;
use crate::assert_matches;
use crate::rad;
@@ -769,6 +908,106 @@ mod test {
assert_matches!(doc.verified(), Err(DocError::Delegates(DelegatesError(_))));
}
+ #[test]
+ fn test_is_valid_version() {
+ // 0 is not a valid version
+ assert!(!Version::is_valid_version(&0));
+
+ // Ensures that the latest version is always valid
+ let current = IDENTITY_VERSION.number();
+ assert!(Version::is_valid_version(¤t.into()));
+
+ // Ensures that the next version is not valid because we have not
+ // defined it yet
+ let next = current.checked_add(1).unwrap();
+ assert!(!Version::is_valid_version(&next.into()));
+ }
+
+ #[test]
+ fn test_future_version_error() {
+ let v = Version(NonZeroU32::MAX).to_string();
+ assert_eq!(
+ serde_json::from_str::<Version>(&v)
+ .expect_err("should fail to deserialize")
+ .to_string(),
+ VersionError::UnkownVersion(NonZeroU32::MAX).to_string(),
+ )
+ }
+
+ #[test]
+ fn test_parse_version() {
+ // Original document before introducing the version field
+ let v1 = json!(
+ {
+ "payload": {
+ "xyz.radicle.project": {
+ "defaultBranch": "master",
+ "description": "Radicle Heartwood Protocol & Stack",
+ "name": "heartwood"
+ }
+ },
+ "delegates": [
+ "did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
+ "did:key:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW",
+ "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM"
+ ],
+ "threshold": 1
+ }
+ );
+
+ // Deserializing the `RawDoc` should not fail and should include the
+ // `IDENTITY_VERSION`.
+ let doc = serde_json::from_str::<RawDoc>(&v1.to_string()).unwrap();
+ let payload = [(
+ PayloadId::project(),
+ Payload {
+ value: json!({
+ "name": "heartwood",
+ "description": "Radicle Heartwood Protocol & Stack",
+ "defaultBranch": "master",
+ }),
+ },
+ )]
+ .into_iter()
+ .collect::<BTreeMap<_, _>>();
+ let delegates = vec![
+ "did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT"
+ .parse::<Did>()
+ .unwrap(),
+ "did:key:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW"
+ .parse::<Did>()
+ .unwrap(),
+ "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM"
+ .parse::<Did>()
+ .unwrap(),
+ ];
+ // And this is the expected outcome of the deserialization
+ assert_eq!(
+ doc,
+ RawDoc {
+ version: IDENTITY_VERSION,
+ payload: payload.clone(),
+ delegates: delegates.clone(),
+ threshold: 1,
+ visibility: Visibility::Public,
+ }
+ );
+
+ // Deserializing into `Doc` should also succeed.
+ let verified = serde_json::from_str::<Doc>(&v1.to_string()).unwrap();
+ let delegates = Delegates(NonEmpty::from_vec(delegates).unwrap());
+ assert_eq!(
+ verified,
+ Doc {
+ version: IDENTITY_VERSION,
+ threshold: Threshold::new(1, &delegates).unwrap(),
+ payload: payload.clone(),
+ delegates,
+ visibility: Visibility::Public,
+ }
+ );
+ }
+
#[test]
fn test_canonical_example() {
let tempdir = tempfile::tempdir().unwrap();
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 1d0c90b4-1928-4776-aa2a-e03ebce9373f -v /opt/radcis/ci.rad.levitte.org/cci/state/1d0c90b4-1928-4776-aa2a-e03ebce9373f/s:/1d0c90b4-1928-4776-aa2a-e03ebce9373f/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w:/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w -w /1d0c90b4-1928-4776-aa2a-e03ebce9373f/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:trixie bash /1d0c90b4-1928-4776-aa2a-e03ebce9373f/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 aead v0.5.2
Downloaded amplify_num v0.5.2
Downloaded amplify v4.6.0
Downloaded amplify_derive v4.0.0
Downloaded aho-corasick v1.1.3
Downloaded aes-gcm v0.10.3
Downloaded shlex v1.3.0
Downloaded shell-words v1.1.0
Downloaded gix-protocol v0.45.0
Downloaded tempfile v3.10.1
Downloaded tree-sitter-html v0.20.0
Downloaded tree-sitter-highlight v0.20.1
Downloaded tar v0.4.40
Downloaded inout v0.1.3
Downloaded gix-pack v0.51.1
Downloaded termion v3.0.0
Downloaded syn v1.0.109
Downloaded pem-rfc7468 v0.7.0
Downloaded pbkdf2 v0.12.2
Downloaded gix-utils v0.1.12
Downloaded maybe-async v0.2.10
Downloaded rand_chacha v0.3.1
Downloaded salsa20 v0.10.2
Downloaded sha2 v0.10.8
Downloaded parking_lot v0.12.1
Downloaded num_threads v0.1.7
Downloaded numtoa v0.1.0
Downloaded proc-macro-error-attr v1.0.4
Downloaded unicode-display-width v0.3.0
Downloaded once_cell v1.19.0
Downloaded popol v3.0.0
Downloaded p256 v0.13.2
Downloaded powerfmt v0.2.0
Downloaded pkg-config v0.3.30
Downloaded percent-encoding v2.3.1
Downloaded pretty_assertions v1.4.0
Downloaded num-iter v0.1.44
Downloaded num-integer v0.1.46
Downloaded gix-tempfile v14.0.1
Downloaded prodash v28.0.0
Downloaded noise-framework v0.4.0
Downloaded num-conv v0.1.0
Downloaded primeorder v0.13.6
Downloaded yansi v0.5.1
Downloaded newline-converter v0.3.0
Downloaded nonempty v0.5.0
Downloaded nonempty v0.9.0
Downloaded serde v1.0.198
Downloaded log v0.4.21
Downloaded sec1 v0.7.3
Downloaded ppv-lite86 v0.2.17
Downloaded proc-macro2 v1.0.81
Downloaded miniz_oxide v0.7.2
Downloaded gix-transport v0.42.0
Downloaded url v2.5.0
Downloaded indexmap v2.2.6
Downloaded rsa v0.9.6
Downloaded inquire v0.7.5
Downloaded memchr v2.7.2
Downloaded unicode-normalization v0.1.23
Downloaded tree-sitter-python v0.20.4
Downloaded tree-sitter v0.20.10
Downloaded time v0.3.36
Downloaded regex v1.10.4
Downloaded idna v0.5.0
Downloaded regex-syntax v0.8.3
Downloaded tree-sitter-bash v0.20.5
Downloaded regex-automata v0.4.6
Downloaded libc v0.2.155
Downloaded sha3 v0.10.8
Downloaded tree-sitter-ruby v0.20.1
Downloaded tree-sitter-rust v0.20.4
Downloaded linux-raw-sys v0.4.13
Downloaded tree-sitter-typescript v0.20.5
Downloaded libgit2-sys v0.17.0+1.8.1
Downloaded tree-sitter-c v0.20.8
Downloaded vcpkg v0.2.15
Downloaded libm v0.2.8
Downloaded hashbrown v0.14.3
Downloaded winnow v0.6.8
Downloaded sqlite3-src v0.5.1
Downloaded unicode-bidi v0.3.15
Downloaded socket2 v0.5.7
Downloaded snapbox v0.4.17
Downloaded rustix v0.38.34
Downloaded pkcs1 v0.7.5
Downloaded libz-sys v1.1.16
Downloaded serde_json v1.0.116
Downloaded serde_derive v1.0.198
Downloaded scrypt v0.11.0
Downloaded qcheck v1.0.0
Downloaded num-bigint-dig v0.8.4
Downloaded hmac v0.12.1
Downloaded der v0.7.9
Downloaded unicode-ident v1.0.12
Downloaded walkdir v2.5.0
Downloaded memmap2 v0.9.4
Downloaded sha1_smol v1.0.0
Downloaded scopeguard v1.2.0
Downloaded ryu v1.0.17
Downloaded filetime v0.2.23
Downloaded dyn-clone v1.0.17
Downloaded same-file v1.0.6
Downloaded proc-macro-error v1.0.4
Downloaded io-reactor v0.5.2
Downloaded gix-validate v0.8.5
Downloaded chrono v0.4.38
Downloaded base64 v0.21.7
Downloaded num-traits v0.2.18
Downloaded lock_api v0.4.11
Downloaded unicode-width v0.1.11
Downloaded pkcs8 v0.10.2
Downloaded p384 v0.13.0
Downloaded iana-time-zone v0.1.60
Downloaded group v0.13.0
Downloaded timeago v0.4.2
Downloaded crypto-bigint v0.5.5
Downloaded radicle-surf v0.22.0
Downloaded multibase v0.9.1
Downloaded radicle-std-ext v0.1.0
Downloaded radicle-git-ext v0.8.0
Downloaded p521 v0.13.3
Downloaded rfc6979 v0.4.0
Downloaded tree-sitter-css v0.20.0
Downloaded jobserver v0.1.31
Downloaded gix-traverse v0.39.2
Downloaded ssh-cipher v0.2.0
Downloaded gix-path v0.10.9
Downloaded itoa v1.0.11
Downloaded quote v1.0.36
Downloaded qcheck-macros v1.0.0
Downloaded amplify_syn v2.0.1
Downloaded polyval v0.6.2
Downloaded lazy_static v1.4.0
Downloaded gix-revwalk v0.13.2
Downloaded cyphergraphy v0.3.0
Downloaded arc-swap v1.7.1
Downloaded rand_core v0.6.4
Downloaded rand v0.8.5
Downloaded netservices v0.8.0
Downloaded gix-quote v0.4.12
Downloaded spin v0.5.2
Downloaded cyphernet v0.5.2
Downloaded cc v1.0.95
Downloaded home v0.5.9
Downloaded gix-sec v0.10.6
Downloaded poly1305 v0.8.0
Downloaded parking_lot_core v0.9.9
Downloaded gix-packetline v0.17.5
Downloaded gix-fs v0.11.2
Downloaded gix-credentials v0.24.2
Downloaded ghash v0.5.1
Downloaded ecdsa v0.16.9
Downloaded data-encoding-macro-internal v0.1.12
Downloaded cypheraddr v0.4.0
Downloaded byteorder v1.5.0
Downloaded bstr v1.9.1
Downloaded bloomy v1.2.0
Downloaded xattr v1.3.1
Downloaded tree-sitter-json v0.20.2
Downloaded tinyvec_macros v0.1.1
Downloaded crossbeam-channel v0.5.13
Downloaded chacha20poly1305 v0.10.1
Downloaded opaque-debug v0.3.1
Downloaded normalize-line-endings v0.3.0
Downloaded localtime v1.3.1
Downloaded gix-url v0.27.3
Downloaded gix-trace v0.1.9
Downloaded version_check v0.9.4
Downloaded utf8parse v0.2.1
Downloaded universal-hash v0.5.1
Downloaded unicode-segmentation v1.11.0
Downloaded typenum v1.17.0
Downloaded tree-sitter-toml v0.20.0
Downloaded tree-sitter-md v0.1.7
Downloaded tree-sitter-go v0.20.0
Downloaded time-macros v0.2.18
Downloaded time-core v0.1.2
Downloaded thiserror-impl v1.0.59
Downloaded ssh-encoding v0.2.0
Downloaded sqlite3-sys v0.15.2
Downloaded sqlite v0.32.0
Downloaded socks5-client v0.4.1
Downloaded snapbox-macros v0.3.8
Downloaded gix-features v0.38.2
Downloaded gix-diff v0.44.1
Downloaded gix-actor v0.31.5
Downloaded git-ref-format-macro v0.3.0
Downloaded form_urlencoded v1.2.1
Downloaded flate2 v1.0.28
Downloaded either v1.11.0
Downloaded ec25519 v0.1.0
Downloaded digest v0.10.7
Downloaded diff v0.1.13
Downloaded deranged v0.3.11
Downloaded crypto-common v0.1.6
Downloaded cpufeatures v0.2.12
Downloaded colorchoice v1.0.0
Downloaded cipher v0.4.4
Downloaded cfg-if v1.0.0
Downloaded cbc v0.1.2
Downloaded blowfish v0.9.1
Downloaded block-buffer v0.10.4
Downloaded bitflags v2.5.0
Downloaded bcrypt-pbkdf v0.10.0
Downloaded base64ct v1.6.0
Downloaded base32 v0.4.0
Downloaded base16ct v0.2.0
Downloaded base-x v0.2.11
Downloaded autocfg v1.2.0
Downloaded lexopt v0.3.0
Downloaded keccak v0.1.5
Downloaded zeroize v1.7.0
Downloaded tinyvec v1.6.0
Downloaded thiserror v1.0.59
Downloaded syn v2.0.60
Downloaded ssh-key v0.6.6
Downloaded signature v1.6.4
Downloaded gix-prompt v0.8.4
Downloaded gix-hash v0.14.2
Downloaded gix-date v0.8.7
Downloaded gix-chunk v0.4.8
Downloaded git2 v0.19.0
Downloaded fxhash v0.2.1
Downloaded fastrand v2.1.0
Downloaded escargot v0.5.10
Downloaded errno v0.3.8
Downloaded equivalent v1.0.1
Downloaded elliptic-curve v0.13.8
Downloaded ct-codecs v1.1.1
Downloaded crossbeam-utils v0.8.19
Downloaded crc32fast v1.4.0
Downloaded const-oid v0.9.6
Downloaded chacha20 v0.9.1
Downloaded anyhow v1.0.82
Downloaded anstyle-query v1.0.2
Downloaded anstyle v1.0.6
Downloaded anstream v0.6.13
Downloaded gix-odb v0.61.1
Downloaded gix-object v0.42.3
Downloaded gix-config-value v0.14.6
Downloaded faster-hex v0.9.0
Downloaded data-encoding v2.5.0
Downloaded ctr v0.9.2
Downloaded colored v2.1.0
Downloaded block-padding v0.3.3
Downloaded anstyle-parse v0.2.3
Downloaded termion v2.0.3
Downloaded similar v2.5.0
Downloaded gix-command v0.3.6
Downloaded data-encoding-macro v0.1.14
Downloaded gix-hashtable v0.5.2
Downloaded generic-array v0.14.7
Downloaded spki v0.7.3
Downloaded siphasher v0.3.11
Downloaded gix-commitgraph v0.24.3
Downloaded git-ref-format-core v0.3.0
Downloaded getrandom v0.2.14
Downloaded base64 v0.13.1
Downloaded ff v0.13.0
Downloaded ascii v1.1.0
Downloaded subtle v2.5.0
Downloaded smallvec v1.13.2
Downloaded siphasher v1.0.1
Downloaded signature v2.2.0
Downloaded ed25519 v1.5.3
Downloaded git-ref-format v0.3.0
Downloaded aes v0.8.4
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
Checking regex-syntax v0.8.3
Compiling quote v1.0.36
Compiling jobserver v0.1.31
Compiling syn v2.0.60
Checking aho-corasick v1.1.3
Compiling cc v1.0.95
Compiling thiserror v1.0.59
Checking regex-automata v0.4.6
Compiling typenum v1.17.0
Checking getrandom v0.2.14
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 zeroize v1.7.0
Checking bstr v1.9.1
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 cipher v0.4.4
Checking digest v0.10.7
Compiling autocfg v1.2.0
Compiling crc32fast v1.4.0
Compiling thiserror-impl v1.0.59
Checking sha2 v0.10.8
Checking unicode-bidi v0.3.15
Checking percent-encoding v2.3.1
Checking form_urlencoded v1.2.1
Checking universal-hash v0.5.1
Checking opaque-debug v0.3.1
Checking idna v0.5.0
Compiling vcpkg v0.2.15
Compiling serde v1.0.198
Checking url v2.5.0
Compiling amplify_syn v2.0.1
Compiling libz-sys v1.1.16
Compiling serde_derive v1.0.198
Checking byteorder v1.5.0
Compiling data-encoding v2.5.0
Compiling rustix v0.38.34
Compiling amplify_derive v4.0.0
Checking signature v1.6.4
Checking amplify_num v0.5.2
Compiling data-encoding-macro-internal v0.1.12
Checking itoa v1.0.11
Checking linux-raw-sys v0.4.13
Checking log v0.4.21
Checking ascii v1.1.0
Checking data-encoding-macro v0.1.14
Checking ed25519 v1.5.3
Compiling libgit2-sys v0.17.0+1.8.1
Checking aead v0.5.2
Compiling proc-macro-error-attr v1.0.4
Checking amplify v4.6.0
Checking ct-codecs v1.1.1
Checking base-x v0.2.11
Checking multibase v0.9.1
Checking ec25519 v0.1.0
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
Checking hmac v0.12.1
Compiling sqlite3-src v0.5.1
Checking hashbrown v0.14.3
Checking ppv-lite86 v0.2.17
Checking base32 v0.4.0
Checking base64ct v1.6.0
Checking cypheraddr v0.4.0
Checking pem-rfc7468 v0.7.0
Checking rand_chacha v0.3.1
Checking pbkdf2 v0.12.2
Checking ghash v0.5.1
Compiling git-ref-format-macro v0.3.0
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 rand v0.8.5
Checking ssh-encoding v0.2.0
Checking socks5-client v0.4.1
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 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/radicle-ssh)
Compiling num-traits v0.2.18
Compiling tree-sitter v0.20.10
Checking equivalent v1.0.1
Compiling serde_json v1.0.116
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 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/radicle-dag)
Compiling anyhow v1.0.82
Checking lazy_static v1.4.0
Checking anstyle-query v1.0.2
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 siphasher v1.0.1
Checking base64 v0.21.7
Checking anstyle-parse v0.2.3
Checking anstyle v1.0.6
Checking colorchoice v1.0.0
Checking anstream v0.6.13
Checking snapbox-macros v0.3.8
Checking similar v2.5.0
Checking normalize-line-endings v0.3.0
Checking snapbox v0.4.17
Checking radicle-signals v0.10.0 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/radicle-signals)
Checking numtoa v0.1.0
Checking gix-trace v0.1.9
Checking unicode-segmentation v1.11.0
Checking yansi v0.5.1
Checking diff v0.1.13
Compiling adler v1.0.2
Compiling miniz_oxide v0.7.2
Compiling xattr v1.3.1
Checking pretty_assertions v1.4.0
Compiling filetime v0.2.23
Checking lexopt v0.3.0
Checking shlex v1.3.0
Compiling escargot v0.5.10
Compiling tar v0.4.40
Compiling flate2 v1.0.28
Checking newline-converter v0.3.0
Checking termion v2.0.3
Checking fxhash v0.2.1
Checking faster-hex v0.9.0
Checking unicode-width v0.1.11
Checking dyn-clone v1.0.17
Compiling radicle-surf v0.22.0
Checking inquire v0.7.5
Checking unicode-display-width v0.3.0
Checking termion v3.0.0
Checking gix-utils v0.1.12
Compiling tree-sitter-ruby v0.20.1
Compiling tree-sitter-html v0.20.0
Compiling tree-sitter-md v0.1.7
Compiling tree-sitter-json v0.20.2
Compiling tree-sitter-bash v0.20.5
Compiling tree-sitter-typescript v0.20.5
Compiling tree-sitter-python v0.20.4
Compiling tree-sitter-rust v0.20.4
Compiling tree-sitter-css v0.20.0
Compiling tree-sitter-go v0.20.0
Compiling tree-sitter-c v0.20.8
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 nonempty v0.5.0
Compiling radicle-cli v0.11.0 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/radicle-cli)
Checking base64 v0.13.1
Checking same-file v1.0.6
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 gix-features v0.38.2
Checking smallvec v1.13.2
Compiling lock_api v0.4.11
Compiling parking_lot_core v0.9.9
Compiling num-conv v0.1.0
Checking powerfmt v0.2.0
Checking scopeguard v1.2.0
Compiling time-core v0.1.2
Checking deranged v0.3.11
Compiling time-macros v0.2.18
Checking num_threads v0.1.7
Checking home v0.5.9
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 gix-commitgraph v0.24.3
Checking time v0.3.36
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-transport v0.42.0
Checking gix-date v0.8.7
Compiling maybe-async v0.2.10
Checking gix-actor v0.31.5
Checking arc-swap v1.7.1
Checking gix-object v0.42.3
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-diff v0.44.1
Checking siphasher v0.3.11
Checking gix-traverse v0.39.2
Compiling radicle-node v0.10.0 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/radicle-node)
Checking bloomy v1.2.0
Checking gix-pack v0.51.1
Checking netservices v0.8.0
Checking scrypt v0.11.0
Checking radicle-systemd v0.9.0 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/radicle-systemd)
Compiling qcheck-macros v1.0.0
Compiling radicle-remote-helper v0.10.0 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/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 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/radicle-term)
Checking radicle-crypto v0.11.0 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/radicle-crypto)
Checking radicle-cob v0.12.0 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/radicle-cob)
Checking radicle-crdt v0.1.0 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/radicle-crdt)
Checking radicle v0.13.0 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/radicle)
Checking radicle-cli-test v0.10.0 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/w/radicle-cli-test)
Checking radicle-fetch v0.10.0 (/1d0c90b4-1928-4776-aa2a-e03ebce9373f/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...
error: could not compile `radicle-cli` (lib test) due to 2 previous errors
Exit code: 101
{
"response": "finished",
"result": "failure"
}