rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwoodb6e7348cd755058ce1df2c313e5085c21f9a99dd
{
"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": "839d70f91e18ed9a19ad322aa6595f92c952ff84",
"author": {
"id": "did:key:z6MkjFMAoA3hUG6tM7Wprn7dh7bquLpmN1f3yECbwkyweQnJ",
"alias": "n4ch7@r1v3nd311"
},
"title": "cli: `rad config schema` emits JSON Schema",
"state": {
"status": "merged",
"conflicts": []
},
"before": "f30760d6bb86d2978a5ed4df8ee45b9aa97778b4",
"after": "b6e7348cd755058ce1df2c313e5085c21f9a99dd",
"commits": [
"b6e7348cd755058ce1df2c313e5085c21f9a99dd"
],
"target": "6cfed884bf37cba1e0d8e97fa8b0e94df4a04b1f",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "839d70f91e18ed9a19ad322aa6595f92c952ff84",
"author": {
"id": "did:key:z6MkjFMAoA3hUG6tM7Wprn7dh7bquLpmN1f3yECbwkyweQnJ",
"alias": "n4ch7@r1v3nd311"
},
"description": "Leverage `schemars` to generate a JSON Schema from our structs for\nconfigurations and those occurring within them.\n\nRegarding dependency on an alpha version of `schemars`: Reading the\n[road to 1.0 issue](https://github.com/GREsau/schemars/issues/112)\nI don't expect that we would be affected by breakage.\nWe use pretty standard/core parts of the API that probably are most stable.\n\nThe output of `rad config schema` can be used by editors to provide a\nsmoother editing experience for the configuration file. Discovery of\nattributes (both keys and values) is greatly improved with the schema\nhelping in the background.\n\nRefer to:\n - https://json-schema.org\n - https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings\n - https://schemastore.org\n\n---\n\nOriginal description by did:key:z6MkjFMAoA3hUG6tM7Wprn7dh7bquLpmN1f3yECbwkyweQnJ follows:\n\nThis will be a great addition especially for LSP users\nwho dont want to read through all the code to know what\noptions can be changed where and how.\n\nHow it works: You simply pipe the output into xyz.json\nand then add to your config: \"$schema\": \"/path/to/xyz.json\"\nand if you have a working json LSP you'll get docs, etc. for\nyour config, meaning we'll have to write a lot less docs\nin the future :)",
"base": "f30760d6bb86d2978a5ed4df8ee45b9aa97778b4",
"oid": "b6e7348cd755058ce1df2c313e5085c21f9a99dd",
"timestamp": 1745858199
},
{
"id": "a854a147f5135b30b15dc15fcf004459dd21f341",
"author": {
"id": "did:key:z6MkjFMAoA3hUG6tM7Wprn7dh7bquLpmN1f3yECbwkyweQnJ",
"alias": "n4ch7@r1v3nd311"
},
"description": "",
"base": "f30760d6bb86d2978a5ed4df8ee45b9aa97778b4",
"oid": "d4770e6a9a2e2ad2e8397d7a82fa6763a0888175",
"timestamp": 1746261313
},
{
"id": "ac6787bbb0608bf427be943cefe50b2e748bf3c7",
"author": {
"id": "did:key:z6MkjFMAoA3hUG6tM7Wprn7dh7bquLpmN1f3yECbwkyweQnJ",
"alias": "n4ch7@r1v3nd311"
},
"description": "Make `schemars` an optional dependency.",
"base": "41f9048d96596473600e6c77f041d29cd3de1d6f",
"oid": "a8656aa168929ef87e3eab919e72c8402716e3f6",
"timestamp": 1747856993
},
{
"id": "98bf6dfef9ac4ff60b7304990918554efc037ee0",
"author": {
"id": "did:key:z6MkjFMAoA3hUG6tM7Wprn7dh7bquLpmN1f3yECbwkyweQnJ",
"alias": "n4ch7@r1v3nd311"
},
"description": "Rebased",
"base": "5a2f26eaa7a18faf42ce6c0d2e0d0da3b9385491",
"oid": "bf877d009592af65e04bbf82590b70f204365ec5",
"timestamp": 1747904378
},
{
"id": "15fcad6ee7b9a15999caa26d389e947ab360b922",
"author": {
"id": "did:key:z6MkjFMAoA3hUG6tM7Wprn7dh7bquLpmN1f3yECbwkyweQnJ",
"alias": "n4ch7@r1v3nd311"
},
"description": "Changes:\n- Small fix to spacing in `radicle/Cargo.toml`",
"base": "5a2f26eaa7a18faf42ce6c0d2e0d0da3b9385491",
"oid": "b608a7880695a2e21fe25240238f0d26e13a82c2",
"timestamp": 1747904478
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "12eb4842-e0ec-4ea2-a5ed-1c3edc483980"
},
"info_url": "https://cci.rad.levitte.org//12eb4842-e0ec-4ea2-a5ed-1c3edc483980.html"
}
Started at: 2025-10-21 17:53:01.553497+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/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 125 issues · 15 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout 839d70f91e18ed9a19ad322aa6595f92c952ff84
✓ Switched to branch patch/839d70f at revision 839d70f
✓ Branch patch/839d70f setup to track rad/patches/839d70f91e18ed9a19ad322aa6595f92c952ff84
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout b6e7348cd755058ce1df2c313e5085c21f9a99dd
HEAD is now at b6e7348c "rad config schema" prints out a json schema This will be a great addition especially for LSP users who dont want to read through all the code to know what options can be changed where and how.
Exit code: 0
$ git show b6e7348cd755058ce1df2c313e5085c21f9a99dd
commit b6e7348cd755058ce1df2c313e5085c21f9a99dd
Author: n4ch7 <n4ch7@r1v3nd311>
Date: Mon Apr 28 18:35:45 2025 +0200
"rad config schema" prints out a json schema
This will be a great addition especially for LSP users
who dont want to read through all the code to know what
options can be changed where and how.
How it works: You simply pipe the output into xyz.json
and then add to your config: "$schema": "/path/to/xyz.json"
and if you have a working json LSP you'll get docs, etc. for
your config, meaning we'll have to write a lot less docs
in the future :)
diff --git a/Cargo.lock b/Cargo.lock
index 981c3d3b..5a37b222 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2203,6 +2203,7 @@ dependencies = [
"radicle-crypto",
"radicle-git-ext",
"radicle-ssh",
+ "schemars",
"serde",
"serde_json",
"siphasher 1.0.1",
@@ -2232,6 +2233,7 @@ dependencies = [
"radicle-node",
"radicle-surf",
"radicle-term",
+ "schemars",
"serde",
"serde_json",
"shlex",
@@ -2637,6 +2639,30 @@ dependencies = [
"winapi-util",
]
+[[package]]
+name = "schemars"
+version = "0.8.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615"
+dependencies = [
+ "dyn-clone",
+ "schemars_derive",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "schemars_derive"
+version = "0.8.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde_derive_internals",
+ "syn 2.0.89",
+]
+
[[package]]
name = "scopeguard"
version = "1.2.0"
@@ -2700,6 +2726,17 @@ dependencies = [
"syn 2.0.89",
]
+[[package]]
+name = "serde_derive_internals"
+version = "0.29.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
[[package]]
name = "serde_json"
version = "1.0.116"
diff --git a/radicle-cli/Cargo.toml b/radicle-cli/Cargo.toml
index e8091d8c..df55a2db 100644
--- a/radicle-cli/Cargo.toml
+++ b/radicle-cli/Cargo.toml
@@ -45,6 +45,7 @@ tree-sitter-bash = { version = "0.23.3" }
tree-sitter-go = { version = "0.23.4" }
tree-sitter-md = { version = "0.3.2" }
zeroize = { version = "1.1" }
+schemars = "0.8.22"
[dependencies.radicle]
version = "0"
diff --git a/radicle-cli/src/commands/config.rs b/radicle-cli/src/commands/config.rs
index 95d27489..989237fc 100644
--- a/radicle-cli/src/commands/config.rs
+++ b/radicle-cli/src/commands/config.rs
@@ -3,6 +3,8 @@ use std::ffi::OsString;
use std::path::Path;
use std::str::FromStr;
+use schemars::schema_for;
+
use anyhow::anyhow;
use radicle::node::Alias;
use radicle::profile::{Config, ConfigError, ConfigPath, RawConfig};
@@ -23,6 +25,7 @@ Usage
rad config init --alias <alias> [<option>...]
rad config edit [<option>...]
rad config get <key> [<option>...]
+ rad config schema [<option>...]
rad config set <key> <value> [<option>...]
rad config unset <key> [<option>...]
rad config push <key> <value> [<option>...]
@@ -43,6 +46,7 @@ enum Operation {
#[default]
Show,
Get(String),
+ Schema,
Set(String, String),
Push(String, String),
Remove(String, String),
@@ -79,6 +83,7 @@ impl Args for Options {
}
Value(val) if op.is_none() => match val.to_string_lossy().as_ref() {
"show" => op = Some(Operation::Show),
+ "schema" => op = Some(Operation::Schema),
"edit" => op = Some(Operation::Edit),
"init" => op = Some(Operation::Init),
"get" => {
@@ -140,6 +145,10 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
let profile = ctx.profile()?;
term::json::to_pretty(&profile.config, path.as_path())?.print();
}
+ Operation::Schema => {
+ let profile = ctx.profile()?;
+ term::json::to_pretty(&schema_for!(Config), path.as_path())?.print();
+ }
Operation::Get(key) => {
let mut temp_config = RawConfig::from_file(&path)?;
let key: ConfigPath = key.into();
diff --git a/radicle/Cargo.toml b/radicle/Cargo.toml
index 9282579b..3d3e7cc2 100644
--- a/radicle/Cargo.toml
+++ b/radicle/Cargo.toml
@@ -34,6 +34,7 @@ sqlite = { version = "0.32.0", features = ["bundled"] }
tempfile = { version = "3.3.0" }
thiserror = { version = "1" }
unicode-normalization = { version = "0.1" }
+schemars = { version = "0.8.22", features = ["derive_json_schema", "impl_json_schema"] }
[dependencies.chrono]
version = "0.4.0"
diff --git a/radicle/src/cli.rs b/radicle/src/cli.rs
index a1dc54c4..859c5bc5 100644
--- a/radicle/src/cli.rs
+++ b/radicle/src/cli.rs
@@ -1,5 +1,6 @@
+use schemars::JsonSchema;
/// CLI configuration.
-#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
pub struct Config {
/// Whether to show hints or not in the CLI.
diff --git a/radicle/src/explorer.rs b/radicle/src/explorer.rs
index c73a2d1c..0a521c18 100644
--- a/radicle/src/explorer.rs
+++ b/radicle/src/explorer.rs
@@ -1,5 +1,6 @@
use std::str::FromStr;
+use schemars::JsonSchema;
use thiserror::Error;
use crate::prelude::RepoId;
@@ -81,7 +82,7 @@ impl std::fmt::Display for ExplorerUrl {
}
/// A public explorer, eg. `https://app.radicle.xyz`.
-#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq)]
+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq, JsonSchema)]
#[serde(transparent)]
pub struct Explorer(String);
diff --git a/radicle/src/identity/doc/id.rs b/radicle/src/identity/doc/id.rs
index c61d2bec..c51696f2 100644
--- a/radicle/src/identity/doc/id.rs
+++ b/radicle/src/identity/doc/id.rs
@@ -2,6 +2,7 @@ use std::ops::Deref;
use std::{ffi::OsString, fmt, str::FromStr};
use git_ext::ref_format::{Component, RefString};
+use schemars::JsonSchema;
use thiserror::Error;
use crate::git;
@@ -18,9 +19,13 @@ pub enum IdError {
Multibase(#[from] multibase::Error),
}
+/// remote derive JsonSchema
+/// https://github.com/GREsau/schemars/blob/v0/schemars/examples/remote_derive.rs
+pub struct OidDef {}
+
/// A repository identifier.
-#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
-pub struct RepoId(git::Oid);
+#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, JsonSchema)]
+pub struct RepoId(#[schemars(with = "str")] git::Oid);
impl fmt::Display for RepoId {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
diff --git a/radicle/src/node.rs b/radicle/src/node.rs
index 669fa832..9756daf5 100644
--- a/radicle/src/node.rs
+++ b/radicle/src/node.rs
@@ -25,6 +25,7 @@ use std::{fmt, io, net, thread, time};
use amplify::WrapperMut;
use cyphernet::addr::NetAddr;
use localtime::{LocalDuration, LocalTime};
+use schemars::JsonSchema;
use serde::de::DeserializeOwned;
use serde::{Deserialize, Serialize};
use serde_json as json;
@@ -291,7 +292,9 @@ impl AsRef<str> for UserAgent {
}
/// Node alias.
-#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, serde::Serialize, serde::Deserialize)]
+#[derive(
+ Debug, PartialEq, Eq, PartialOrd, Ord, Clone, serde::Serialize, serde::Deserialize, JsonSchema,
+)]
#[serde(try_from = "String", into = "String")]
pub struct Alias(String);
@@ -499,10 +502,16 @@ impl<T: Serialize> CommandResult<T> {
}
/// Peer public protocol address.
-#[derive(Wrapper, WrapperMut, Clone, Eq, PartialEq, Debug, Hash, From, Serialize, Deserialize)]
+#[derive(
+ Wrapper, WrapperMut, Clone, Eq, PartialEq, Debug, Hash, From, Serialize, Deserialize, JsonSchema,
+)]
#[wrapper(Deref, Display, FromStr)]
#[wrapper_mut(DerefMut)]
-pub struct Address(#[serde(with = "crate::serde_ext::string")] NetAddr<HostName>);
+pub struct Address(
+ #[serde(with = "crate::serde_ext::string")]
+ #[schemars(schema_with = "crate::serde_ext::string::make_schema")]
+ NetAddr<HostName>,
+);
impl Address {
/// Check whether this address is from the local network.
diff --git a/radicle/src/node/config.rs b/radicle/src/node/config.rs
index 15571df2..9dd594b9 100644
--- a/radicle/src/node/config.rs
+++ b/radicle/src/node/config.rs
@@ -3,6 +3,8 @@ use std::ops::Deref;
use std::str::FromStr;
use std::{fmt, net};
+use schemars::JsonSchema;
+
use cyphernet::addr::PeerAddr;
use localtime::LocalDuration;
use serde_json as json;
@@ -57,7 +59,9 @@ pub mod seeds {
}
/// Peer-to-peer network.
-#[derive(Default, Debug, Copy, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
+#[derive(
+ Default, Debug, Copy, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, JsonSchema,
+)]
#[serde(rename_all = "camelCase")]
pub enum Network {
#[default]
@@ -94,16 +98,18 @@ impl Network {
}
/// Configuration parameters defining attributes of minima and maxima.
-#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
pub struct Limits {
/// Number of routing table entries before we start pruning.
pub routing_max_size: usize,
/// How long to keep a routing table entry before being pruned.
#[serde(with = "crate::serde_ext::localtime::duration")]
+ #[schemars(schema_with = "crate::serde_ext::localtime::duration::make_schema")]
pub routing_max_age: LocalDuration,
/// How long to keep a gossip message entry before pruning it.
#[serde(with = "crate::serde_ext::localtime::duration")]
+ #[schemars(schema_with = "crate::serde_ext::localtime::duration::make_schema")]
pub gossip_max_age: LocalDuration,
/// Maximum number of concurrent fetches per peer connection.
pub fetch_concurrency: usize,
@@ -135,13 +141,20 @@ impl Default for Limits {
}
}
+/// for JsonSchema
+/// https://graham.cool/schemars/examples/5-remote_derive/
+#[derive(JsonSchema)]
+#[serde(remote = "ByteSize")]
+pub struct ByteSizeDef(pub u64);
+
/// Limiter for byte streams.
///
/// Default: 500MiB
-#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
#[serde(into = "String", try_from = "String")]
pub struct FetchPackSizeLimit {
+ #[serde(with = "ByteSizeDef")]
limit: bytesize::ByteSize,
}
@@ -213,7 +226,7 @@ impl Default for FetchPackSizeLimit {
}
/// Connection limits.
-#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
pub struct ConnectionLimits {
/// Max inbound connections.
@@ -232,7 +245,7 @@ impl Default for ConnectionLimits {
}
/// Rate limts for a single connection.
-#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
pub struct RateLimit {
pub fill_rate: f64,
@@ -240,7 +253,7 @@ pub struct RateLimit {
}
/// Rate limits for inbound and outbound connections.
-#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
pub struct RateLimits {
pub inbound: RateLimit,
@@ -263,9 +276,13 @@ impl Default for RateLimits {
}
/// Full address used to connect to a remote node.
-#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, Hash)]
+#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, Hash, JsonSchema)]
#[serde(transparent)]
-pub struct ConnectAddress(#[serde(with = "crate::serde_ext::string")] PeerAddr<NodeId, Address>);
+pub struct ConnectAddress(
+ #[serde(with = "crate::serde_ext::string")]
+ #[schemars(schema_with = "crate::serde_ext::string::make_schema")]
+ PeerAddr<NodeId, Address>,
+);
impl From<PeerAddr<NodeId, Address>> for ConnectAddress {
fn from(value: PeerAddr<NodeId, Address>) -> Self {
@@ -300,7 +317,7 @@ impl Deref for ConnectAddress {
}
/// Peer configuration.
-#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase", tag = "type")]
pub enum PeerConfig {
/// Static peer set. Connect to the configured peers and maintain the connections.
@@ -316,7 +333,7 @@ impl Default for PeerConfig {
}
/// Relay configuration.
-#[derive(Debug, Copy, Clone, Default, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Copy, Clone, Default, serde::Serialize, serde::Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
pub enum Relay {
/// Always relay messages.
@@ -329,7 +346,7 @@ pub enum Relay {
}
/// Proxy configuration.
-#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase", tag = "mode")]
pub enum AddressConfig {
/// Proxy connections to this address type.
@@ -343,7 +360,9 @@ pub enum AddressConfig {
}
/// Default seeding policy. Applies when no repository policies for the given repo are found.
-#[derive(Debug, Copy, Clone, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
+#[derive(
+ Debug, Copy, Clone, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize, JsonSchema,
+)]
#[serde(rename_all = "camelCase", tag = "default")]
pub enum DefaultSeedingPolicy {
/// Allow seeding.
@@ -379,7 +398,7 @@ impl From<DefaultSeedingPolicy> for SeedingPolicy {
}
/// Service configuration.
-#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
pub struct Config {
/// Node alias.
@@ -409,6 +428,7 @@ pub struct Config {
/// Log level.
#[serde(default = "defaults::log")]
#[serde(with = "crate::serde_ext::string")]
+ #[schemars(schema_with = "crate::serde_ext::string::make_schema")]
pub log: log::Level,
/// Whether or not our node should relay messages.
#[serde(default, deserialize_with = "crate::serde_ext::ok_or_default")]
diff --git a/radicle/src/node/policy.rs b/radicle/src/node/policy.rs
index 8a128816..9aeeb9c8 100644
--- a/radicle/src/node/policy.rs
+++ b/radicle/src/node/policy.rs
@@ -1,6 +1,8 @@
pub mod config;
pub mod store;
+use schemars::JsonSchema;
+
use std::fmt;
use std::str::FromStr;
@@ -157,7 +159,9 @@ impl TryFrom<&sqlite::Value> for Policy {
}
/// Follow scope of a seeded repository.
-#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
+#[derive(
+ Default, Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, JsonSchema,
+)]
#[serde(rename_all = "camelCase")]
pub enum Scope {
/// Seed remotes that are explicitly followed.
diff --git a/radicle/src/profile/config.rs b/radicle/src/profile/config.rs
index f00d5d3b..9f73cee3 100644
--- a/radicle/src/profile/config.rs
+++ b/radicle/src/profile/config.rs
@@ -2,6 +2,8 @@ use std::io::Write;
use std::path::Path;
use std::{fmt, fs, io};
+use schemars::JsonSchema;
+
use serde::Serialize as _;
use serde_json as json;
use thiserror::Error;
@@ -23,7 +25,7 @@ pub enum ConfigError {
}
/// Local radicle configuration.
-#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
pub struct Config {
/// Public explorer. This is used for generating links.
diff --git a/radicle/src/serde_ext.rs b/radicle/src/serde_ext.rs
index 9a32ddbb..d48ee6a6 100644
--- a/radicle/src/serde_ext.rs
+++ b/radicle/src/serde_ext.rs
@@ -29,6 +29,12 @@ pub mod string {
.parse()
.map_err(de::Error::custom)
}
+ /// custom de-serialization needs custom JsonSchema generators
+ /// source: https://graham.cool/schemars/examples/7-custom_serialization/
+ use schemars::{schema::Schema, JsonSchema, SchemaGenerator};
+ pub fn make_schema(generator: &mut SchemaGenerator) -> Schema {
+ return String::json_schema(generator);
+ }
}
/// Unlike the default `serde` instances from `localtime`, this encodes and decodes using seconds
@@ -102,6 +108,14 @@ pub mod localtime {
Ok(LocalDuration::from_secs(seconds))
}
+ use schemars::schema::{Schema, SchemaObject};
+ use schemars::{r#gen::SchemaGenerator, schema_for, JsonSchema};
+
+ pub fn make_schema(generator: &mut SchemaGenerator) -> Schema {
+ let mut schema: SchemaObject = <String>::json_schema(generator).into();
+ schema.format = Some("duration".to_owned());
+ schema.into()
+ }
}
}
@@ -125,7 +139,7 @@ where
mod test {
use super::*;
- use ::localtime::LocalTime;
+ use localtime::LocalTime;
#[test]
fn test_localtime() {
diff --git a/radicle/src/web.rs b/radicle/src/web.rs
index 990cca12..c11af84e 100644
--- a/radicle/src/web.rs
+++ b/radicle/src/web.rs
@@ -1,11 +1,10 @@
-use std::collections::HashSet;
-
-use serde::{Deserialize, Serialize};
-
use crate::prelude::RepoId;
+use schemars::JsonSchema;
+use serde::{Deserialize, Serialize};
+use std::collections::HashSet;
/// Web configuration.
-#[derive(Clone, Debug, Default, Serialize, Deserialize)]
+#[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
pub struct Config {
/// Pinned content.
@@ -23,7 +22,7 @@ pub struct Config {
/// Pinned content. This can be used to pin certain content when
/// listing, e.g. pin repositories on a web client.
-#[derive(Clone, Debug, Default, Serialize, Deserialize)]
+#[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
pub struct Pinned {
/// Pinned repositories.
Exit code: 0
shell: 'cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny warnings cargo build --all-targets --workspace cargo doc --workspace --no-deps cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 12eb4842-e0ec-4ea2-a5ed-1c3edc483980 -v /opt/radcis/ci.rad.levitte.org/cci/state/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/s:/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w:/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w -w /12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:bookworm bash /12eb4842-e0ec-4ea2-a5ed-1c3edc483980/s/script.sh
+ cargo --version
info: syncing channel updates for '1.85-x86_64-unknown-linux-gnu'
info: latest update on 2025-03-18, rust version 1.85.1 (4eb161250 2025-03-15)
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.85.1 (d73d2caf9 2024-12-31)
+ rustc --version
rustc 1.85.1 (4eb161250 2025-03-15)
+ cargo fmt --check
+ cargo clippy --all-targets --workspace -- --deny warnings
Updating crates.io index
Downloading crates ...
Downloaded data-encoding-macro v0.1.14
Downloaded aead v0.5.2
Downloaded aho-corasick v1.1.3
Downloaded git2 v0.19.0
Downloaded radicle-surf v0.22.0
Downloaded spki v0.7.3
Downloaded shlex v1.3.0
Downloaded bcrypt-pbkdf v0.10.0
Downloaded ascii v1.1.0
Downloaded ff v0.13.0
Downloaded tree-sitter-language v0.1.2
Downloaded thiserror-impl v1.0.69
Downloaded xattr v1.3.1
Downloaded utf8_iter v1.0.4
Downloaded gix-command v0.4.1
Downloaded universal-hash v0.5.1
Downloaded gix-prompt v0.9.1
Downloaded tinystr v0.7.6
Downloaded socket2 v0.5.7
Downloaded rand_core v0.6.4
Downloaded anstyle-query v1.0.2
Downloaded unicode-display-width v0.3.0
Downloaded ssh-encoding v0.2.0
Downloaded tempfile v3.10.1
Downloaded snapbox v0.4.17
Downloaded colored v2.1.0
Downloaded signature v1.6.4
Downloaded winnow v0.6.26
Downloaded gix-lock v15.0.1
Downloaded serde_derive_internals v0.29.1
Downloaded form_urlencoded v1.2.1
Downloaded crypto-bigint v0.5.5
Downloaded cyphergraphy v0.3.0
Downloaded base64 v0.21.7
Downloaded syn v2.0.89
Downloaded bytesize v2.0.1
Downloaded vcpkg v0.2.15
Downloaded pkcs1 v0.7.5
Downloaded inout v0.1.3
Downloaded rsa v0.9.6
Downloaded anstream v0.6.13
Downloaded icu_properties v1.5.1
Downloaded num-traits v0.2.18
Downloaded litemap v0.7.5
Downloaded cfg-if v1.0.0
Downloaded tree-sitter-html v0.23.2
Downloaded tree-sitter-css v0.23.1
Downloaded shell-words v1.1.0
Downloaded qcheck v1.0.0
Downloaded sha2 v0.10.8
Downloaded regex-syntax v0.8.5
Downloaded bstr v1.9.1
Downloaded git-ref-format v0.3.0
Downloaded tinyvec_macros v0.1.1
Downloaded p256 v0.13.2
Downloaded memmap2 v0.9.4
Downloaded crc32fast v1.4.0
Downloaded icu_locid_transform v1.5.0
Downloaded normalize-line-endings v0.3.0
Downloaded snapbox-macros v0.3.8
Downloaded digest v0.10.7
Downloaded amplify_syn v2.0.1
Downloaded block-padding v0.3.3
Downloaded idna_adapter v1.2.0
Downloaded flate2 v1.1.1
Downloaded tree-sitter-highlight v0.24.4
Downloaded siphasher v0.3.11
Downloaded pbkdf2 v0.12.2
Downloaded poly1305 v0.8.0
Downloaded gix-tempfile v15.0.0
Downloaded termion v2.0.3
Downloaded synstructure v0.13.1
Downloaded rand_chacha v0.3.1
Downloaded base64ct v1.6.0
Downloaded git-ref-format-core v0.3.0
Downloaded amplify v4.6.0
Downloaded gix-object v0.46.1
Downloaded gix-hash v0.15.1
Downloaded data-encoding v2.5.0
Downloaded gix-commitgraph v0.25.1
Downloaded write16 v1.0.0
Downloaded escargot v0.5.10
Downloaded faster-hex v0.9.0
Downloaded data-encoding-macro-internal v0.1.12
Downloaded ctr v0.9.2
Downloaded either v1.11.0
Downloaded displaydoc v0.2.5
Downloaded writeable v0.5.5
Downloaded gix-date v0.9.4
Downloaded getrandom v0.2.15
Downloaded icu_normalizer_data v1.5.1
Downloaded proc-macro-error-attr v1.0.4
Downloaded multibase v0.9.1
Downloaded gix-diff v0.49.0
Downloaded arc-swap v1.7.1
Downloaded aes-gcm v0.10.3
Downloaded crossbeam-utils v0.8.19
Downloaded cypheraddr v0.4.0
Downloaded utf16_iter v1.0.5
Downloaded base64 v0.22.1
Downloaded tree-sitter-toml-ng v0.6.0
Downloaded timeago v0.4.2
Downloaded signature v2.2.0
Downloaded sem_safe v0.2.0
Downloaded thiserror v1.0.69
Downloaded gix-quote v0.4.15
Downloaded git-ref-format-macro v0.3.0
Downloaded elliptic-curve v0.13.8
Downloaded utf8parse v0.2.1
Downloaded stable_deref_trait v1.2.0
Downloaded rfc6979 v0.4.0
Downloaded subtle v2.5.0
Downloaded sqlite3-sys v0.15.2
Downloaded scopeguard v1.2.0
Downloaded same-file v1.0.6
Downloaded const-oid v0.9.6
Downloaded dyn-clone v1.0.17
Downloaded autocfg v1.2.0
Downloaded cipher v0.4.4
Downloaded zerofrom v0.1.6
Downloaded sha1_smol v1.0.0
Downloaded thiserror-impl v2.0.12
Downloaded byteorder v1.5.0
Downloaded unicode-width v0.1.11
Downloaded group v0.13.0
Downloaded sqlite v0.32.0
Downloaded socks5-client v0.4.1
Downloaded siphasher v1.0.1
Downloaded ghash v0.5.1
Downloaded errno v0.3.9
Downloaded zerovec v0.10.4
Downloaded der v0.7.9
Downloaded walkdir v2.5.0
Downloaded version_check v0.9.4
Downloaded emojis v0.6.4
Downloaded termion v3.0.0
Downloaded streaming-iterator v0.1.9
Downloaded typenum v1.17.0
Downloaded quote v1.0.36
Downloaded spin v0.9.8
Downloaded gix-chunk v0.4.11
Downloaded aes v0.8.4
Downloaded gix-trace v0.1.12
Downloaded bloomy v1.2.0
Downloaded num-integer v0.1.46
Downloaded yansi v0.5.1
Downloaded ssh-cipher v0.2.0
Downloaded scrypt v0.11.0
Downloaded numtoa v0.1.0
Downloaded salsa20 v0.10.2
Downloaded yoke v0.7.5
Downloaded gix-features v0.39.1
Downloaded lock_api v0.4.11
Downloaded zeroize v1.7.0
Downloaded pkg-config v0.3.30
Downloaded netservices v0.8.0
Downloaded yoke-derive v0.7.5
Downloaded serde_derive v1.0.219
Downloaded parking_lot_core v0.9.9
Downloaded tree-sitter-json v0.24.8
Downloaded p521 v0.13.3
Downloaded smallvec v1.13.2
Downloaded similar v2.5.0
Downloaded gix-pack v0.56.0
Downloaded icu_properties_data v1.5.1
Downloaded gix-transport v0.44.0
Downloaded gix-ref v0.49.1
Downloaded serde_json v1.0.116
Downloaded linux-raw-sys v0.4.13
Downloaded libm v0.2.8
Downloaded ssh-key v0.6.6
Downloaded nonempty v0.5.0
Downloaded gix-config-value v0.14.12
Downloaded colorchoice v1.0.0
Downloaded opaque-debug v0.3.1
Downloaded num-bigint-dig v0.8.4
Downloaded base-x v0.2.11
Downloaded chacha20poly1305 v0.10.1
Downloaded generic-array v0.14.7
Downloaded popol v3.0.0
Downloaded gix-credentials v0.26.0
Downloaded fxhash v0.2.1
Downloaded filetime v0.2.23
Downloaded ed25519 v1.5.3
Downloaded diff v0.1.13
Downloaded amplify_derive v4.0.0
Downloaded fastrand v2.1.0
Downloaded block-buffer v0.10.4
Downloaded inquire v0.7.5
Downloaded cpufeatures v0.2.12
Downloaded gix-protocol v0.47.0
Downloaded indexmap v2.2.6
Downloaded pem-rfc7468 v0.7.0
Downloaded lazy_static v1.5.0
Downloaded gix-negotiate v0.17.0
Downloaded unicode-segmentation v1.11.0
Downloaded gix-actor v0.33.2
Downloaded ecdsa v0.16.9
Downloaded ct-codecs v1.1.1
Downloaded crypto-common v0.1.6
Downloaded base64 v0.13.1
Downloaded radicle-std-ext v0.1.0
Downloaded anyhow v1.0.82
Downloaded anstyle v1.0.6
Downloaded gix-validate v0.9.4
Downloaded tree-sitter-go v0.23.4
Downloaded zerovec-derive v0.10.3
Downloaded chrono v0.4.38
Downloaded icu_provider v1.5.0
Downloaded once_cell v1.19.0
Downloaded schemars v0.8.22
Downloaded gix-sec v0.10.12
Downloaded rand v0.8.5
Downloaded icu_collections v1.5.0
Downloaded adler2 v2.0.0
Downloaded cyphernet v0.5.2
Downloaded icu_provider_macros v1.5.0
Downloaded bitflags v2.5.0
Downloaded itoa v1.0.11
Downloaded icu_normalizer v1.5.0
Downloaded pkcs8 v0.10.2
Downloaded gix-refspec v0.27.0
Downloaded hashbrown v0.14.3
Downloaded gix-shallow v0.1.0
Downloaded jiff v0.2.1
Downloaded newline-converter v0.3.0
Downloaded tree-sitter-python v0.23.4
Downloaded gix-hashtable v0.6.0
Downloaded localtime v1.3.1
Downloaded num-iter v0.1.44
Downloaded nonempty v0.9.0
Downloaded gix-traverse v0.43.1
Downloaded base32 v0.4.0
Downloaded schemars_derive v0.8.22
Downloaded cc v1.2.2
Downloaded gix-odb v0.66.0
Downloaded log v0.4.21
Downloaded serde v1.0.219
Downloaded io-reactor v0.5.2
Downloaded tree-sitter v0.24.4
Downloaded gix-utils v0.1.14
Downloaded url v2.5.4
Downloaded libz-sys v1.1.16
Downloaded gix-revision v0.31.1
Downloaded icu_locid_transform_data v1.5.1
Downloaded gix-path v0.10.15
Downloaded ryu v1.0.17
Downloaded phf v0.11.3
Downloaded percent-encoding v2.3.1
Downloaded lexopt v0.3.0
Downloaded primeorder v0.13.6
Downloaded noise-framework v0.4.0
Downloaded keccak v0.1.5
Downloaded proc-macro-error v1.0.4
Downloaded memchr v2.7.2
Downloaded pretty_assertions v1.4.0
Downloaded tree-sitter-c v0.23.2
Downloaded syn v1.0.109
Downloaded miniz_oxide v0.8.8
Downloaded regex v1.11.1
Downloaded iana-time-zone v0.1.60
Downloaded idna v1.0.3
Downloaded tree-sitter-rust v0.23.2
Downloaded tree-sitter-bash v0.23.3
Downloaded rustix v0.38.34
Downloaded jobserver v0.1.31
Downloaded prodash v29.0.2
Downloaded tree-sitter-typescript v0.23.2
Downloaded qcheck-macros v1.0.0
Downloaded p384 v0.13.0
Downloaded gix-url v0.28.2
Downloaded tree-sitter-ruby v0.23.1
Downloaded polyval v0.6.2
Downloaded regex-automata v0.4.9
Downloaded phf_shared v0.11.3
Downloaded tree-sitter-md v0.3.2
Downloaded ppv-lite86 v0.2.17
Downloaded unicode-normalization v0.1.23
Downloaded anstyle-parse v0.2.3
Downloaded amplify_num v0.5.2
Downloaded radicle-git-ext v0.8.0
Downloaded home v0.5.9
Downloaded hmac v0.12.1
Downloaded tinyvec v1.6.0
Downloaded maybe-async v0.2.10
Downloaded thiserror v2.0.12
Downloaded ec25519 v0.1.0
Downloaded proc-macro2 v1.0.92
Downloaded parking_lot v0.12.1
Downloaded tar v0.4.40
Downloaded gix-fs v0.12.1
Downloaded zerofrom-derive v0.1.6
Downloaded gix-packetline v0.18.4
Downloaded chacha20 v0.9.1
Downloaded icu_locid v1.5.0
Downloaded base16ct v0.2.0
Downloaded unicode-ident v1.0.12
Downloaded crossbeam-channel v0.5.15
Downloaded signals_receipts v0.2.0
Downloaded cbc v0.1.2
Downloaded blowfish v0.9.1
Downloaded sec1 v0.7.3
Downloaded gix-revwalk v0.17.0
Downloaded libc v0.2.155
Downloaded libgit2-sys v0.17.0+1.8.1
Downloaded equivalent v1.0.1
Downloaded sqlite3-src v0.5.1
Downloaded sha3 v0.10.8
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 typenum v1.17.0
Checking getrandom v0.2.15
Compiling quote v1.0.36
Compiling generic-array v0.14.7
Compiling jobserver v0.1.31
Compiling syn v2.0.89
Compiling serde v1.0.219
Compiling cc v1.2.2
Checking aho-corasick v1.1.3
Checking regex-syntax v0.8.5
Checking rand_core v0.6.4
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 subtle v2.5.0
Checking regex-automata v0.4.9
Checking bitflags v2.5.0
Compiling syn v1.0.109
Checking once_cell v1.19.0
Checking stable_deref_trait v1.2.0
Checking zeroize v1.7.0
Checking tinyvec_macros v0.1.1
Checking cpufeatures v0.2.12
Checking tinyvec v1.6.0
Compiling synstructure v0.13.1
Checking bstr v1.9.1
Compiling crc32fast v1.4.0
Checking unicode-normalization v0.1.23
Checking block-padding v0.3.3
Checking litemap v0.7.5
Compiling icu_locid_transform_data v1.5.1
Checking writeable v0.5.5
Checking inout v0.1.3
Checking block-buffer v0.10.4
Compiling pkg-config v0.3.30
Compiling serde_derive v1.0.219
Compiling zerofrom-derive v0.1.6
Compiling yoke-derive v0.7.5
Compiling zerovec-derive v0.10.3
Checking zerofrom v0.1.6
Compiling displaydoc v0.2.5
Checking yoke v0.7.5
Compiling icu_provider_macros v1.5.0
Compiling icu_properties_data v1.5.1
Checking digest v0.10.7
Checking zerovec v0.10.4
Checking cipher v0.4.4
Compiling icu_normalizer_data v1.5.1
Compiling thiserror v1.0.69
Compiling thiserror-impl v1.0.69
Checking tinystr v0.7.6
Checking icu_collections v1.5.0
Checking icu_locid v1.5.0
Checking icu_provider v1.5.0
Checking utf16_iter v1.0.5
Checking utf8_iter v1.0.4
Checking write16 v1.0.0
Checking icu_locid_transform v1.5.0
Checking itoa v1.0.11
Checking hashbrown v0.14.3
Checking icu_properties v1.5.1
Compiling rustix v0.38.34
Checking sha2 v0.10.8
Checking linux-raw-sys v0.4.13
Checking percent-encoding v2.3.1
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
Compiling libz-sys v1.1.16
Checking icu_normalizer v1.5.0
Checking byteorder v1.5.0
Compiling data-encoding v2.5.0
Compiling amplify_derive v4.0.0
Checking idna_adapter v1.2.0
Checking signature v1.6.4
Checking idna v1.0.3
Checking ascii v1.1.0
Compiling data-encoding-macro-internal v0.1.12
Checking url v2.5.4
Checking amplify_num v0.5.2
Checking ed25519 v1.5.3
Checking tempfile v3.10.1
Checking data-encoding-macro v0.1.14
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 multibase v0.9.1
Checking ec25519 v0.1.0
Checking poly1305 v0.8.0
Checking amplify v4.6.0
Checking chacha20 v0.9.1
Compiling proc-macro-error v1.0.4
Checking cyphergraphy v0.3.0
Checking keccak v0.1.5
Compiling git-ref-format-core v0.3.0
Checking sha3 v0.10.8
Checking polyval v0.6.2
Checking hmac v0.12.1
Compiling sqlite3-src v0.5.1
Checking ppv-lite86 v0.2.17
Checking base64ct v1.6.0
Compiling thiserror v2.0.12
Checking base32 v0.4.0
Checking cypheraddr v0.4.0
Checking pem-rfc7468 v0.7.0
Checking rand_chacha v0.3.1
Checking pbkdf2 v0.12.2
Compiling git-ref-format-macro v0.3.0
Checking ghash v0.5.1
Checking chacha20poly1305 v0.10.1
Checking ctr v0.9.2
Checking aes v0.8.4
Compiling thiserror-impl v2.0.12
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.15
Checking qcheck v1.0.0
Checking radicle-ssh v0.9.0 (/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/radicle-ssh)
Compiling serde_json v1.0.116
Checking equivalent v1.0.1
Compiling num-traits v0.2.18
Checking indexmap v2.2.6
Checking ryu v1.0.17
Checking dyn-clone v1.0.17
Checking tree-sitter-language v0.1.2
Checking siphasher v1.0.1
Checking nonempty v0.9.0
Compiling serde_derive_internals v0.29.1
Compiling lock_api v0.4.11
Checking radicle-dag v0.10.0 (/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/radicle-dag)
Checking lazy_static v1.5.0
Compiling anyhow v1.0.82
Compiling schemars v0.8.22
Compiling parking_lot_core v0.9.9
Compiling schemars_derive v0.8.22
Checking scopeguard v1.2.0
Checking gix-trace v0.1.12
Checking anstyle-query v1.0.2
Checking iana-time-zone v0.1.60
Checking chrono v0.4.38
Checking colored v2.1.0
Checking bytesize v2.0.1
Checking localtime v1.3.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 errno v0.3.9
Checking sem_safe v0.2.0
Checking colorchoice v1.0.0
Checking anstyle v1.0.6
Checking signals_receipts v0.2.0
Checking anstream v0.6.13
Checking gix-utils v0.1.14
Checking adler2 v2.0.0
Checking snapbox-macros v0.3.8
Checking gix-hash v0.15.1
Checking miniz_oxide v0.8.8
Checking normalize-line-endings v0.3.0
Checking same-file v1.0.6
Checking similar v2.5.0
Checking walkdir v2.5.0
Checking snapbox v0.4.17
Checking flate2 v1.1.1
Checking radicle-signals v0.11.0 (/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/radicle-signals)
Checking prodash v29.0.2
Compiling tree-sitter v0.24.4
Checking sha1_smol v1.0.0
Checking gix-features v0.39.1
Checking numtoa v0.1.0
Checking unicode-segmentation v1.11.0
Checking yansi v0.5.1
Checking diff v0.1.13
Checking pretty_assertions v1.4.0
Compiling filetime v0.2.23
Compiling xattr v1.3.1
Compiling escargot v0.5.10
Checking home v0.5.9
Checking lexopt v0.3.0
Checking gix-path v0.10.15
Compiling tar v0.4.40
Checking sqlite3-sys v0.15.2
Checking sqlite v0.32.0
Checking newline-converter v0.3.0
Checking termion v2.0.3
Checking fxhash v0.2.1
Checking regex v1.11.1
Checking unicode-width v0.1.11
Checking streaming-iterator v0.1.9
Checking inquire v0.7.5
Compiling radicle-surf v0.22.0
Checking unicode-display-width v0.3.0
Checking termion v3.0.0
Compiling tree-sitter-css v0.23.1
Compiling tree-sitter-c v0.23.2
Compiling tree-sitter-md v0.3.2
Compiling tree-sitter-bash v0.23.3
Compiling tree-sitter-ruby v0.23.1
Compiling tree-sitter-typescript v0.23.2
Compiling tree-sitter-json v0.24.8
Compiling tree-sitter-html v0.23.2
Compiling tree-sitter-toml-ng v0.6.0
Compiling tree-sitter-go v0.23.4
Compiling tree-sitter-rust v0.23.2
Compiling tree-sitter-python v0.23.4
Checking nonempty v0.5.0
Checking base64 v0.13.1
Compiling radicle-cli v0.12.1 (/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/radicle-cli)
Checking tree-sitter-highlight v0.24.4
Checking timeago v0.4.2
Checking jiff v0.2.1
Checking winnow v0.6.26
Checking gix-hashtable v0.6.0
Checking gix-validate v0.9.4
Checking memmap2 v0.9.4
Checking gix-chunk v0.4.11
Checking gix-fs v0.12.1
Checking gix-commitgraph v0.25.1
Checking gix-tempfile v15.0.0
Checking shell-words v1.1.0
Checking gix-lock v15.0.1
Checking gix-command v0.4.1
Checking gix-url v0.28.2
Checking gix-config-value v0.14.12
Checking gix-quote v0.4.15
Checking gix-sec v0.10.12
Checking gix-prompt v0.9.1
Checking gix-packetline v0.18.4
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 gix-date v0.9.4
Checking popol v3.0.0
Checking gix-actor v0.33.2
Checking either v1.11.0
Checking io-reactor v0.5.2
Checking gix-object v0.46.1
Checking salsa20 v0.10.2
Checking socket2 v0.5.7
Checking siphasher v0.3.11
Compiling radicle-node v0.10.0 (/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/radicle-node)
Checking gix-revwalk v0.17.0
Checking gix-diff v0.49.0
Checking gix-ref v0.49.1
Checking gix-revision v0.31.1
Checking gix-traverse v0.43.1
Checking gix-refspec v0.27.0
Checking gix-pack v0.56.0
Checking gix-negotiate v0.17.0
Checking netservices v0.8.0
Checking gix-protocol v0.47.0
Checking bloomy v1.2.0
Checking scrypt v0.11.0
Checking radicle-systemd v0.9.0 (/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/radicle-systemd)
Checking gix-odb v0.66.0
Compiling qcheck-macros v1.0.0
Compiling radicle-remote-helper v0.10.0 (/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/radicle-remote-helper)
Checking phf_shared v0.11.3
Checking phf v0.11.3
Checking emojis v0.6.4
Checking git2 v0.19.0
Checking radicle-git-ext v0.8.0
Checking radicle-term v0.12.0 (/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/radicle-term)
Checking radicle-crypto v0.11.0 (/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/radicle-crypto)
Checking radicle-cob v0.13.0 (/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/radicle-cob)
Checking radicle-crdt v0.1.0 (/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/radicle-crdt)
Checking radicle v0.14.0 (/12eb4842-e0ec-4ea2-a5ed-1c3edc483980/w/radicle)
error[E0432]: unresolved import `localtime::LocalTime`
--> radicle/src/serde_ext.rs:142:9
|
142 | use localtime::LocalTime;
| ^^^^^^^^^^^^^^^^^^^^ no `LocalTime` in `serde_ext::localtime`
|
help: consider importing this struct instead
|
142 | use ::localtime::LocalTime;
| ~~~~~~~~~~~~~~~~~~~~~~
error: unused import: `schema_for`
--> radicle/src/serde_ext.rs:112:48
|
112 | use schemars::{r#gen::SchemaGenerator, schema_for, JsonSchema};
| ^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
error[E0659]: `localtime` is ambiguous
--> radicle/src/serde_ext.rs:142:9
|
142 | use localtime::LocalTime;
| ^^^^^^^^^ ambiguous name
|
= note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
= note: `localtime` could refer to a crate passed with `--extern`
= help: use `::localtime` to refer to this crate unambiguously
note: `localtime` could also refer to the module imported here
--> radicle/src/serde_ext.rs:140:9
|
140 | use super::*;
| ^^^^^^^^
= help: consider adding an explicit import of `localtime` to disambiguate
= help: or use `self::localtime` to refer to this module unambiguously
Some errors have detailed explanations: E0432, E0659.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `radicle` (lib test) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: unneeded `return` statement
--> radicle/src/serde_ext.rs:36:9
|
36 | return String::json_schema(generator);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `-D clippy::needless-return` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_return)]`
help: remove `return`
|
36 - return String::json_schema(generator);
36 + String::json_schema(generator)
|
error: could not compile `radicle` (lib) due to 2 previous errors
Exit code: 101
{
"response": "finished",
"result": "failure"
}