diff --git a/Cargo.lock b/Cargo.lock index 7e50fc6f3..df8c53db8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "2faccea4cc4ab4a667ce676a30e8ec13922a692c99bb8f5b11f1502c72e04220" [[package]] name = "anstyle-parse" @@ -206,9 +206,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb41eb19024a91746eba0773aa5e16036045bbf45733766661099e182ea6a744" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" dependencies = [ "async-lock 3.3.0", "cfg-if", @@ -277,7 +277,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.3.0", + "async-io 2.3.1", "async-lock 2.8.0", "atomic-waker", "cfg-if", @@ -444,16 +444,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "iovec", -] - [[package]] name = "bytes" version = "1.5.0" @@ -467,9 +457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" dependencies = [ "bzip2-sys", - "futures 0.1.31", "libc", - "tokio-io", ] [[package]] @@ -507,9 +495,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" dependencies = [ "android-tzdata", "iana-time-zone", @@ -517,7 +505,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] @@ -563,9 +551,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.4.7" +version = "4.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb0d4825b75ff281318c393e8e1b80c4da9fb75a6b1d98547d389d6fe1f48d2" +checksum = "df631ae429f6613fcd3a7c1adbdb65f637271e561b03680adaa6573015dfb106" dependencies = [ "clap", ] @@ -730,9 +718,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.3" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "fc5d6b04b3fd0ba9926f945895de7d806260a2d7431ba82e7edaecb043c4c6b8" dependencies = [ "darling_core", "darling_macro", @@ -740,9 +728,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "04e48a959bcd5c761246f5d090ebc2fbf7b9cd527a492b07a67510c108f1e7e3" dependencies = [ "fnv", "ident_case", @@ -754,9 +742,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77" dependencies = [ "darling_core", "quote", @@ -1067,12 +1055,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" -[[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.30" @@ -1249,7 +1231,7 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.3", + "regex-automata 0.4.5", "regex-syntax 0.8.2", ] @@ -1270,13 +1252,13 @@ version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ - "bytes 1.5.0", + "bytes", "fnv", "futures-core", "futures-sink", "futures-util", "http", - "indexmap 2.1.0", + "indexmap 2.2.1", "slab", "tokio", "tokio-util", @@ -1349,7 +1331,7 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ - "bytes 1.5.0", + "bytes", "fnv", "itoa", ] @@ -1360,7 +1342,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.5.0", + "bytes", "http", "pin-project-lite", ] @@ -1398,7 +1380,7 @@ version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ - "bytes 1.5.0", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -1436,7 +1418,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.5.0", + "bytes", "hyper", "native-tls", "tokio", @@ -1492,7 +1474,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.5", "same-file", "walkdir", "winapi-util", @@ -1511,9 +1493,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "433de089bd45971eecf4668ee0ee8f4cec17db4f8bd8f7bc3197a6ce37aa7d9b" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -1568,15 +1550,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - [[package]] name = "ipnet" version = "2.9.0" @@ -1611,9 +1584,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -1656,9 +1629,9 @@ dependencies = [ [[package]] name = "keyring" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b479dcf9eae65481044dfda57af7fe2da6c1401180360f6898801fe9ed4db9" +checksum = "1be8bc4c6b6e9d85ecdad090fcf342a9216f53d747a537cc05e3452fd650ca46" dependencies = [ "byteorder", "lazy_static", @@ -1841,9 +1814,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] @@ -1916,9 +1889,9 @@ dependencies = [ [[package]] name = "minijinja" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "431d72874542d43aba1ca605870eacab134fdeb0c8fe27666ecf4b2662239df2" +checksum = "6fe0ff215195a22884d867b547c70a0c4815cbbcc70991f281dca604b20d10ce" dependencies = [ "aho-corasick", "serde", @@ -2130,9 +2103,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.62" +version = "0.10.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" +checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ "bitflags 2.4.2", "cfg-if", @@ -2162,9 +2135,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.98" +version = "0.9.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", @@ -2282,7 +2255,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.2.1", ] [[package]] @@ -2371,7 +2344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" dependencies = [ "base64", - "indexmap 2.1.0", + "indexmap 2.2.1", "line-wrap", "quick-xml", "serde", @@ -2462,9 +2435,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -2541,19 +2514,19 @@ dependencies = [ [[package]] name = "rattler" version = "0.16.2" -source = "git+https://github.com/mamba-org/rattler?branch=main#d1fec29e06e5f6ae7e36e06e510f7f7c43250ef3" +source = "git+https://github.com/mamba-org/rattler?branch=main#f29e1baa86abec6ad5db01b3f81d6726ed317729" dependencies = [ "anyhow", "async-compression", - "bytes 1.5.0", + "bytes", "chrono", "digest", "dirs", "drop_bomb", - "futures 0.3.30", + "futures", "fxhash", "hex", - "indexmap 2.1.0", + "indexmap 2.2.1", "itertools 0.11.0", "memchr", "memmap2 0.7.1", @@ -2567,6 +2540,7 @@ dependencies = [ "reflink-copy", "regex", "reqwest", + "reqwest-middleware", "serde", "serde_json", "serde_with", @@ -2583,7 +2557,7 @@ dependencies = [ [[package]] name = "rattler-build" -version = "0.7.0" +version = "0.8.0" dependencies = [ "anyhow", "base64", @@ -2599,17 +2573,17 @@ dependencies = [ "flate2", "fs-err", "fs_extra", - "futures 0.3.30", + "futures", "globset", "goblin", "hex", "ignore", - "indexmap 2.1.0", + "indexmap 2.2.1", "indicatif", "insta", - "itertools 0.12.0", + "itertools 0.12.1", "marked-yaml", - "memmap2 0.9.3", + "memmap2 0.9.4", "miette", "minijinja", "num_cpus", @@ -2628,6 +2602,7 @@ dependencies = [ "rattler_solve", "rattler_virtual_packages", "reqwest", + "reqwest-middleware", "rstest", "scroll", "serde", @@ -2659,13 +2634,13 @@ dependencies = [ [[package]] name = "rattler_conda_types" version = "0.16.2" -source = "git+https://github.com/mamba-org/rattler?branch=main#d1fec29e06e5f6ae7e36e06e510f7f7c43250ef3" +source = "git+https://github.com/mamba-org/rattler?branch=main#f29e1baa86abec6ad5db01b3f81d6726ed317729" dependencies = [ "chrono", "fxhash", "glob", "hex", - "indexmap 2.1.0", + "indexmap 2.2.1", "itertools 0.11.0", "lazy-regex", "nom", @@ -2688,7 +2663,7 @@ dependencies = [ [[package]] name = "rattler_digest" version = "0.16.2" -source = "git+https://github.com/mamba-org/rattler?branch=main#d1fec29e06e5f6ae7e36e06e510f7f7c43250ef3" +source = "git+https://github.com/mamba-org/rattler?branch=main#f29e1baa86abec6ad5db01b3f81d6726ed317729" dependencies = [ "blake2", "digest", @@ -2703,7 +2678,7 @@ dependencies = [ [[package]] name = "rattler_index" version = "0.16.2" -source = "git+https://github.com/mamba-org/rattler?branch=main#d1fec29e06e5f6ae7e36e06e510f7f7c43250ef3" +source = "git+https://github.com/mamba-org/rattler?branch=main#f29e1baa86abec6ad5db01b3f81d6726ed317729" dependencies = [ "fs-err", "rattler_conda_types", @@ -2717,7 +2692,7 @@ dependencies = [ [[package]] name = "rattler_macros" version = "0.16.2" -source = "git+https://github.com/mamba-org/rattler?branch=main#d1fec29e06e5f6ae7e36e06e510f7f7c43250ef3" +source = "git+https://github.com/mamba-org/rattler?branch=main#f29e1baa86abec6ad5db01b3f81d6726ed317729" dependencies = [ "quote", "syn 2.0.48", @@ -2726,9 +2701,11 @@ dependencies = [ [[package]] name = "rattler_networking" version = "0.16.2" -source = "git+https://github.com/mamba-org/rattler?branch=main#d1fec29e06e5f6ae7e36e06e510f7f7c43250ef3" +source = "git+https://github.com/mamba-org/rattler?branch=main#f29e1baa86abec6ad5db01b3f81d6726ed317729" dependencies = [ "anyhow", + "async-trait", + "base64", "dirs", "fslock", "getrandom", @@ -2739,9 +2716,11 @@ dependencies = [ "netrc-rs", "once_cell", "reqwest", + "reqwest-middleware", "retry-policies", "serde", "serde_json", + "task-local-extensions", "thiserror", "tracing", "url", @@ -2750,7 +2729,7 @@ dependencies = [ [[package]] name = "rattler_package_streaming" version = "0.16.2" -source = "git+https://github.com/mamba-org/rattler?branch=main#d1fec29e06e5f6ae7e36e06e510f7f7c43250ef3" +source = "git+https://github.com/mamba-org/rattler?branch=main#f29e1baa86abec6ad5db01b3f81d6726ed317729" dependencies = [ "bzip2", "chrono", @@ -2761,6 +2740,7 @@ dependencies = [ "rattler_digest", "rattler_networking", "reqwest", + "reqwest-middleware", "serde_json", "tar", "tempfile", @@ -2775,14 +2755,14 @@ dependencies = [ [[package]] name = "rattler_repodata_gateway" version = "0.16.2" -source = "git+https://github.com/mamba-org/rattler?branch=main#d1fec29e06e5f6ae7e36e06e510f7f7c43250ef3" +source = "git+https://github.com/mamba-org/rattler?branch=main#f29e1baa86abec6ad5db01b3f81d6726ed317729" dependencies = [ "anyhow", "async-compression", "blake2", "cache_control", "chrono", - "futures 0.3.30", + "futures", "hex", "humansize", "humantime", @@ -2797,6 +2777,7 @@ dependencies = [ "rattler_digest", "rattler_networking", "reqwest", + "reqwest-middleware", "serde", "serde_json", "serde_with", @@ -2813,10 +2794,10 @@ dependencies = [ [[package]] name = "rattler_shell" version = "0.16.2" -source = "git+https://github.com/mamba-org/rattler?branch=main#d1fec29e06e5f6ae7e36e06e510f7f7c43250ef3" +source = "git+https://github.com/mamba-org/rattler?branch=main#f29e1baa86abec6ad5db01b3f81d6726ed317729" dependencies = [ "enum_dispatch", - "indexmap 2.1.0", + "indexmap 2.2.1", "itertools 0.11.0", "rattler_conda_types", "serde_json", @@ -2830,7 +2811,7 @@ dependencies = [ [[package]] name = "rattler_solve" version = "0.16.2" -source = "git+https://github.com/mamba-org/rattler?branch=main#d1fec29e06e5f6ae7e36e06e510f7f7c43250ef3" +source = "git+https://github.com/mamba-org/rattler?branch=main#f29e1baa86abec6ad5db01b3f81d6726ed317729" dependencies = [ "anyhow", "chrono", @@ -2849,7 +2830,7 @@ dependencies = [ [[package]] name = "rattler_virtual_packages" version = "0.16.2" -source = "git+https://github.com/mamba-org/rattler?branch=main#d1fec29e06e5f6ae7e36e06e510f7f7c43250ef3" +source = "git+https://github.com/mamba-org/rattler?branch=main#f29e1baa86abec6ad5db01b3f81d6726ed317729" dependencies = [ "cfg-if", "libloading", @@ -2916,13 +2897,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.5", "regex-syntax 0.8.2", ] @@ -2937,9 +2918,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -2972,7 +2953,7 @@ checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ "async-compression", "base64", - "bytes 1.5.0", + "bytes", "encoding_rs", "futures-core", "futures-util", @@ -3012,11 +2993,26 @@ dependencies = [ "winreg", ] +[[package]] +name = "reqwest-middleware" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a3e86aa6053e59030e7ce2d2a3b258dd08fc2d337d52f73f6cb480f5858690" +dependencies = [ + "anyhow", + "async-trait", + "http", + "reqwest", + "serde", + "task-local-extensions", + "thiserror", +] + [[package]] name = "resolvo" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "554db165775d6858d17a9626c327b796d81db95db0a4cd6ca0efdfb7e7e3a264" +checksum = "acd163bc7df01195423c83a7a391fecf319ff41d3de899694a9ccb698e790b29" dependencies = [ "bitvec", "elsa", @@ -3056,7 +3052,7 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" dependencies = [ - "futures 0.3.30", + "futures", "futures-timer", "rstest_macros", "rustc_version", @@ -3085,7 +3081,7 @@ version = "0.1.0" dependencies = [ "duct", "glob", - "itertools 0.12.0", + "itertools 0.12.1", "rattler_package_streaming", "serde_json", "sha1", @@ -3298,18 +3294,18 @@ checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "serde" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", @@ -3318,11 +3314,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.1", "itoa", "ryu", "serde", @@ -3362,15 +3358,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.4.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" +checksum = "1b0ed1662c5a68664f45b76d18deb0e234aff37207086803165c961eb695e981" dependencies = [ "base64", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.1.0", + "indexmap 2.2.1", "serde", "serde_json", "serde_with_macros", @@ -3379,9 +3375,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.4.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" +checksum = "568577ff0ef47b879f736cd66740e022f3672788cdf002a05a4e609ea5a6fb15" dependencies = [ "darling", "proc-macro2", @@ -3391,11 +3387,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.30" +version = "0.9.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" +checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.1", "itoa", "ryu", "serde", @@ -3445,9 +3441,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" @@ -3481,9 +3477,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.12.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" dependencies = [ "serde", ] @@ -3613,9 +3609,9 @@ dependencies = [ [[package]] name = "supports-unicode" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6c2cb240ab5dd21ed4906895ee23fe5a48acdbd15a3ce388e7b62a9b66baf7" +checksum = "f850c19edd184a205e883199a261ed44471c81e39bd95b1357f5febbef00e77a" dependencies = [ "is-terminal", ] @@ -3695,6 +3691,15 @@ dependencies = [ "xattr", ] +[[package]] +name = "task-local-extensions" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba323866e5d033818e3240feeb9f7db2c4296674e4d9e16b97b7bf8f490434e8" +dependencies = [ + "pin-utils", +] + [[package]] name = "tempfile" version = "3.9.0" @@ -3810,7 +3815,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", - "bytes 1.5.0", + "bytes", "libc", "mio", "num_cpus", @@ -3820,17 +3825,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "tokio-io" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "log", -] - [[package]] name = "tokio-macros" version = "2.2.0" @@ -3879,7 +3873,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ - "bytes 1.5.0", + "bytes", "futures-core", "futures-sink", "pin-project-lite", @@ -3914,7 +3908,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.1", "toml_datetime", "winnow", ] @@ -3925,7 +3919,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.1", "serde", "serde_spanned", "toml_datetime", @@ -4140,9 +4134,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ "getrandom", "rand", @@ -4522,9 +4516,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.34" +version = "0.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +checksum = "1931d78a9c73861da0134f453bb1f790ce49b2e30eba8410b4b79bac72b46a2d" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 09f5e32df..50b6cdb6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["rust-tests"] [package] name = "rattler-build" -version = "0.7.0" +version = "0.8.0" authors = ["Wolf Vollprecht "] homepage = "https://github.com/prefix-dev/rattler-build" edition = "2021" @@ -19,8 +19,8 @@ native-tls = ['reqwest/native-tls', 'rattler/native-tls'] rustls-tls = ['reqwest/rustls-tls', 'reqwest/rustls-tls-native-roots', 'rattler/rustls-tls'] [dependencies] -serde = { version = "1.0.195", features = ["derive"] } -serde_yaml = "0.9.30" +serde = { version = "1.0.196", features = ["derive"] } +serde_yaml = "0.9.31" rattler = { version = "0.16.2", default-features = false } rattler_conda_types = { version = "0.16.2", default-features = false } rattler_digest = { version = "0.16.2", default-features = false } @@ -41,18 +41,18 @@ anyhow = "1.0.79" walkdir = "2.4.0" sha2 = "0.10.8" hex = "0.4.3" -serde_json = "1.0.111" +serde_json = "1.0.113" reqwest = { version = "0.11.23", default-features = false, features = [ "multipart", ] } tokio = { version = "1.35.1", features = ["rt", "macros", "rt-multi-thread"] } -itertools = "0.12.0" +itertools = "0.12.1" content_inspector = "0.2.4" -serde_with = "3.4.0" +serde_with = "3.6.0" url = "2.5.0" tracing = "0.1.40" clap = { version = "4.4.18", features = ["derive", "env", "cargo"] } -minijinja = { version = "1.0.11", features = [ +minijinja = { version = "1.0.12", features = [ "unstable_machinery", "custom_syntax", ] } @@ -74,7 +74,7 @@ console = { version = "0.15.8", features = ["windows-console-colors"] } once_cell = "1.19.0" thiserror = "1.0.56" tempfile = "3.9.0" -chrono = "0.4.31" +chrono = "0.4.33" sha1 = "0.10.6" spdx = "0.10.3" fs_extra = "1.3.0" @@ -84,11 +84,11 @@ tracing-indicatif = "0.3.6" clap-verbosity-flag = "2.1.2" tracing-core = "0.1.32" petgraph = "0.6.4" -indexmap = "2.1.0" +indexmap = "2.2.1" dunce = "1.0.4" fs-err = "2.11.0" which = "6.0.0" -clap_complete = "4.4.7" +clap_complete = "4.4.9" tokio-util = "0.7.10" tar = "0.4.40" @@ -102,8 +102,9 @@ flate2 = "1.0.28" xz2 = "0.1.7" zstd = "0.13.0" toml = "0.8.8" -memmap2 = "0.9.3" +memmap2 = "0.9.4" os_pipe = "1.1.5" +reqwest-middleware = "0.2.4" [dev-dependencies] insta = { version = "1.34.0", features = ["yaml"] } diff --git a/rust-tests/Cargo.toml b/rust-tests/Cargo.toml index 7abe13107..98092a956 100644 --- a/rust-tests/Cargo.toml +++ b/rust-tests/Cargo.toml @@ -7,8 +7,8 @@ edition = "2021" [dependencies] glob = "0.3.1" -itertools = "0.12.0" +itertools = "0.12.1" rattler_package_streaming = { version = "0.16.2", default-features = false } -serde_json = "1.0.111" +serde_json = "1.0.113" sha1 = "0.10.6" duct = "0.13.7" diff --git a/src/main.rs b/src/main.rs index 1f3733ebc..a23c5846c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,14 +8,12 @@ use fs_err as fs; use indicatif::MultiProgress; use miette::IntoDiagnostic; use rattler_conda_types::{package::ArchiveType, Platform}; -use rattler_networking::AuthenticatedClient; use rattler_package_streaming::write::CompressionLevel; use std::{ collections::BTreeMap, env::current_dir, path::PathBuf, str::{self, FromStr}, - sync::Arc, }; use tracing_subscriber::{ filter::{Directive, ParseError}, @@ -453,33 +451,12 @@ async fn main() -> miette::Result<()> { } } -fn get_auth_store(auth_file: Option) -> rattler_networking::AuthenticationStorage { - match auth_file { - Some(auth_file) => { - let mut store = rattler_networking::AuthenticationStorage::new(); - store.add_backend(Arc::from( - rattler_networking::authentication_storage::backends::file::FileStorage::new( - auth_file, - ), - )); - store - } - None => rattler_networking::AuthenticationStorage::default(), - } -} - async fn run_test_from_args(args: TestOpts) -> miette::Result<()> { let package_file = canonicalize(args.package_file).into_diagnostic()?; let test_prefix = PathBuf::from("test-prefix"); fs::create_dir_all(&test_prefix).into_diagnostic()?; - let client = AuthenticatedClient::from_client( - reqwest::Client::builder() - .no_gzip() - .build() - .expect("failed to create client"), - get_auth_store(args.common.auth_file), - ); + let client = tool_configuration::reqwest_client_from_auth_storage(args.common.auth_file); let test_options = TestConfiguration { test_prefix, @@ -601,13 +578,7 @@ async fn run_build_from_args(args: BuildOpts, multi_progress: MultiProgress) -> tracing::info!("{}\n", table); } - let client = AuthenticatedClient::from_client( - reqwest::Client::builder() - .no_gzip() - .build() - .expect("failed to create client"), - get_auth_store(args.common.auth_file), - ); + let client = tool_configuration::reqwest_client_from_auth_storage(args.common.auth_file); let tool_config = tool_configuration::Configuration { client, @@ -751,8 +722,10 @@ async fn rebuild_from_args(args: RebuildOpts) -> miette::Result<()> { output.build_configuration.directories.output_dir = canonicalize(output_dir).into_diagnostic()?; + let client = tool_configuration::reqwest_client_from_auth_storage(args.common.auth_file); + let tool_config = tool_configuration::Configuration { - client: AuthenticatedClient::default(), + client, multi_progress_indicator: MultiProgress::new(), no_clean: true, no_test: args.no_test, @@ -785,7 +758,7 @@ async fn upload_from_args(args: UploadOpts) -> miette::Result<()> { } } - let store = get_auth_store(args.common.auth_file); + let store = tool_configuration::get_auth_store(args.common.auth_file); match args.server_type { ServerType::Quetz(quetz_opts) => { diff --git a/src/render/solver.rs b/src/render/solver.rs index b2a52d951..ed03475c3 100644 --- a/src/render/solver.rs +++ b/src/render/solver.rs @@ -11,12 +11,12 @@ use rattler_conda_types::{ Channel, ChannelConfig, GenericVirtualPackage, MatchSpec, Platform, PrefixRecord, RepoDataRecord, }; -use rattler_networking::AuthenticatedClient; use rattler_repodata_gateway::fetch::{ CacheResult, DownloadProgress, FetchRepoDataError, FetchRepoDataOptions, }; use rattler_repodata_gateway::sparse::SparseRepoData; use rattler_solve::{resolvo::Solver, SolverImpl, SolverTask}; +use reqwest_middleware::ClientWithMiddleware; use std::{ borrow::Cow, @@ -178,6 +178,7 @@ pub async fn create_environment( virtual_packages, specs: specs.to_vec(), pinned_packages: Vec::new(), + timeout: None, }; // Next, use a solver to solve this specific problem. This provides us with all the operations @@ -242,7 +243,7 @@ async fn execute_transaction( transaction: Transaction, target_prefix: &Path, cache_dir: &Path, - download_client: AuthenticatedClient, + download_client: ClientWithMiddleware, multi_progress: indicatif::MultiProgress, ) -> anyhow::Result<()> { // Open the package cache @@ -326,7 +327,7 @@ async fn execute_transaction( #[allow(clippy::too_many_arguments)] async fn execute_operation( target_prefix: &Path, - download_client: AuthenticatedClient, + download_client: ClientWithMiddleware, package_cache: &PackageCache, install_driver: &InstallDriver, download_pb: Option<&ProgressBar>, @@ -520,7 +521,7 @@ async fn fetch_repo_data_records_with_progress( channel: Channel, platform: Platform, repodata_cache: &Path, - client: AuthenticatedClient, + client: ClientWithMiddleware, multi_progress: indicatif::MultiProgress, allow_not_found: bool, ) -> anyhow::Result> { diff --git a/src/tool_configuration.rs b/src/tool_configuration.rs index ed4ed5f5f..a0b371b1c 100644 --- a/src/tool_configuration.rs +++ b/src/tool_configuration.rs @@ -1,7 +1,10 @@ //! Configuration for the rattler-build tool //! This is useful when using rattler-build as a library -use rattler_networking::AuthenticatedClient; +use std::{path::PathBuf, sync::Arc}; + +use rattler_networking::{authentication_storage, AuthenticationMiddleware, AuthenticationStorage}; +use reqwest_middleware::ClientWithMiddleware; /// Global configuration for the build #[derive(Clone)] @@ -10,7 +13,7 @@ pub struct Configuration { pub multi_progress_indicator: indicatif::MultiProgress, /// The authenticated reqwest download client to use - pub client: AuthenticatedClient, + pub client: ClientWithMiddleware, /// Set this to true if you want to keep the build folder after the build is done pub no_clean: bool, @@ -25,17 +28,44 @@ pub struct Configuration { pub use_bz2: bool, } +pub fn get_auth_store(auth_file: Option) -> AuthenticationStorage { + match auth_file { + Some(auth_file) => { + let mut store = AuthenticationStorage::new(); + store.add_backend(Arc::from( + authentication_storage::backends::file::FileStorage::new(auth_file), + )); + store + } + None => rattler_networking::AuthenticationStorage::default(), + } +} + +pub fn reqwest_client_from_auth_storage(auth_file: Option) -> ClientWithMiddleware { + let auth_storage = get_auth_store(auth_file); + reqwest_middleware::ClientBuilder::new( + reqwest::Client::builder() + .no_gzip() + .build() + .expect("failed to create client"), + ) + .with_arc(Arc::new(AuthenticationMiddleware::new(auth_storage))) + .build() +} + impl Default for Configuration { fn default() -> Self { + let auth_storage = AuthenticationStorage::default(); Self { multi_progress_indicator: indicatif::MultiProgress::new(), - client: AuthenticatedClient::from_client( + client: reqwest_middleware::ClientBuilder::new( reqwest::Client::builder() .no_gzip() .build() .expect("failed to create client"), - rattler_networking::AuthenticationStorage::default(), - ), + ) + .with_arc(Arc::new(AuthenticationMiddleware::new(auth_storage))) + .build(), no_clean: false, no_test: false, use_zstd: true,