diff --git a/Cargo.lock b/Cargo.lock index 0a2d1c4b9..1b6122da7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,18 +17,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" -dependencies = [ - "cfg-if", - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "aho-corasick" version = "0.7.20" @@ -102,18 +90,6 @@ version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" -[[package]] -name = "arc-swap" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - [[package]] name = "assert_fs" version = "1.0.13" @@ -198,12 +174,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bitflags" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" - [[package]] name = "block-buffer" version = "0.10.4" @@ -225,15 +195,6 @@ dependencies = [ "serde", ] -[[package]] -name = "btoi" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd6407f73a9b8b6162d8a2ef999fe6afd7cc15902ebf42c5cd296addf17e0ad" -dependencies = [ - "num-traits", -] - [[package]] name = "bumpalo" version = "3.13.0" @@ -293,6 +254,7 @@ dependencies = [ "predicates", "quick-error", "regex", + "reqwest", "semver", "serde", "snapbox", @@ -416,7 +378,7 @@ checksum = "4f423e341edefb78c9caba2d9c7f7687d0e72e89df3ce3394554754393ac3990" dependencies = [ "anstream", "anstyle", - "bitflags 1.3.2", + "bitflags", "clap_lex", "strsim", "terminal_size", @@ -431,7 +393,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.18", + "syn", ] [[package]] @@ -440,12 +402,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" -[[package]] -name = "clru" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8191fa7302e03607ff0e237d4246cc043ff5b3cb9409d995172ba3bea16b807" - [[package]] name = "colorchoice" version = "1.0.0" @@ -459,7 +415,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7104119c2f80d887239879d0c50e033cd40eac9a3f3561e0684ba7d5d654f4da" dependencies = [ "atty", - "bitflags 1.3.2", + "bitflags", "concolor-query", ] @@ -531,20 +487,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" -dependencies = [ - "cfg-if", - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", -] - [[package]] name = "crossbeam-channel" version = "0.5.8" @@ -579,16 +521,6 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "crossbeam-queue" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.8.15" @@ -826,12 +758,6 @@ dependencies = [ "instant", ] -[[package]] -name = "fastrand" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" - [[package]] name = "ff" version = "0.13.0" @@ -899,815 +825,116 @@ dependencies = [ name = "futures-channel" version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" - -[[package]] -name = "futures-io" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" - -[[package]] -name = "futures-macro" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.18", -] - -[[package]] -name = "futures-sink" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" - -[[package]] -name = "futures-task" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" - -[[package]] -name = "futures-util" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" -dependencies = [ - "futures-core", - "futures-io", - "futures-macro", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.27.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" - -[[package]] -name = "git-conventional" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "232911ef08b47d0a792af61277fc3b8f089f0d5962a2cf8d4ae1cfc547355ff3" -dependencies = [ - "doc-comment", - "unicase", - "winnow 0.4.6", -] - -[[package]] -name = "git2" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b989d6a7ca95a362cf2cfc5ad688b3a467be1f87e480b8dad07fee8c79b0044" -dependencies = [ - "bitflags 1.3.2", - "libc", - "libgit2-sys", - "log", - "openssl-probe", - "openssl-sys", - "url", -] - -[[package]] -name = "gix" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ce5c049b1afcae9bb9e10c0f6dd8eb1335e8647fb7fd34732a66133ca3b9886" -dependencies = [ - "gix-actor", - "gix-attributes", - "gix-commitgraph", - "gix-config", - "gix-credentials", - "gix-date", - "gix-diff", - "gix-discover", - "gix-features", - "gix-filter", - "gix-fs", - "gix-glob", - "gix-hash", - "gix-hashtable", - "gix-ignore", - "gix-index", - "gix-lock", - "gix-mailmap", - "gix-negotiate", - "gix-object", - "gix-odb", - "gix-pack", - "gix-path", - "gix-prompt", - "gix-protocol", - "gix-ref", - "gix-refspec", - "gix-revision", - "gix-sec", - "gix-tempfile", - "gix-trace", - "gix-transport", - "gix-traverse", - "gix-url", - "gix-utils", - "gix-validate", - "gix-worktree", - "log", - "once_cell", - "reqwest", - "signal-hook", - "smallvec", - "thiserror", - "unicode-normalization", -] - -[[package]] -name = "gix-actor" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abd2566c12095a584716f2c16f051850bd8987f57556f1fef4a7cce0300b83d0" -dependencies = [ - "bstr", - "btoi", - "gix-date", - "itoa", - "nom", - "thiserror", -] - -[[package]] -name = "gix-attributes" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63a134a674e39e238bd273326a9815296cc71f867ad5466518da71392cff98ce" -dependencies = [ - "bstr", - "gix-glob", - "gix-path", - "gix-quote", - "kstring", - "log", - "smallvec", - "thiserror", - "unicode-bom", -] - -[[package]] -name = "gix-bitmap" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa8bbde7551a9e3e783a2871f53bbb0f50aac7a77db5680c8709f69e8ce724f" -dependencies = [ - "thiserror", -] - -[[package]] -name = "gix-chunk" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b42ea64420f7994000130328f3c7a2038f639120518870436d31b8bde704493" -dependencies = [ - "thiserror", -] - -[[package]] -name = "gix-command" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2783ad148fb16bf9cfd46423706ba552a62a4d4a18fda5dd07648eb0228862dd" -dependencies = [ - "bstr", -] - -[[package]] -name = "gix-commitgraph" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8219fe6f39588a29dbfb8d1c244b07ee653126edc5b6f3860752c3b5454fa10b" -dependencies = [ - "bstr", - "gix-chunk", - "gix-features", - "gix-hash", - "memmap2", - "thiserror", -] - -[[package]] -name = "gix-config" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2135b921a699a4c36167148193bea23c653a16ef0686f6a280e383469709a773" -dependencies = [ - "bstr", - "gix-config-value", - "gix-features", - "gix-glob", - "gix-path", - "gix-ref", - "gix-sec", - "log", - "memchr", - "once_cell", - "smallvec", - "thiserror", - "unicode-bom", - "winnow 0.5.14", -] - -[[package]] -name = "gix-config-value" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e874f41437441c02991dcea76990b9058fadfc54b02ab4dd06ab2218af43897" -dependencies = [ - "bitflags 2.4.0", - "bstr", - "gix-path", - "libc", - "thiserror", -] - -[[package]] -name = "gix-credentials" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307d91ec5f7c8e9bfaa217fe30c2e0099101cbe83dbed27a222dbb6def38725f" -dependencies = [ - "bstr", - "gix-command", - "gix-config-value", - "gix-path", - "gix-prompt", - "gix-sec", - "gix-url", - "thiserror", -] - -[[package]] -name = "gix-date" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4f7c76578a69b736c3f0770f14757e9027354011d24c56d79207add9d7d1be6" -dependencies = [ - "bstr", - "itoa", - "thiserror", - "time", -] - -[[package]] -name = "gix-diff" -version = "0.33.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a49d7a9a9ed5ec3428c3061da45d0fc5f50b3c07b91ea4e7ec4959668f25f6c" -dependencies = [ - "gix-hash", - "gix-object", - "imara-diff", - "thiserror", -] - -[[package]] -name = "gix-discover" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "041480eb03d8aa0894d9b73d25d182d51bc4d0ea8925a6ee0c971262bbc7715e" -dependencies = [ - "bstr", - "dunce", - "gix-hash", - "gix-path", - "gix-ref", - "gix-sec", - "thiserror", -] - -[[package]] -name = "gix-features" -version = "0.32.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882695cccf38da4c3cc7ee687bdb412cf25e37932d7f8f2c306112ea712449f1" -dependencies = [ - "bytes", - "crc32fast", - "crossbeam-channel", - "flate2", - "gix-hash", - "gix-trace", - "jwalk", - "libc", - "once_cell", - "parking_lot", - "prodash", - "sha1_smol", - "thiserror", - "walkdir", -] - -[[package]] -name = "gix-filter" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4d4d61f2ab07de4612f8e078d7f1a443c7ab5c40f382784c8eacdf0fd172b9" -dependencies = [ - "bstr", - "encoding_rs", - "gix-attributes", - "gix-command", - "gix-hash", - "gix-object", - "gix-packetline-blocking", - "gix-path", - "gix-quote", - "gix-trace", - "smallvec", - "thiserror", -] - -[[package]] -name = "gix-fs" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5b6e9d34a2c61ea4a02bbca94c409ab6dbbca1348cbb67298cd7fed8758761" -dependencies = [ - "gix-features", -] - -[[package]] -name = "gix-glob" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7255c717f49a556fa5029f6d9f2b3c008b4dd016c87f23c2ab8ca9636d5fade" -dependencies = [ - "bitflags 2.4.0", - "bstr", - "gix-features", - "gix-path", -] - -[[package]] -name = "gix-hash" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b422ff2ad9a0628baaad6da468cf05385bf3f5ab495ad5a33cce99b9f41092f" -dependencies = [ - "hex", - "thiserror", -] - -[[package]] -name = "gix-hashtable" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385f4ce6ecf3692d313ca3aa9bd3b3d8490de53368d6d94bedff3af8b6d9c58d" -dependencies = [ - "gix-hash", - "hashbrown 0.14.0", - "parking_lot", -] - -[[package]] -name = "gix-ignore" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88b95ceb3bc45abcab6eb55ef4e0053e58b4df0712d3f9aec7d0ca990952603" -dependencies = [ - "bstr", - "gix-glob", - "gix-path", - "unicode-bom", -] - -[[package]] -name = "gix-index" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732f61ec71576bd443a3c24f4716dc7eac180d8929e7bb8603c7310161507106" -dependencies = [ - "bitflags 2.4.0", - "bstr", - "btoi", - "filetime", - "gix-bitmap", - "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", - "gix-traverse", - "itoa", - "memmap2", - "smallvec", - "thiserror", -] - -[[package]] -name = "gix-lock" -version = "7.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e82ec23c8a281f91044bf3ed126063b91b59f9c9340bf0ae746f385cc85a6fa" -dependencies = [ - "gix-tempfile", - "gix-utils", - "thiserror", -] - -[[package]] -name = "gix-mailmap" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc0dbbf35d29639770af68d7ff55924d83786c8924b0e6a1766af1a98b7d58b" -dependencies = [ - "bstr", - "gix-actor", - "gix-date", - "thiserror", -] - -[[package]] -name = "gix-negotiate" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce0061b7ae867e830c77b1ecfc5875f0d042aebb3d7e6014d04fd86ca6c71d59" -dependencies = [ - "bitflags 2.4.0", - "gix-commitgraph", - "gix-date", - "gix-hash", - "gix-object", - "gix-revwalk", - "smallvec", - "thiserror", -] - -[[package]] -name = "gix-object" -version = "0.33.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdd87520c71a19afecfa616863a4b761621074878f5a3999243b3e37e233943" -dependencies = [ - "bstr", - "btoi", - "gix-actor", - "gix-date", - "gix-features", - "gix-hash", - "gix-validate", - "hex", - "itoa", - "nom", - "smallvec", - "thiserror", -] - -[[package]] -name = "gix-odb" -version = "0.50.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e827dbda6d3dabadb94cd437d0e0fe8c314a60d136a3235fc6f5bf7b96b976ac" -dependencies = [ - "arc-swap", - "gix-date", - "gix-features", - "gix-hash", - "gix-object", - "gix-pack", - "gix-path", - "gix-quote", - "parking_lot", - "tempfile", - "thiserror", -] - -[[package]] -name = "gix-pack" -version = "0.40.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f029a4dce9ac91da35c968c3abdcae573b3e52c123be86cbab3011599de533" -dependencies = [ - "clru", - "gix-chunk", - "gix-diff", - "gix-features", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-path", - "gix-tempfile", - "gix-traverse", - "memmap2", - "parking_lot", - "smallvec", - "thiserror", - "uluru", -] - -[[package]] -name = "gix-packetline" -version = "0.16.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb532b34627186a9a2705a360f64f6a8feb34c42344b127f9f230687d85358bd" -dependencies = [ - "bstr", - "hex", - "thiserror", -] - -[[package]] -name = "gix-packetline-blocking" -version = "0.16.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20276373def40fc3be7a86d09e1bb607d33dd6bf83e3504e83cd594e51438667" -dependencies = [ - "bstr", - "hex", - "thiserror", -] - -[[package]] -name = "gix-path" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18609c8cbec8508ea97c64938c33cd305b75dfc04a78d0c3b78b8b3fd618a77c" -dependencies = [ - "bstr", - "gix-trace", - "home", - "once_cell", - "thiserror", -] - -[[package]] -name = "gix-prompt" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c22decaf4a063ccae2b2108820c8630c01bd6756656df3fe464b32b8958a5ea" -dependencies = [ - "gix-command", - "gix-config-value", - "parking_lot", - "rustix 0.38.8", - "thiserror", -] - -[[package]] -name = "gix-protocol" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53c7627b8c54349b93f2a89218effc7c13a5506d2abc2571e0baaf1562a9c105" -dependencies = [ - "bstr", - "btoi", - "gix-credentials", - "gix-date", - "gix-features", - "gix-hash", - "gix-transport", - "maybe-async", - "nom", - "thiserror", -] - -[[package]] -name = "gix-quote" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfd80d3d0c733508df9449b1d3795da36083807e31d851d7d61d29af13bd4b0a" -dependencies = [ - "bstr", - "btoi", - "thiserror", -] - -[[package]] -name = "gix-ref" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db11edd78bf33043d1969fff51c567a4b30edd77ab44f6f8eb460a4c14985d" -dependencies = [ - "gix-actor", - "gix-date", - "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", - "gix-path", - "gix-tempfile", - "gix-validate", - "memmap2", - "nom", - "thiserror", -] - -[[package]] -name = "gix-refspec" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19a02bf740b326d6c082a7d6f754ebe56eef900986c5e91be7cf000df9ea18d" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ - "bstr", - "gix-hash", - "gix-revision", - "gix-validate", - "smallvec", - "thiserror", + "futures-core", ] [[package]] -name = "gix-revision" -version = "0.18.1" +name = "futures-core" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38a13500890435e3b9e7746bceda248646bfc69e259210884c98e29bb7a1aa6f" -dependencies = [ - "bstr", - "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-revwalk", - "thiserror", -] +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] -name = "gix-revwalk" -version = "0.4.1" +name = "futures-io" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d4cbaf3cfbfde2b81b5ee8b469aff42c34693ce0fe17fc3c244d5085307f2c" -dependencies = [ - "gix-commitgraph", - "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "smallvec", - "thiserror", -] +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] -name = "gix-sec" -version = "0.8.4" +name = "futures-macro" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9615cbd6b456898aeb942cd75e5810c382fbfc48dbbff2fa23ebd2d33dcbe9c7" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ - "bitflags 2.4.0", - "gix-path", - "libc", - "windows", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "gix-tempfile" -version = "7.0.2" +name = "futures-sink" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa28d567848cec8fdd77d36ad4f5f78ecfaba7d78f647d4f63c8ae1a2cec7243" -dependencies = [ - "gix-fs", - "libc", - "once_cell", - "parking_lot", - "signal-hook", - "signal-hook-registry", - "tempfile", -] +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] -name = "gix-trace" -version = "0.1.3" +name = "futures-task" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b6d623a1152c3facb79067d6e2ecdae48130030cf27d6eb21109f13bd7b836" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] -name = "gix-transport" -version = "0.34.2" +name = "futures-util" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "640cf03acc506e0350bc434dd6d7093d91343ed508d2c2166a41da856ab6e5e3" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ - "base64", - "bstr", - "gix-command", - "gix-credentials", - "gix-features", - "gix-packetline", - "gix-quote", - "gix-sec", - "gix-url", - "reqwest", - "thiserror", + "futures-core", + "futures-io", + "futures-macro", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", ] [[package]] -name = "gix-traverse" -version = "0.30.1" +name = "generic-array" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12e0fe428394226c37dd686ad64b09a04b569fe157d638b125b4a4c1e7e2df0" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "gix-commitgraph", - "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-revwalk", - "smallvec", - "thiserror", + "typenum", + "version_check", + "zeroize", ] [[package]] -name = "gix-url" -version = "0.21.1" +name = "getrandom" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4411bdbd1d46b35ae50e84c191660d437f89974e4236627785024be0b577170a" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ - "bstr", - "gix-features", - "gix-path", - "home", - "thiserror", - "url", + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", ] [[package]] -name = "gix-utils" -version = "0.1.5" +name = "gimli" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b85d89dc728613e26e0ed952a19583744e7f5240fcd4aa30d6c824ffd8b52f0f" -dependencies = [ - "fastrand 2.0.0", -] +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] -name = "gix-validate" -version = "0.7.7" +name = "git-conventional" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba9b3737b2cef3dcd014633485f0034b0f1a931ee54aeb7d8f87f177f3c89040" +checksum = "232911ef08b47d0a792af61277fc3b8f089f0d5962a2cf8d4ae1cfc547355ff3" dependencies = [ - "bstr", - "thiserror", + "doc-comment", + "unicase", + "winnow", ] [[package]] -name = "gix-worktree" -version = "0.23.1" +name = "git2" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f8bb6dd57dc6c9dfa03cc2cf2cc0942edae405eb6dfd1c34dbd2be00a90cab2" +checksum = "7b989d6a7ca95a362cf2cfc5ad688b3a467be1f87e480b8dad07fee8c79b0044" dependencies = [ - "bstr", - "filetime", - "gix-attributes", - "gix-features", - "gix-filter", - "gix-fs", - "gix-glob", - "gix-hash", - "gix-ignore", - "gix-index", - "gix-object", - "gix-path", - "io-close", - "thiserror", + "bitflags", + "libc", + "libgit2-sys", + "log", + "openssl-probe", + "openssl-sys", + "url", ] [[package]] @@ -1735,7 +962,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" dependencies = [ - "bitflags 1.3.2", + "bitflags", "ignore", "walkdir", ] @@ -1776,12 +1003,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" - [[package]] name = "heck" version = "0.4.1" @@ -1960,16 +1181,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "imara-diff" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98c1d0ad70fc91b8b9654b1f33db55e59579d3b3de2bffdced0fdb810570cb8" -dependencies = [ - "ahash", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "1.9.3" @@ -1977,7 +1188,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown 0.12.3", + "hashbrown", ] [[package]] @@ -1989,16 +1200,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "io-close" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cadcf447f06744f8ce713d2d6239bb5bde2c357a452397a9ed90c625da390bc" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "io-lifetimes" version = "1.0.11" @@ -2024,7 +1225,7 @@ checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", - "rustix 0.37.19", + "rustix", "windows-sys 0.48.0", ] @@ -2061,25 +1262,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jwalk" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2735847566356cd2179a2a38264839308f7079fa96e6bd5a42d740460e003c56" -dependencies = [ - "crossbeam", - "rayon", -] - -[[package]] -name = "kstring" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3066350882a1cd6d950d055997f379ac37fd39f81cd4d8ed186032eb3c5747" -dependencies = [ - "static_assertions", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -2138,22 +1320,6 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" -[[package]] -name = "linux-raw-sys" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" - -[[package]] -name = "lock_api" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "log" version = "0.4.18" @@ -2166,32 +1332,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" -[[package]] -name = "maybe-async" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1b8c13cb1f814b634a96b2c725449fe7ed464a7b8781de8688be5ffbd3f305" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" -[[package]] -name = "memmap2" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" -dependencies = [ - "libc", -] - [[package]] name = "memoffset" version = "0.8.0" @@ -2207,12 +1353,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -2242,16 +1382,6 @@ dependencies = [ "windows-sys 0.42.0", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "normalize-line-endings" version = "0.3.0" @@ -2277,15 +1407,6 @@ dependencies = [ "libc", ] -[[package]] -name = "num_threads" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" -dependencies = [ - "libc", -] - [[package]] name = "object" version = "0.31.1" @@ -2362,29 +1483,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.3.5", - "smallvec", - "windows-targets 0.48.0", -] - [[package]] name = "pasetors" version = "0.6.6" @@ -2498,12 +1596,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prodash" -version = "25.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c236e70b7f9b9ea00d33c69f63ec1ae6e9ae96118923cd37bd4e9c7396f0b107" - [[package]] name = "quick-error" version = "2.0.1" @@ -2556,7 +1648,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] @@ -2565,7 +1657,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] @@ -2680,24 +1772,11 @@ version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ - "bitflags 1.3.2", + "bitflags", "errno", "io-lifetimes", "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" -dependencies = [ - "bitflags 2.4.0", - "errno", - "libc", - "linux-raw-sys 0.4.5", + "linux-raw-sys", "windows-sys 0.48.0", ] @@ -2812,7 +1891,7 @@ checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn", ] [[package]] @@ -2847,12 +1926,6 @@ dependencies = [ "serde", ] -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[package]] name = "sha2" version = "0.10.6" @@ -2876,25 +1949,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - [[package]] name = "signature" version = "2.1.0" @@ -2920,12 +1974,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "smallvec" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" - [[package]] name = "smol_str" version = "0.2.0" @@ -3020,17 +2068,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.18" @@ -3044,24 +2081,20 @@ dependencies = [ [[package]] name = "tame-index" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1650e6f8596f880a10de87dcb9c3dd1784df2dc017e1d05d5ba14c4ed9e780e2" +checksum = "5c1289c3fa1251d5433fdbbe927f744a9465f9fb418465e45cef4255f7272dea" dependencies = [ "camino", - "crossbeam-channel", - "gix", "home", "http", "memchr", - "rayon", "reqwest", "semver", "serde", "serde_json", "smol_str", "thiserror", - "tokio", "toml", "twox-hash", ] @@ -3083,9 +2116,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if", - "fastrand 1.9.0", + "fastrand", "redox_syscall 0.3.5", - "rustix 0.37.19", + "rustix", "windows-sys 0.45.0", ] @@ -3104,7 +2137,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" dependencies = [ - "rustix 0.37.19", + "rustix", "windows-sys 0.48.0", ] @@ -3131,7 +2164,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn", ] [[package]] @@ -3152,8 +2185,6 @@ checksum = "a79d09ac6b08c1ab3906a2f7cc2e81a0e27c7ae89c63812df75e52bef0751e07" dependencies = [ "deranged", "itoa", - "libc", - "num_threads", "serde", "time-core", "time-macros", @@ -3260,7 +2291,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.4.6", + "winnow", ] [[package]] @@ -3327,15 +2358,6 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" -[[package]] -name = "uluru" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794a32261a1f5eb6a4462c81b59cec87b5c27d5deea7dd1ac8fc781c41d226db" -dependencies = [ - "arrayvec", -] - [[package]] name = "unicase" version = "2.6.0" @@ -3351,12 +2373,6 @@ version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" -[[package]] -name = "unicode-bom" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98e90c70c9f0d4d1ee6d0a7d04aa06cb9bbd53d8cfbdd62a0269a7c2eb640552" - [[package]] name = "unicode-ident" version = "1.0.9" @@ -3462,7 +2478,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn", "wasm-bindgen-shared", ] @@ -3496,7 +2512,7 @@ checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3554,15 +2570,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.0", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -3719,15 +2726,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "0.5.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" -dependencies = [ - "memchr", -] - [[package]] name = "winreg" version = "0.50.0" diff --git a/Cargo.toml b/Cargo.toml index 870e1e67b..8ad693ddc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ resolver = "2" [workspace.package] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.66.0" # MSRV +rust-version = "1.66.0" # MSRV include = [ "build.rs", "src/**/*", @@ -13,7 +13,7 @@ include = [ "LICENSE*", "README.md", "benches/**/*", - "examples/**/*" + "examples/**/*", ] [package] @@ -35,12 +35,12 @@ rustdoc-args = ["--cfg", "docsrs"] [package.metadata.release] pre-release-replacements = [ - {file="README.md", search="Current release: [a-z0-9\\.-]+", replace="Current release: {{version}}"} , - {file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1}, - {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, - {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, - {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/crate-ci/cargo-release/compare/{{tag_name}}...HEAD", exactly=1}, + { file = "README.md", search = "Current release: [a-z0-9\\.-]+", replace = "Current release: {{version}}" }, + { file = "CHANGELOG.md", search = "Unreleased", replace = "{{version}}", min = 1 }, + { file = "CHANGELOG.md", search = "\\.\\.\\.HEAD", replace = "...{{tag_name}}", exactly = 1 }, + { file = "CHANGELOG.md", search = "ReleaseDate", replace = "{{date}}", min = 1 }, + { file = "CHANGELOG.md", search = "", replace = "\n## [Unreleased] - ReleaseDate\n", exactly = 1 }, + { file = "CHANGELOG.md", search = "", replace = "\n[Unreleased]: https://github.com/crate-ci/cargo-release/compare/{{tag_name}}...HEAD", exactly = 1 }, ] [features] @@ -59,7 +59,7 @@ vendored-openssl = ["git2/vendored-openssl"] [dependencies] cargo_metadata = "0.15" -tame-index = { version = "0.4", features = ["git", "sparse"] } +tame-index = "0.5" git2 = { version = "0.17.2", default-features = false } toml_edit = "0.19.10" toml = "0.7.4" @@ -88,6 +88,11 @@ anyhow = "1.0.71" concolor-control = { version = "0.0.7", features = ["auto"] } git-conventional = "0.12.3" +[dependencies.reqwest] +version = "0.11" +default-features = false +features = ["blocking", "rustls-tls", "gzip"] + [dev-dependencies] assert_fs = "1.0" predicates = "3.0" diff --git a/src/error.rs b/src/error.rs index fb2d5eb5d..f7b68ee1d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -32,6 +32,7 @@ process_error_from!(std::io::Error); process_error_from!(semver::Error); process_error_from!(ignore::Error); process_error_from!(tame_index::Error); +process_error_from!(reqwest::Error); process_error_from!(cargo_metadata::Error); process_error_from!(toml::ser::Error); process_error_from!(toml_edit::ser::Error); diff --git a/src/ops/cargo.rs b/src/ops/cargo.rs index ad58b66b2..8a13b5c77 100644 --- a/src/ops/cargo.rs +++ b/src/ops/cargo.rs @@ -111,7 +111,7 @@ pub fn publish( } pub fn wait_for_publish( - index: &mut tame_index::index::ComboIndex, + index: &mut crate::steps::index::CratesIoIndex, name: &str, version: &str, timeout: std::time::Duration, @@ -122,11 +122,6 @@ pub fn wait_for_publish( let sleep_time = std::time::Duration::from_secs(1); let mut logged = false; loop { - if let tame_index::index::ComboIndex::Git(gi) = index { - if let Err(e) = gi.fetch() { - log::debug!("crate index update failed with {}", e); - } - } if is_published(index, name, version) { break; } else if timeout < now.elapsed() { @@ -147,13 +142,13 @@ pub fn wait_for_publish( Ok(()) } -pub fn is_published(index: &tame_index::index::ComboIndex, name: &str, version: &str) -> bool { - match index.krate(name.try_into().expect("crate name is invalid"), true) { - Ok(Some(crate_data)) => crate_data - .versions - .into_iter() - .any(|iv| iv.version == version), - Ok(None) => false, +pub fn is_published( + index: &mut crate::steps::index::CratesIoIndex, + name: &str, + version: &str, +) -> bool { + match index.has_krate_version(name, version) { + Ok(has_krate_version) => has_krate_version.unwrap_or(false), Err(err) => { // For both http and git indices, this _might_ be an error that goes away in // a future call, but at least printing out something should give the user diff --git a/src/steps/hook.rs b/src/steps/hook.rs index f070d4de3..44d10b267 100644 --- a/src/steps/hook.rs +++ b/src/steps/hook.rs @@ -47,7 +47,7 @@ pub struct HookStep { impl HookStep { pub fn run(&self) -> Result<(), CliError> { git::git_version()?; - let index = crate::steps::index::open_crates_io_index()?; + let mut index = crate::steps::index::CratesIoIndex::open()?; if self.dry_run { let _ = @@ -87,7 +87,7 @@ impl HookStep { { let version = &pkg.initial_version; if !crate::ops::cargo::is_published( - &index, + &mut index, crate_name, &version.full_version_string, ) { diff --git a/src/steps/index.rs b/src/steps/index.rs index 0078ab176..a1dacd350 100644 --- a/src/steps/index.rs +++ b/src/steps/index.rs @@ -1,24 +1,75 @@ -pub(crate) fn open_crates_io_index() -> Result -{ - let index = tame_index::index::ComboIndexCache::new(tame_index::IndexLocation::new( - tame_index::IndexUrl::crates_io(None, None, None)?, - ))?; - - let index = match index { - tame_index::index::ComboIndexCache::Git(gi) => { - tame_index::index::RemoteGitIndex::new(gi)?.into() - } - tame_index::index::ComboIndexCache::Sparse(si) => { - tame_index::index::RemoteSparseIndex::new( - si, - tame_index::external::reqwest::blocking::Client::builder() - .http2_prior_knowledge() - .build() - .map_err(tame_index::Error::from)?, - ) - .into() +pub struct CratesIoIndex { + index: tame_index::SparseIndex, + client: reqwest::blocking::Client, + etags: Vec<(String, String)>, +} + +impl CratesIoIndex { + #[inline] + pub(crate) fn open() -> Result { + let index = tame_index::SparseIndex::new(tame_index::IndexLocation::new( + tame_index::IndexUrl::CratesIoSparse, + ))?; + let client = reqwest::blocking::ClientBuilder::new() + .http2_prior_knowledge() + .build()?; + + Ok(Self { + index, + client, + etags: Vec::new(), + }) + } + + /// Determines if the specified crate exists in the crates.io index + pub(crate) fn has_krate(&mut self, name: &str) -> Result { + Ok(self.has_krate_version(name, "")?.unwrap_or(false)) + } + + /// Determines if the specified crate version exists in the crates.io index + pub(crate) fn has_krate_version( + &mut self, + name: &str, + version: &str, + ) -> Result, crate::error::CliError> { + let etag = self + .etags + .iter() + .find_map(|(krate, etag)| (krate == name).then_some(etag.as_str())) + .unwrap_or(""); + + let krate_name = name.try_into()?; + let req = self.index.make_remote_request(krate_name, Some(etag))?; + let res = self.client.execute(req.try_into()?)?; + + // Grab the etag if it exists for future requests + if let Some(etag) = res.headers().get(reqwest::header::ETAG) { + if let Ok(etag) = etag.to_str() { + if let Some(i) = self.etags.iter().position(|(krate, _)| krate == name) { + self.etags[i].1 = etag.to_owned(); + } else { + self.etags.push((name.to_owned(), etag.to_owned())); + } + } } - }; - Ok(index) + let mut builder = tame_index::external::http::Response::builder() + .status(res.status()) + .version(res.version()); + + builder + .headers_mut() + .unwrap() + .extend(res.headers().iter().map(|(k, v)| (k.clone(), v.clone()))); + + let body = res.bytes()?; + let response = builder + .body(body.to_vec()) + .map_err(|e| tame_index::Error::from(tame_index::error::HttpError::from(e)))?; + + let index_krate = self + .index + .parse_remote_response(krate_name, response, false)?; + Ok(index_krate.map(|ik| ik.versions.iter().any(|iv| iv.version == version))) + } } diff --git a/src/steps/mod.rs b/src/steps/mod.rs index 96eaebce6..69506c6ad 100644 --- a/src/steps/mod.rs +++ b/src/steps/mod.rs @@ -4,7 +4,7 @@ pub mod changes; pub mod commit; pub mod config; pub mod hook; -mod index; +pub mod index; pub mod owner; pub mod plan; pub mod publish; @@ -214,7 +214,7 @@ pub fn verify_monotonically_increasing( pub fn verify_rate_limit( pkgs: &[plan::PackageRelease], - index: &tame_index::index::ComboIndex, + index: &mut index::CratesIoIndex, dry_run: bool, level: log::Level, ) -> Result { @@ -228,11 +228,7 @@ pub fn verify_rate_limit( for pkg in pkgs { if pkg.config.registry().is_none() && pkg.config.publish() { let crate_name = pkg.meta.name.as_str(); - if index - .krate(crate_name.try_into()?, true) - .map(|ik| ik.is_some()) - .unwrap_or(false) - { + if index.has_krate(crate_name)? { existing += 1; } else { new += 1; diff --git a/src/steps/publish.rs b/src/steps/publish.rs index 5b14d89d3..78a5cbda9 100644 --- a/src/steps/publish.rs +++ b/src/steps/publish.rs @@ -80,13 +80,16 @@ impl PublishStep { let mut pkgs = plan::plan(pkgs)?; - let mut index = crate::steps::index::open_crates_io_index()?; + let mut index = crate::steps::index::CratesIoIndex::open()?; for pkg in pkgs.values_mut() { if pkg.config.registry().is_none() && pkg.config.release() { let crate_name = pkg.meta.name.as_str(); let version = pkg.planned_version.as_ref().unwrap_or(&pkg.initial_version); - if crate::ops::cargo::is_published(&index, crate_name, &version.full_version_string) - { + if crate::ops::cargo::is_published( + &mut index, + crate_name, + &version.full_version_string, + ) { let _ = crate::ops::shell::warn(format!( "disabled due to previous publish ({}), skipping {}", version.full_version_string, crate_name @@ -131,7 +134,8 @@ impl PublishStep { )?; failed |= !super::verify_metadata(&selected_pkgs, dry_run, log::Level::Error)?; - failed |= !super::verify_rate_limit(&selected_pkgs, &index, dry_run, log::Level::Error)?; + failed |= + !super::verify_rate_limit(&selected_pkgs, &mut index, dry_run, log::Level::Error)?; // STEP 1: Release Confirmation super::confirm("Publish", &selected_pkgs, self.no_confirm, dry_run)?; @@ -156,7 +160,7 @@ impl PublishStep { pub fn publish( ws_meta: &cargo_metadata::Metadata, pkgs: &[plan::PackageRelease], - index: &mut tame_index::index::ComboIndex, + index: &mut crate::steps::index::CratesIoIndex, dry_run: bool, ) -> Result<(), CliError> { for pkg in pkgs { diff --git a/src/steps/release.rs b/src/steps/release.rs index 019f83c77..e0f30ef2a 100644 --- a/src/steps/release.rs +++ b/src/steps/release.rs @@ -46,7 +46,7 @@ pub struct ReleaseStep { impl ReleaseStep { pub fn run(&self) -> Result<(), CliError> { git::git_version()?; - let mut index = crate::steps::index::open_crates_io_index()?; + let mut index = crate::steps::index::CratesIoIndex::open()?; if self.dry_run { let _ = @@ -73,11 +73,7 @@ impl ReleaseStep { pkg.bump(level_or_version, self.metadata.as_deref())?; } } - if index - .krate(pkg.meta.name.as_str().try_into()?, true) - .map(|ik| ik.is_some()) - .unwrap_or(false) - { + if index.has_krate(&pkg.meta.name)? { // Already published, skip it. Use `cargo release owner` for one-time updates pkg.ensure_owners = false; } @@ -105,7 +101,7 @@ impl ReleaseStep { && !explicitly_excluded { let version = &pkg.initial_version; - if !cargo::is_published(&index, crate_name, &version.full_version_string) { + if !cargo::is_published(&mut index, crate_name, &version.full_version_string) { log::debug!( "enabled {}, v{} is unpublished", crate_name, @@ -159,7 +155,7 @@ impl ReleaseStep { if pkg.config.publish() && pkg.config.registry().is_none() { let version = pkg.planned_version.as_ref().unwrap_or(&pkg.initial_version); let crate_name = pkg.meta.name.as_str(); - if !cargo::is_published(&index, crate_name, &version.full_version_string) { + if !cargo::is_published(&mut index, crate_name, &version.full_version_string) { let _ = crate::ops::shell::warn(format!( "disabled by user, skipping {} v{} despite being unpublished", crate_name, version.full_version_string, @@ -202,7 +198,7 @@ impl ReleaseStep { if pkg.config.registry().is_none() { let version = pkg.planned_version.as_ref().unwrap_or(&pkg.initial_version); let crate_name = pkg.meta.name.as_str(); - if cargo::is_published(&index, crate_name, &version.full_version_string) { + if cargo::is_published(&mut index, crate_name, &version.full_version_string) { let _ = crate::ops::shell::error(format!( "{} {} is already published", crate_name, version.full_version_string @@ -235,7 +231,8 @@ impl ReleaseStep { )?; failed |= !super::verify_metadata(&selected_pkgs, dry_run, log::Level::Error)?; - failed |= !super::verify_rate_limit(&selected_pkgs, &index, dry_run, log::Level::Error)?; + failed |= + !super::verify_rate_limit(&selected_pkgs, &mut index, dry_run, log::Level::Error)?; // STEP 1: Release Confirmation super::confirm("Release", &selected_pkgs, self.no_confirm, dry_run)?; diff --git a/src/steps/replace.rs b/src/steps/replace.rs index 492275d7a..6a5b71cd1 100644 --- a/src/steps/replace.rs +++ b/src/steps/replace.rs @@ -43,7 +43,7 @@ pub struct ReplaceStep { impl ReplaceStep { pub fn run(&self) -> Result<(), CliError> { git::git_version()?; - let index = crate::steps::index::open_crates_io_index()?; + let mut index = crate::steps::index::CratesIoIndex::open()?; if self.dry_run { let _ = @@ -83,7 +83,7 @@ impl ReplaceStep { { let version = &pkg.initial_version; if !crate::ops::cargo::is_published( - &index, + &mut index, crate_name, &version.full_version_string, ) {