Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
Upgrade radicle crates to latest versions
Rūdolfs Ošiņš committed 2 months ago
commit c21389a8281ab2dce79ef1ddfb2022c93412a5ab
parent 1b6d283
10 files changed +360 -120
modified radicle-httpd/Cargo.lock
@@ -409,7 +409,7 @@ dependencies = [
 "android-tzdata",
 "iana-time-zone",
 "num-traits",
-
 "windows-link",
+
 "windows-link 0.1.3",
]

[[package]]
@@ -423,6 +423,19 @@ dependencies = [
]

[[package]]
+
name = "console"
+
version = "0.16.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "03e45a4a8926227e4197636ba97a9fc9b00477e9f4bd711395687c5f0734bec4"
+
dependencies = [
+
 "encode_unicode",
+
 "libc",
+
 "once_cell",
+
 "unicode-width 0.2.2",
+
 "windows-sys 0.61.2",
+
]
+

+
[[package]]
name = "const-oid"
version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -700,6 +713,12 @@ dependencies = [
]

[[package]]
+
name = "dunce"
+
version = "1.0.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
+

+
[[package]]
name = "dyn-clone"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -759,6 +778,12 @@ dependencies = [
]

[[package]]
+
name = "encode_unicode"
+
version = "1.0.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0"
+

+
[[package]]
name = "equivalent"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -820,12 +845,12 @@ dependencies = [

[[package]]
name = "flate2"
-
version = "1.0.33"
+
version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253"
+
checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
dependencies = [
 "crc32fast",
-
 "miniz_oxide 0.8.0",
+
 "miniz_oxide 0.8.9",
]

[[package]]
@@ -999,9 +1024,9 @@ checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"

[[package]]
name = "git-ref-format"
-
version = "0.3.1"
+
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "7428e0d6e549a9a613d6f019b839a0f5142c331295b79e119ca8f4faac145da1"
+
checksum = "ed6913a77cee9e231cab93577c9a5eea84a1344ab39294d91dc075b3c24499d0"
dependencies = [
 "git-ref-format-core",
 "git-ref-format-macro",
@@ -1009,9 +1034,9 @@ dependencies = [

[[package]]
name = "git-ref-format-core"
-
version = "0.3.1"
+
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "bbaeb9672a55e9e32cb6d3ef781e7526b25ab97d499fae71615649340b143424"
+
checksum = "1955ef3abddd586f24c834d28f959d610157ab5cb71f2200911932a0018d0364"
dependencies = [
 "serde",
 "thiserror 1.0.63",
@@ -1019,21 +1044,21 @@ dependencies = [

[[package]]
name = "git-ref-format-macro"
-
version = "0.3.1"
+
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "3b6ca5353accc201f6324dff744ba4660099546d4daf187ba868f07562e36ca4"
+
checksum = "4e730f09c82961c28f5465b83da0aa5c2716156ce57da33a1fa51bbd560aa5f7"
dependencies = [
 "git-ref-format-core",
-
 "proc-macro-error",
+
 "proc-macro-error2",
 "quote",
 "syn 2.0.87",
]

[[package]]
name = "git2"
-
version = "0.19.0"
+
version = "0.20.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724"
+
checksum = "7b88256088d75a56f8ecfa070513a775dd9107f6530ef14919dac831af9cfe2b"
dependencies = [
 "bitflags 2.9.1",
 "libc",
@@ -1310,6 +1335,19 @@ dependencies = [
]

[[package]]
+
name = "indicatif"
+
version = "0.18.4"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb"
+
dependencies = [
+
 "console",
+
 "portable-atomic",
+
 "unicode-width 0.2.2",
+
 "unit-prefix",
+
 "web-time",
+
]
+

+
[[package]]
name = "infer"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1342,7 +1380,7 @@ dependencies = [
 "once_cell",
 "tempfile",
 "unicode-segmentation",
-
 "unicode-width",
+
 "unicode-width 0.1.13",
]

[[package]]
@@ -1412,9 +1450,9 @@ checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"

[[package]]
name = "libgit2-sys"
-
version = "0.17.0+1.8.1"
+
version = "0.18.3+1.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224"
+
checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487"
dependencies = [
 "cc",
 "libc",
@@ -1476,15 +1514,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5e54036fe321fd421e10d732f155734c4e4afd610dd556d9a82833ab3ee0bed"

[[package]]
-
name = "localtime"
-
version = "1.3.1"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "016a009e0bb8ba6e3229fb74bf11a8fe6ef24542cc6ef35ef38863ac13f96d87"
-
dependencies = [
-
 "serde",
-
]
-

-
[[package]]
name = "lock_api"
version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1531,6 +1560,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"

[[package]]
+
name = "memoffset"
+
version = "0.9.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
+
dependencies = [
+
 "autocfg",
+
]
+

+
[[package]]
name = "mime"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1557,11 +1595,12 @@ dependencies = [

[[package]]
name = "miniz_oxide"
-
version = "0.8.0"
+
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
+
checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
dependencies = [
 "adler2",
+
 "simd-adler32",
]

[[package]]
@@ -1885,6 +1924,12 @@ dependencies = [
]

[[package]]
+
name = "portable-atomic"
+
version = "1.13.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
+

+
[[package]]
name = "potential_utf"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1928,27 +1973,25 @@ dependencies = [
]

[[package]]
-
name = "proc-macro-error"
-
version = "1.0.4"
+
name = "proc-macro-error-attr2"
+
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+
checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5"
dependencies = [
-
 "proc-macro-error-attr",
 "proc-macro2",
 "quote",
-
 "syn 1.0.109",
-
 "version_check",
]

[[package]]
-
name = "proc-macro-error-attr"
-
version = "1.0.4"
+
name = "proc-macro-error2"
+
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+
checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802"
dependencies = [
+
 "proc-macro-error-attr2",
 "proc-macro2",
 "quote",
-
 "version_check",
+
 "syn 2.0.87",
]

[[package]]
@@ -1986,28 +2029,31 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"

[[package]]
name = "radicle"
-
version = "0.18.0"
+
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "d7619819155800f9a358b19f42ba07f878c9af017fa1ed92a59fbf3ab21c3aa6"
+
checksum = "bed19c0448cb77a8be9c7a5b6fc00a884d10434e679ad0eb8731fe4a52534346"
dependencies = [
 "amplify",
 "base64 0.21.7",
 "bytesize",
 "crossbeam-channel",
 "cyphernet",
+
 "dunce",
 "fast-glob",
 "fastrand",
 "git2",
 "indexmap",
 "libc",
-
 "localtime",
 "log",
 "multibase",
 "nonempty 0.9.0",
 "qcheck",
 "radicle-cob",
+
 "radicle-core",
 "radicle-crypto",
-
 "radicle-git-ext",
+
 "radicle-git-ref-format",
+
 "radicle-localtime",
+
 "radicle-oid",
 "radicle-ssh",
 "serde",
 "serde-untagged",
@@ -2015,49 +2061,68 @@ dependencies = [
 "siphasher",
 "sqlite",
 "tempfile",
-
 "thiserror 1.0.63",
+
 "thiserror 2.0.14",
+
 "uds_windows",
 "unicode-normalization",
-
 "winpipe",
]

[[package]]
name = "radicle-cob"
-
version = "0.15.0"
+
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "5514b7b58e4300a766132905486ebb743248ee0444fbaf38af05f501851b7d89"
+
checksum = "bed621de031dce3c39b6c262c9a9297fab0f1e3099f78e8bffb9cd132a679d94"
dependencies = [
 "fastrand",
+
 "git-ref-format-core",
 "git2",
 "log",
 "nonempty 0.9.0",
 "radicle-crypto",
 "radicle-dag",
-
 "radicle-git-ext",
+
 "radicle-git-metadata",
+
 "radicle-oid",
 "serde",
 "serde_json",
 "signature 2.2.0",
-
 "thiserror 1.0.63",
+
 "thiserror 2.0.14",
+
]
+

+
[[package]]
+
name = "radicle-core"
+
version = "0.1.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "f797194bf12af94f8ce914520bdb54ba9f8c824621f3faa6763101dbd2e1dc79"
+
dependencies = [
+
 "git2",
+
 "multibase",
+
 "qcheck",
+
 "radicle-crypto",
+
 "radicle-oid",
+
 "schemars",
+
 "serde",
+
 "sqlite",
+
 "thiserror 2.0.14",
]

[[package]]
name = "radicle-crypto"
-
version = "0.13.0"
+
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "8cd6a14a4326268a9504e0018f1afb100fda7932342a85bd2a06e19b20e84eaa"
+
checksum = "9a615a06e20545b03f9b01f0380687262e949e976a3127fbb932cb3fdb435866"
dependencies = [
 "amplify",
 "cyphernet",
 "ec25519",
 "fastrand",
+
 "git-ref-format-core",
 "multibase",
 "qcheck",
-
 "radicle-git-ext",
 "radicle-ssh",
 "serde",
 "signature 2.2.0",
 "sqlite",
 "ssh-key",
-
 "thiserror 1.0.63",
+
 "thiserror 2.0.14",
 "zeroize",
]

@@ -2072,9 +2137,9 @@ dependencies = [

[[package]]
name = "radicle-git-ext"
-
version = "0.8.1"
+
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "4b78c26e67d1712ad5a0c602ae3b236609461372ac04e200bda359fe4a1c6650"
+
checksum = "db68f47aaf6b8352a733da684f7e24f89aeb03131598628f147ff1bcc633670d"
dependencies = [
 "git-ref-format",
 "git2",
@@ -2085,6 +2150,24 @@ dependencies = [
]

[[package]]
+
name = "radicle-git-metadata"
+
version = "0.1.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "522d7fa07dfe61981b5d96e9aeb2b7fb2f4a8d5804638e928eaedb33e423eccb"
+
dependencies = [
+
 "thiserror 2.0.14",
+
]
+

+
[[package]]
+
name = "radicle-git-ref-format"
+
version = "0.1.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "7fe7a4a8137c193d15d05a6d1eb9ef79649b52e1f659161df69ebc385bbed55c"
+
dependencies = [
+
 "git-ref-format-core",
+
]
+

+
[[package]]
name = "radicle-httpd"
version = "0.23.0"
dependencies = [
@@ -2118,6 +2201,25 @@ dependencies = [
]

[[package]]
+
name = "radicle-localtime"
+
version = "0.1.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "c5c36714fd32dc9421f8ed3edf0d1c1a4aa3b5210fddf8eaef40ea90c88fdddd"
+
dependencies = [
+
 "serde",
+
]
+

+
[[package]]
+
name = "radicle-oid"
+
version = "0.1.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "d95c486f589d4f5ef7bd8fce56419854d90cc63a8bbcebe021e0a4f4cca75ac9"
+
dependencies = [
+
 "git2",
+
 "serde",
+
]
+

+
[[package]]
name = "radicle-signals"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2141,15 +2243,15 @@ dependencies = [

[[package]]
name = "radicle-std-ext"
-
version = "0.1.1"
+
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "5310e7a04506b6ce92dc9c47b26bd24c1c680937a3dcd13cd20847f89dbda32a"
+
checksum = "fb935931bdd2a2966f3b584f3031d9d54ec0713ddbc563a0193d54e62a88ec73"

[[package]]
name = "radicle-surf"
-
version = "0.22.1"
+
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "0bf6aff57520e8e7200bf7826ddc5ccf8d4612dd880497a4f256c3d272eeb805"
+
checksum = "e2c6a29eac2e55a6d0632c8faeb3cbe91afb1e07be60d157a27fdadb8cc4c508"
dependencies = [
 "anyhow",
 "base64 0.21.7",
@@ -2167,21 +2269,22 @@ dependencies = [

[[package]]
name = "radicle-term"
-
version = "0.14.0"
+
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "16b3c8f129874f75b13c993b98e0b4af69ebe088f7a56a4fe0cc4856df7dde81"
+
checksum = "eac206ce125604521df4920f0c0c14df4e714763c0e363afdf5e65a6c8387aa9"
dependencies = [
 "anstyle-query",
-
 "anyhow",
 "crossbeam-channel",
 "crossterm 0.29.0",
+
 "indicatif",
 "inquire",
 "libc",
 "radicle-signals",
 "shlex",
-
 "thiserror 1.0.63",
+
 "thiserror 2.0.14",
 "unicode-display-width",
 "unicode-segmentation",
+
 "winsplit",
 "zeroize",
]

@@ -2225,6 +2328,26 @@ dependencies = [
]

[[package]]
+
name = "ref-cast"
+
version = "1.0.25"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d"
+
dependencies = [
+
 "ref-cast-impl",
+
]
+

+
[[package]]
+
name = "ref-cast-impl"
+
version = "1.0.25"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"
+
dependencies = [
+
 "proc-macro2",
+
 "quote",
+
 "syn 2.0.87",
+
]
+

+
[[package]]
name = "regex"
version = "1.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2344,6 +2467,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"

[[package]]
+
name = "schemars"
+
version = "1.2.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc"
+
dependencies = [
+
 "dyn-clone",
+
 "ref-cast",
+
 "schemars_derive",
+
 "serde",
+
 "serde_json",
+
]
+

+
[[package]]
+
name = "schemars_derive"
+
version = "1.2.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "7d115b50f4aaeea07e79c1912f645c7513d81715d0420f8bc77a18c6260b307f"
+
dependencies = [
+
 "proc-macro2",
+
 "quote",
+
 "serde_derive_internals",
+
 "syn 2.0.87",
+
]
+

+
[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2407,6 +2555,17 @@ dependencies = [
]

[[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.87",
+
]
+

+
[[package]]
name = "serde_json"
version = "1.0.127"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2537,6 +2696,12 @@ dependencies = [
]

[[package]]
+
name = "simd-adler32"
+
version = "0.3.8"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2"
+

+
[[package]]
name = "siphasher"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3023,6 +3188,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"

[[package]]
+
name = "uds_windows"
+
version = "1.1.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9"
+
dependencies = [
+
 "memoffset",
+
 "tempfile",
+
 "winapi",
+
]
+

+
[[package]]
name = "unicase"
version = "2.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3065,6 +3241,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d"

[[package]]
+
name = "unicode-width"
+
version = "0.2.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
+

+
[[package]]
+
name = "unit-prefix"
+
version = "0.5.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3"
+

+
[[package]]
name = "universal-hash"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3196,6 +3384,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"

[[package]]
+
name = "web-time"
+
version = "1.1.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
+
dependencies = [
+
 "js-sys",
+
 "wasm-bindgen",
+
]
+

+
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3278,6 +3476,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"

[[package]]
+
name = "windows-link"
+
version = "0.2.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+

+
[[package]]
name = "windows-result"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3324,6 +3528,15 @@ dependencies = [
]

[[package]]
+
name = "windows-sys"
+
version = "0.61.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
+
dependencies = [
+
 "windows-link 0.2.1",
+
]
+

+
[[package]]
name = "windows-targets"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3458,6 +3671,12 @@ dependencies = [
]

[[package]]
+
name = "winsplit"
+
version = "0.1.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "3ab703352da6a72f35c39a533526393725640575bb211f61987a2748323ad956"
+

+
[[package]]
name = "wit-bindgen-rt"
version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
modified radicle-httpd/Cargo.toml
@@ -33,9 +33,9 @@ lexopt = { version = "0.3.1" }
lru = { version = "0.16.0" }
mime_guess = { version = "2.0.5" }
nonempty = { version = "0.12.0", features = ["serialize"] }
-
radicle = { version = "0.18.0" }
-
radicle-surf = { version = "0.22.0", default-features = false, features = ["serde"] }
-
radicle-term = { version = "0.14.0", default-features = false }
+
radicle = { version = "0.21.0" }
+
radicle-surf = { version = "0.27.0", default-features = false, features = ["serde"] }
+
radicle-term = { version = "0.17.0", default-features = false }
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
thiserror = { version = "2" }
@@ -48,7 +48,7 @@ tracing-subscriber = { version = "0.3.19", default-features = false, features =
[dev-dependencies]
hyper = { version = "1.6", default-features = false, features = ["client"] }
pretty_assertions = { version = "1.4.1" }
-
radicle = { version = "0.18.0", features = ["test"] }
-
radicle-crypto = { version = "0.13.0", features = ["test"] }
+
radicle = { version = "0.21.0", features = ["test"] }
+
radicle-crypto = { version = "0.15.0", features = ["test"] }
tempfile = { version = "3.20.0" }
tower = { version = "0.5.2", features = ["util"] }
modified radicle-httpd/src/api/error.rs
@@ -3,6 +3,8 @@ use axum::response::{IntoResponse, Response};
use axum::Json;
use serde_json::json;

+
use radicle::git::raw::ErrorExt;
+

/// Errors relating to the API backend.
#[derive(Debug, thiserror::Error)]
pub enum Error {
@@ -104,13 +106,13 @@ impl IntoResponse for Error {
                (StatusCode::NOT_FOUND, Some(e.to_string()))
            }
            Error::Crypto(msg) => (StatusCode::BAD_REQUEST, Some(msg.to_string())),
-
            Error::Surf(radicle_surf::Error::Git(e)) if radicle::git::is_not_found_err(&e) => {
+
            Error::Surf(radicle_surf::Error::Git(e)) if e.is_not_found() => {
                (StatusCode::NOT_FOUND, Some(e.message().to_owned()))
            }
            Error::Surf(radicle_surf::Error::Directory(
                e @ radicle_surf::fs::error::Directory::PathNotFound(_),
            )) => (StatusCode::NOT_FOUND, Some(e.to_string())),
-
            Error::Git2(e) if radicle::git::is_not_found_err(&e) => {
+
            Error::Git2(e) if e.is_not_found() => {
                (StatusCode::NOT_FOUND, Some(e.message().to_owned()))
            }
            Error::Git2(e) => (
modified radicle-httpd/src/api/json/cobs.rs
@@ -1,6 +1,5 @@
use std::collections::BTreeMap;

-
use radicle_surf as surf;
use serde_json::{json, Value};

use radicle::cob;
@@ -149,8 +148,8 @@ impl<'a> Review<'a> {
fn get_refs(
    repo: &git::Repository,
    id: &cob::ActorId,
-
    head: &surf::Oid,
-
) -> Result<Vec<git::RefString>, refs::Error> {
+
    head: &radicle::git::Oid,
+
) -> Result<Vec<radicle::git::fmt::RefString>, refs::Error> {
    let remote = repo.remote(id)?;
    let refs = remote
        .refs
modified radicle-httpd/src/api/v1/delegates.rs
@@ -42,8 +42,14 @@ async fn delegates_repos_handler(
            .filter(|repo| repo.doc.delegates().iter().any(|d| *d == did))
            .collect::<Vec<_>>(),
        RepoQuery::Pinned => storage
-
            .repositories_by_id(pinned.repositories.iter())?
-
            .into_iter()
+
            .repositories_by_id(pinned.repositories.iter())
+
            .filter_map(|result| match result {
+
                Ok(repo) => Some(repo),
+
                Err(e) => {
+
                    tracing::warn!("Failed to load pinned repository: {}", e);
+
                    None
+
                }
+
            })
            .filter(|repo| repo.doc.visibility().is_public())
            .filter(|repo| repo.doc.delegates().iter().any(|d| *d == did))
            .collect::<Vec<_>>(),
modified radicle-httpd/src/api/v1/node.rs
@@ -130,7 +130,7 @@ async fn nodes_inventory_handler(
/// `GET /node/policies/repos`
async fn node_policies_repos_handler(State(ctx): State<Context>) -> impl IntoResponse {
    let policies = ctx.profile.policies()?;
-
    let policies = policies.seed_policies()?.collect::<Vec<_>>();
+
    let policies = policies.seed_policies()?.collect::<Result<Vec<_>, _>>()?;

    Ok::<_, Error>(Json(policies))
}
modified radicle-httpd/src/api/v1/repos.rs
@@ -77,8 +77,14 @@ async fn repo_root_handler(
            .filter(|repo| repo.doc.visibility().is_public())
            .collect::<Vec<_>>(),
        RepoQuery::Pinned => storage
-
            .repositories_by_id(pinned.repositories.iter())?
-
            .into_iter()
+
            .repositories_by_id(pinned.repositories.iter())
+
            .filter_map(|result| match result {
+
                Ok(repo) => Some(repo),
+
                Err(e) => {
+
                    tracing::warn!("Failed to load pinned repository: {}", e);
+
                    None
+
                }
+
            })
            .filter(|repo| repo.doc.visibility().is_public())
            .collect::<Vec<_>>(),
    };
@@ -447,11 +453,12 @@ async fn remotes_handler(State(ctx): State<Context>, Path(rid): Path<RepoId>) ->
                .refs
                .iter()
                .filter_map(|(r, oid)| {
-
                    r.as_str()
-
                        .strip_prefix("refs/heads/")
-
                        .map(|head| (head.to_string(), oid))
+
                    r.as_str().strip_prefix("refs/heads/").map(|head| {
+
                        let surf_oid = Oid::from(radicle::git::raw::Oid::from(oid));
+
                        (head.to_string(), surf_oid)
+
                    })
                })
-
                .collect::<BTreeMap<String, &Oid>>();
+
                .collect::<BTreeMap<String, Oid>>();

            match aliases.alias(&remote.id) {
                Some(alias) => json!({
@@ -485,11 +492,12 @@ async fn remote_handler(
        .refs
        .iter()
        .filter_map(|(r, oid)| {
-
            r.as_str()
-
                .strip_prefix("refs/heads/")
-
                .map(|head| (head.to_string(), oid))
+
            r.as_str().strip_prefix("refs/heads/").map(|head| {
+
                let surf_oid = Oid::from(radicle::git::raw::Oid::from(oid));
+
                (head.to_string(), surf_oid)
+
            })
        })
-
        .collect::<BTreeMap<String, &Oid>>();
+
        .collect::<BTreeMap<String, Oid>>();
    let remote = json!({
        "id": remote.id,
        "heads": refs,
@@ -616,12 +624,12 @@ async fn issue_handler(
    let issue = ctx
        .profile
        .issues(&repo)?
-
        .get(&issue_id.into())?
+
        .get(&(&*issue_id).into())?
        .ok_or(Error::NotFound)?;
    let aliases = ctx.profile.aliases();

    Ok::<_, Error>(Json(
-
        api::json::cobs::Issue::new(&issue).as_json(issue_id.into(), &aliases),
+
        api::json::cobs::Issue::new(&issue).as_json((&*issue_id).into(), &aliases),
    ))
}

@@ -669,11 +677,11 @@ async fn patch_handler(
) -> impl IntoResponse {
    let (repo, _) = ctx.repo(rid)?;
    let patches = ctx.profile.patches(&repo)?;
-
    let patch = patches.get(&patch_id.into())?.ok_or(Error::NotFound)?;
+
    let patch = patches.get(&(&*patch_id).into())?.ok_or(Error::NotFound)?;
    let aliases = ctx.profile.aliases();

    Ok::<_, Error>(Json(api::json::cobs::Patch::new(&patch).as_json(
-
        patch_id.into(),
+
        (&*patch_id).into(),
        &repo,
        &aliases,
    )))
modified radicle-httpd/src/error.rs
@@ -73,10 +73,6 @@ pub enum RawError {
    #[error(transparent)]
    Surf(#[from] radicle_surf::Error),

-
    /// Git2 error.
-
    #[error(transparent)]
-
    Git2(#[from] radicle::git::raw::Error),
-

    /// Payload error.
    #[error(transparent)]
    ProjectPayload(#[from] radicle::identity::PayloadError),
@@ -91,7 +87,7 @@ pub enum RawError {

    /// Git error.
    #[error(transparent)]
-
    Git(#[from] radicle::git::ext::Error),
+
    Git(#[from] radicle::git::raw::Error),

    /// Radicle Storage error.
    #[error(transparent)]
modified radicle-httpd/src/raw.rs
@@ -72,7 +72,10 @@ async fn file_by_commit_handler(
    }

    let repo: Repository = repo.backend.into();
-
    let blob = repo.blob(sha, &path)?;
+
    let blob = repo.blob(
+
        radicle_surf::Oid::from(radicle::git::raw::Oid::from(sha)),
+
        &path,
+
    )?;

    blob_response(blob, &path)
}
@@ -171,7 +174,10 @@ async fn file_by_canonical_head_handler(

    let (_, sha) = repo.head()?;
    let repo: Repository = repo.backend.into();
-
    let blob = repo.blob(sha, &path)?;
+
    let blob = repo.blob(
+
        radicle_surf::Oid::from(radicle::git::raw::Oid::from(sha)),
+
        &path,
+
    )?;

    blob_response(blob, &path)
}
modified radicle-httpd/src/test.rs
@@ -12,10 +12,11 @@ use tower::ServiceExt;

use radicle::cob::migrate;
use radicle::cob::patch::MergeTarget;
+
use radicle::cob::Title;
use radicle::crypto::signature::Signer;
use radicle::crypto::ssh::Keystore;
use radicle::crypto::{KeyPair, Seed, Signature};
-
use radicle::git::{raw as git2, RefString};
+
use radicle::git::fmt::RefString;
use radicle::identity::{project, Visibility};
use radicle::node::device::Device;
use radicle::node::{Features, Timestamp, UserAgent};
@@ -110,9 +111,9 @@ fn seed_with_signer<G: Signer<Signature>>(
    fs::create_dir_all(&workdir).unwrap();

    // add commits to workdir (repo)
-
    let mut opts = git2::RepositoryInitOptions::new();
+
    let mut opts = radicle::git::raw::RepositoryInitOptions::new();
    opts.initial_head(DEFAULT_BRANCH);
-
    let repo = git2::Repository::init_opts(&workdir, &opts).unwrap();
+
    let repo = radicle::git::raw::Repository::init_opts(&workdir, &opts).unwrap();
    let tree = radicle::git::write_tree(
        Path::new("README"),
        "Hello Private World!\n".as_bytes(),
@@ -120,14 +121,15 @@ fn seed_with_signer<G: Signer<Signature>>(
    )
    .unwrap();

-
    let sig_time = git2::Time::new(1673001014, 0);
-
    let sig = git2::Signature::new("Alice Liddell", "alice@radicle.xyz", &sig_time).unwrap();
+
    let sig_time = radicle::git::raw::Time::new(1673001014, 0);
+
    let sig =
+
        radicle::git::raw::Signature::new("Alice Liddell", "alice@radicle.xyz", &sig_time).unwrap();

    repo.commit(Some("HEAD"), &sig, &sig, "Initial commit\n", &tree, &[])
        .unwrap();

    // rad init
-
    let repo = git2::Repository::open(&workdir).unwrap();
+
    let repo = radicle::git::raw::Repository::open(&workdir).unwrap();
    let name = project::ProjectName::from_str("hello-world-private").unwrap();
    let description = "Private Rad repository for tests".to_string();
    let branch = RefString::try_from(DEFAULT_BRANCH).unwrap();
@@ -156,14 +158,15 @@ fn seed_with_signer<G: Signer<Signature>>(
    fs::create_dir_all(&workdir).unwrap();

    // add commits to workdir (repo)
-
    let mut opts = git2::RepositoryInitOptions::new();
+
    let mut opts = radicle::git::raw::RepositoryInitOptions::new();
    opts.initial_head(DEFAULT_BRANCH);
-
    let repo = git2::Repository::init_opts(&workdir, &opts).unwrap();
+
    let repo = radicle::git::raw::Repository::init_opts(&workdir, &opts).unwrap();
    let tree =
        radicle::git::write_tree(Path::new("README"), "Hello World!\n".as_bytes(), &repo).unwrap();

-
    let sig_time = git2::Time::new(1673001014, 0);
-
    let sig = git2::Signature::new("Alice Liddell", "alice@radicle.xyz", &sig_time).unwrap();
+
    let sig_time = radicle::git::raw::Time::new(1673001014, 0);
+
    let sig =
+
        radicle::git::raw::Signature::new("Alice Liddell", "alice@radicle.xyz", &sig_time).unwrap();

    let oid = repo
        .commit(Some("HEAD"), &sig, &sig, "Initial commit\n", &tree, &[])
@@ -178,8 +181,9 @@ fn seed_with_signer<G: Signer<Signature>>(
        &repo,
    )
    .unwrap();
-
    let sig_time = git2::Time::new(1673002014, 0);
-
    let sig = git2::Signature::new("Alice Liddell", "alice@radicle.xyz", &sig_time).unwrap();
+
    let sig_time = radicle::git::raw::Time::new(1673002014, 0);
+
    let sig =
+
        radicle::git::raw::Signature::new("Alice Liddell", "alice@radicle.xyz", &sig_time).unwrap();

    let oid2 = repo
        .commit(
@@ -202,16 +206,15 @@ fn seed_with_signer<G: Signer<Signature>>(
    )
    .unwrap();
    let mut index = repo.index().unwrap();
-
    index
-
        .add_all(["."], git2::IndexAddOption::DEFAULT, None)
-
        .unwrap();
+
    index.add_path(Path::new("dir1/README")).unwrap();
    index.write().unwrap();

    let oid = index.write_tree().unwrap();
    let tree = repo.find_tree(oid).unwrap();

-
    let sig_time = git2::Time::new(1673003014, 0);
-
    let sig = git2::Signature::new("Alice Liddell", "alice@radicle.xyz", &sig_time).unwrap();
+
    let sig_time = radicle::git::raw::Time::new(1673003014, 0);
+
    let sig =
+
        radicle::git::raw::Signature::new("Alice Liddell", "alice@radicle.xyz", &sig_time).unwrap();
    repo.commit(
        Some("HEAD"),
        &sig,
@@ -223,7 +226,7 @@ fn seed_with_signer<G: Signer<Signature>>(
    .unwrap();

    // rad init
-
    let repo = git2::Repository::open(&workdir).unwrap();
+
    let repo = radicle::git::raw::Repository::open(&workdir).unwrap();
    let name = project::ProjectName::from_str("hello-world").unwrap();
    let description = "Rad repository for tests".to_string();
    let branch = RefString::try_from(DEFAULT_BRANCH).unwrap();
@@ -250,7 +253,7 @@ fn seed_with_signer<G: Signer<Signature>>(
    let mut issues = profile.issues_mut(&repo).unwrap();
    let issue = issues
        .create(
-
            "Issue #1".to_string(),
+
            Title::new("Issue #1").unwrap(),
            "Change 'hello world' to 'hello everyone'".to_string(),
            &[],
            &[],
@@ -266,7 +269,7 @@ fn seed_with_signer<G: Signer<Signature>>(
    let base = radicle::git::Oid::from_str(PARENT).unwrap();
    let patch = patches
        .create(
-
            "A new `hello world`",
+
            Title::new("A new `hello world`").unwrap(),
            "change `hello world` in README to something else",
            MergeTarget::Delegates,
            base,
@@ -284,9 +287,9 @@ fn seed_with_signer<G: Signer<Signature>>(
    fs::create_dir_all(&workdir).unwrap();

    // add commits to workdir (repo)
-
    let mut opts = git2::RepositoryInitOptions::new();
+
    let mut opts = radicle::git::raw::RepositoryInitOptions::new();
    opts.initial_head(DEFAULT_BRANCH);
-
    let repo = git2::Repository::init_opts(&workdir, &opts).unwrap();
+
    let repo = radicle::git::raw::Repository::init_opts(&workdir, &opts).unwrap();
    let tree = radicle::git::write_tree(
        Path::new("README"),
        "Hello World Again!\n".as_bytes(),
@@ -294,8 +297,9 @@ fn seed_with_signer<G: Signer<Signature>>(
    )
    .unwrap();

-
    let sig_time = git2::Time::new(1673001014, 0);
-
    let sig = git2::Signature::new("Alice Liddell", "alice@radicle.xyz", &sig_time).unwrap();
+
    let sig_time = radicle::git::raw::Time::new(1673001014, 0);
+
    let sig =
+
        radicle::git::raw::Signature::new("Alice Liddell", "alice@radicle.xyz", &sig_time).unwrap();

    repo.commit(Some("HEAD"), &sig, &sig, "Initial commit\n", &tree, &[])
        .unwrap();
@@ -303,7 +307,7 @@ fn seed_with_signer<G: Signer<Signature>>(
    repo.checkout_tree(tree.as_object(), None).unwrap();

    // rad init
-
    let repo = git2::Repository::open(&workdir).unwrap();
+
    let repo = radicle::git::raw::Repository::open(&workdir).unwrap();
    let name = project::ProjectName::from_str("again-hello-world").unwrap();
    let description = "Rad repository for sorting".to_string();
    let branch = RefString::try_from(DEFAULT_BRANCH).unwrap();