diff --git a/Cargo.lock b/Cargo.lock index bdb4bf0d1..37e59f0e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,30 +2,13 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "abomonation" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e72913c99b1f927aa7bd59a41518fdd9995f63ffc8760f211609e0241c4fb2" - -[[package]] -name = "abomonation_derive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e50e2a046af56a864c62d97b7153fda72c596e646be1b0c7963736821f6e1efa" -dependencies = [ - "proc-macro2", - "quote", - "synstructure", -] - [[package]] name = "ahash" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.7", + "getrandom", "once_cell", "version_check", ] @@ -114,9 +97,9 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ - "getrandom 0.2.7", + "getrandom", "instant", - "rand 0.8.5", + "rand", ] [[package]] @@ -476,43 +459,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "dag" -version = "0.1.0" -source = "git+https://github.com/facebook/sapling?rev=97e9d5112a4150286b44ba8544f543c69147e195#97e9d5112a4150286b44ba8544f543c69147e195" -dependencies = [ - "anyhow", - "async-trait", - "bitflags", - "byteorder", - "dag-types", - "drawdag", - "fail", - "futures 0.3.25", - "indexmap", - "itertools", - "mincode", - "minibytes", - "nonblocking", - "rand 0.8.5", - "serde", - "thiserror", - "tracing", - "vlqencoding", -] - -[[package]] -name = "dag-types" -version = "0.1.0" -source = "git+https://github.com/facebook/sapling?rev=97e9d5112a4150286b44ba8544f543c69147e195#97e9d5112a4150286b44ba8544f543c69147e195" -dependencies = [ - "abomonation", - "abomonation_derive", - "minibytes", - "quickcheck_arbitrary_derive", - "serde", -] - [[package]] name = "difflib" version = "0.4.0" @@ -556,11 +502,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" -[[package]] -name = "drawdag" -version = "0.1.0" -source = "git+https://github.com/facebook/sapling?rev=97e9d5112a4150286b44ba8544f543c69147e195#97e9d5112a4150286b44ba8544f543c69147e195" - [[package]] name = "either" version = "1.8.0" @@ -573,16 +514,6 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" -[[package]] -name = "env_logger" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -dependencies = [ - "log", - "regex", -] - [[package]] name = "errno" version = "0.2.8" @@ -604,17 +535,6 @@ dependencies = [ "libc", ] -[[package]] -name = "fail" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be3c61c59fdc91f5dbc3ea31ee8623122ce80057058be560654c5d410d181a6" -dependencies = [ - "lazy_static", - "log", - "rand 0.7.3", -] - [[package]] name = "fastrand" version = "1.8.0" @@ -649,102 +569,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - -[[package]] -name = "futures" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" - -[[package]] -name = "futures-executor" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" - -[[package]] -name = "futures-macro" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" - -[[package]] -name = "futures-task" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" - -[[package]] -name = "futures-util" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" -dependencies = [ - "futures 0.1.31", - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - [[package]] name = "gen-protos" version = "0.1.0" @@ -762,17 +586,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.7" @@ -781,7 +594,7 @@ checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -883,8 +696,6 @@ checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", "hashbrown", - "rayon", - "serde", ] [[package]] @@ -984,7 +795,6 @@ dependencies = [ "criterion", "criterion_bencher_compat", "crossterm", - "dag", "dirs", "git2", "glob", @@ -1000,6 +810,7 @@ dependencies = [ "pest_derive", "predicates", "regex", + "renderdag", "rpassword", "serde", "slab", @@ -1035,8 +846,8 @@ dependencies = [ "pest", "pest_derive", "prost", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "regex", "serde_json", "tempfile", @@ -1169,24 +980,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "mincode" -version = "0.1.0" -source = "git+https://github.com/facebook/sapling?rev=97e9d5112a4150286b44ba8544f543c69147e195#97e9d5112a4150286b44ba8544f543c69147e195" -dependencies = [ - "byteorder", - "serde", - "vlqencoding", -] - -[[package]] -name = "minibytes" -version = "0.1.0" -source = "git+https://github.com/facebook/sapling?rev=97e9d5112a4150286b44ba8544f543c69147e195#97e9d5112a4150286b44ba8544f543c69147e195" -dependencies = [ - "serde", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1201,7 +994,7 @@ checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.36.1", ] @@ -1221,11 +1014,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "nonblocking" -version = "0.1.0" -source = "git+https://github.com/facebook/sapling?rev=97e9d5112a4150286b44ba8544f543c69147e195#97e9d5112a4150286b44ba8544f543c69147e195" - [[package]] name = "normalize-line-endings" version = "0.3.0" @@ -1428,12 +1216,6 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "pkg-config" version = "0.3.25" @@ -1602,28 +1384,6 @@ dependencies = [ "prost", ] -[[package]] -name = "quickcheck" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" -dependencies = [ - "env_logger", - "log", - "rand 0.8.5", -] - -[[package]] -name = "quickcheck_arbitrary_derive" -version = "0.1.0" -source = "git+https://github.com/facebookexperimental/rust-shed.git?branch=main#e7b4df4635511dcdef872d41a6d7e64f3e56ec32" -dependencies = [ - "proc-macro2", - "quickcheck", - "quote", - "syn", -] - [[package]] name = "quote" version = "1.0.21" @@ -1633,19 +1393,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -1653,18 +1400,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -1674,16 +1411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -1692,16 +1420,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.7", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] @@ -1743,7 +1462,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.7", + "getrandom", "redox_syscall", "thiserror", ] @@ -1783,6 +1502,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "renderdag" +version = "0.1.0" +source = "git+https://github.com/facebook/sapling?rev=c8b66c68991066b3e8731630ef757e94cd03ff36#c8b66c68991066b3e8731630ef757e94cd03ff36" +dependencies = [ + "bitflags", + "itertools", + "serde", +] + [[package]] name = "roff" version = "0.2.1" @@ -1976,18 +1705,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", -] - [[package]] name = "tempfile" version = "3.3.0" @@ -2047,7 +1764,7 @@ dependencies = [ "git2", "itertools", "jujutsu-lib", - "rand 0.8.5", + "rand", "tempfile", ] @@ -2245,12 +1962,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "url" version = "2.2.2" @@ -2275,11 +1986,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "vlqencoding" -version = "0.1.0" -source = "git+https://github.com/facebook/sapling?rev=97e9d5112a4150286b44ba8544f543c69147e195#97e9d5112a4150286b44ba8544f543c69147e195" - [[package]] name = "wait-timeout" version = "0.2.0" @@ -2300,12 +2006,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" diff --git a/Cargo.toml b/Cargo.toml index aaafd886a..3aae26209 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ clap_complete = "4.0.7" clap_mangen = "0.2.6" config = { version = "0.13.3", default-features = false, features = ["toml"] } crossterm = { version = "0.25", default-features = false } -dag = { git = "https://github.com/facebook/sapling", rev = "97e9d5112a4150286b44ba8544f543c69147e195", optional = true, default-features = false } +renderdag = { git = "https://github.com/facebook/sapling", rev = "c8b66c68991066b3e8731630ef757e94cd03ff36", optional = true, default-features = false } dirs = "4.0.0" git2 = "0.16.1" glob = "0.3.1" @@ -77,6 +77,6 @@ test-case = "2.2.2" testutils = { path = "lib/testutils" } [features] -sapling = ["dag"] +sapling = ["renderdag"] default = ["jujutsu-lib/legacy-thrift"] vendored-openssl = ["git2/vendored-openssl", "jujutsu-lib/vendored-openssl"] diff --git a/deny.toml b/deny.toml index 36762fab5..51591c3b8 100644 --- a/deny.toml +++ b/deny.toml @@ -51,12 +51,7 @@ notice = "warn" # output a note when they are encountered. ignore = [ #"RUSTSEC-0000-0000", - - # https://github.com/martinvonz/jj/issues/1056 - # Temporarily ignore this advisory until we can eliminate the dependency on - # the abomonation crate. - "RUSTSEC-2021-0120", - + "RUSTSEC-2021-0145", ] # Threshold for security vulnerabilities, any vulnerability with a CVSS score diff --git a/flake.nix b/flake.nix index fedee297b..2579ba639 100644 --- a/flake.nix +++ b/flake.nix @@ -51,8 +51,7 @@ cargoLock = { lockFile = "${self}/Cargo.lock"; outputHashes = { - "dag-0.1.0" = "sha256-ZSPdQ5WLx977p36bIbxhbsp2k57DbFaAemGj5mcKavw="; - "quickcheck_arbitrary_derive-0.1.0" = "sha256-kUgApls8Uq07QcDrgOLXmAk08fNaEdQtDrnGhP6ff6w="; + "renderdag-0.1.0" = "sha256-isOd0QBs5StHpj0xRwSPG40juNvnntyHPW7mT4zsPbM"; }; }; nativeBuildInputs = [ diff --git a/src/graphlog.rs b/src/graphlog.rs index e76b69972..28c63b6a0 100644 --- a/src/graphlog.rs +++ b/src/graphlog.rs @@ -61,8 +61,8 @@ mod sapling { use std::io::{self, Write}; use std::marker::PhantomData; - use dag::render::{Ancestor, Renderer}; use itertools::Itertools; + use renderdag::{Ancestor, Renderer}; use super::{Edge, GraphLog}; @@ -132,7 +132,7 @@ pub fn get_graphlog<'a, K: Clone + Eq + Hash + 'a>( ) -> Box + 'a> { #[cfg(feature = "sapling")] { - use dag::render::GraphRowRenderer; + use renderdag::GraphRowRenderer; use sapling::SaplingGraphLog; let builder = GraphRowRenderer::new().output().with_min_row_height(0);