diff --git a/Cargo.lock b/Cargo.lock index 87b358fa4..27e303244 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -31,9 +31,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] @@ -61,24 +61,23 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anstyle-parse" @@ -100,9 +99,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -137,9 +136,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b74f44609f0f91493e3082d3734d98497e094777144380ea4db9f9905dd5b6" +checksum = "d495b6dc0184693324491a5ac05f559acc97bf937ab31d7a1c33dd0016be6d2b" dependencies = [ "bzip2", "flate2", @@ -226,13 +225,13 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -249,7 +248,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -277,9 +276,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -301,9 +300,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bitflags" @@ -390,9 +389,9 @@ dependencies = [ [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "bzip2" @@ -441,18 +440,17 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -466,13 +464,12 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.23" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03aef18ddf7d879c15ce20f04826ef8418101c7e528014c3eeea13321047dca3" +checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] @@ -487,9 +484,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.23" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ce6fffb678c9b80a70b6b6de0aad31df727623a70fd9a842c30cd573e2fa98" +checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" dependencies = [ "anstream", "anstyle", @@ -499,30 +496,30 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.3.2" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" +checksum = "4110a1e6af615a9e6d0a36f805d5c99099f8bab9b8042f5bc1fa220a4a89e36f" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "colorchoice" @@ -660,7 +657,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -671,7 +668,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -762,9 +759,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] @@ -778,7 +775,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -799,7 +796,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -810,9 +807,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -985,7 +982,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -1046,15 +1043,15 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "glob" @@ -1068,7 +1065,7 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "fnv", "futures-core", "futures-sink", @@ -1147,7 +1144,7 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "fnv", "itoa", ] @@ -1158,7 +1155,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "http", "pin-project-lite", ] @@ -1196,7 +1193,7 @@ version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "futures-channel", "futures-core", "futures-util", @@ -1234,7 +1231,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "hyper", "native-tls", "tokio", @@ -1371,7 +1368,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", - "rustix 0.38.8", + "rustix 0.38.13", "windows-sys 0.48.0", ] @@ -1469,7 +1466,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -1533,9 +1530,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" [[package]] name = "log" @@ -1563,9 +1560,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memmap2" @@ -1623,7 +1620,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -1634,9 +1631,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minijinja" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e436cdb19900a08197c6b874280d24f9289d127275eadc23623276e0f5ec97e9" +checksum = "50c43c912b380856deeb78d826e3b77df13a90e69aef6223e3ad28c02d2ca857" dependencies = [ "serde", ] @@ -1663,7 +1660,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -1693,15 +1690,14 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.7.1", - "static_assertions", ] [[package]] @@ -1749,9 +1745,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -1827,9 +1823,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -1848,11 +1844,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.56" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if", "foreign-types", "libc", @@ -1869,7 +1865,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -1880,9 +1876,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.91" +version = "0.9.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" +checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", @@ -1937,7 +1933,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -1960,9 +1956,9 @@ checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" [[package]] name = "path-dedot" -version = "3.1.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d55e486337acb9973cdea3ec5638c1b3bcb22e573b2b7b41969e0c744d5a15e" +checksum = "07ba0ad7e047712414213ff67533e6dd477af0a4e1d14fb52343e53d30ea9397" dependencies = [ "once_cell", ] @@ -1985,9 +1981,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2059,7 +2055,7 @@ dependencies = [ "line-wrap", "quick-xml", "serde", - "time 0.3.25", + "time", ] [[package]] @@ -2080,9 +2076,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32154ba0af3a075eefa1eda8bb414ee928f62303a54ea85b8d6638ff1a6ee9e" +checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" [[package]] name = "ppv-lite86" @@ -2184,11 +2180,11 @@ dependencies = [ [[package]] name = "rattler" version = "0.8.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#fd4029f2b9d4a524aa92a44c46916d6dff798db6" +source = "git+https://github.com/mamba-org/rattler?branch=main#9540d89456b1b072125da49ff36edd0fed85fac4" dependencies = [ "anyhow", "async-compression", - "bytes 1.4.0", + "bytes 1.5.0", "chrono", "digest", "dirs", @@ -2224,7 +2220,7 @@ dependencies = [ [[package]] name = "rattler_conda_types" version = "0.8.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#fd4029f2b9d4a524aa92a44c46916d6dff798db6" +source = "git+https://github.com/mamba-org/rattler?branch=main#9540d89456b1b072125da49ff36edd0fed85fac4" dependencies = [ "chrono", "fxhash", @@ -2253,7 +2249,7 @@ dependencies = [ [[package]] name = "rattler_digest" version = "0.8.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#fd4029f2b9d4a524aa92a44c46916d6dff798db6" +source = "git+https://github.com/mamba-org/rattler?branch=main#9540d89456b1b072125da49ff36edd0fed85fac4" dependencies = [ "blake2", "digest", @@ -2268,27 +2264,26 @@ dependencies = [ [[package]] name = "rattler_libsolv_rs" version = "0.8.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#fd4029f2b9d4a524aa92a44c46916d6dff798db6" +source = "git+https://github.com/mamba-org/rattler?branch=main#9540d89456b1b072125da49ff36edd0fed85fac4" dependencies = [ "itertools", "petgraph", - "rattler_conda_types", "tracing", ] [[package]] name = "rattler_macros" version = "0.8.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#fd4029f2b9d4a524aa92a44c46916d6dff798db6" +source = "git+https://github.com/mamba-org/rattler?branch=main#9540d89456b1b072125da49ff36edd0fed85fac4" dependencies = [ "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] name = "rattler_networking" version = "0.8.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#fd4029f2b9d4a524aa92a44c46916d6dff798db6" +source = "git+https://github.com/mamba-org/rattler?branch=main#9540d89456b1b072125da49ff36edd0fed85fac4" dependencies = [ "anyhow", "dirs", @@ -2307,7 +2302,7 @@ dependencies = [ [[package]] name = "rattler_package_streaming" version = "0.8.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#fd4029f2b9d4a524aa92a44c46916d6dff798db6" +source = "git+https://github.com/mamba-org/rattler?branch=main#9540d89456b1b072125da49ff36edd0fed85fac4" dependencies = [ "bzip2", "chrono", @@ -2330,7 +2325,7 @@ dependencies = [ [[package]] name = "rattler_repodata_gateway" version = "0.8.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#fd4029f2b9d4a524aa92a44c46916d6dff798db6" +source = "git+https://github.com/mamba-org/rattler?branch=main#9540d89456b1b072125da49ff36edd0fed85fac4" dependencies = [ "anyhow", "async-compression", @@ -2368,7 +2363,7 @@ dependencies = [ [[package]] name = "rattler_shell" version = "0.8.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#fd4029f2b9d4a524aa92a44c46916d6dff798db6" +source = "git+https://github.com/mamba-org/rattler?branch=main#9540d89456b1b072125da49ff36edd0fed85fac4" dependencies = [ "enum_dispatch", "indexmap 2.0.0", @@ -2385,9 +2380,10 @@ dependencies = [ [[package]] name = "rattler_solve" version = "0.8.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#fd4029f2b9d4a524aa92a44c46916d6dff798db6" +source = "git+https://github.com/mamba-org/rattler?branch=main#9540d89456b1b072125da49ff36edd0fed85fac4" dependencies = [ "anyhow", + "chrono", "hex", "rattler_conda_types", "rattler_digest", @@ -2402,7 +2398,7 @@ dependencies = [ [[package]] name = "rattler_virtual_packages" version = "0.8.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#fd4029f2b9d4a524aa92a44c46916d6dff798db6" +source = "git+https://github.com/mamba-org/rattler?branch=main#9540d89456b1b072125da49ff36edd0fed85fac4" dependencies = [ "cfg-if", "libloading", @@ -2469,14 +2465,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.3" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.6", - "regex-syntax 0.7.4", + "regex-automata 0.3.8", + "regex-syntax 0.7.5", ] [[package]] @@ -2490,13 +2486,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax 0.7.5", ] [[package]] @@ -2507,19 +2503,19 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" -version = "0.11.19" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20b9b67e2ca7dd9e9f9285b759de30ff538aab981abaaf7bc9bd90b84a0126c3" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ "async-compression", "base64", - "bytes 1.4.0", + "bytes 1.5.0", "encoding_rs", "futures-core", "futures-util", @@ -2605,22 +2601,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.8" +version = "0.38.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" dependencies = [ "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.5", + "linux-raw-sys 0.4.7", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.21.6" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", @@ -2746,9 +2742,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.185" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] @@ -2764,20 +2760,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.185" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "2cc66a619ed80bf7a0f6b17dd063a84b88f6dea1813737cf469aef1d081142c2" dependencies = [ "indexmap 2.0.0", "itoa", @@ -2793,7 +2789,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -2831,7 +2827,7 @@ dependencies = [ "serde", "serde_json", "serde_with_macros", - "time 0.3.25", + "time", ] [[package]] @@ -2843,7 +2839,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -2892,9 +2888,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signal-hook" @@ -3011,7 +3007,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -3067,9 +3063,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.29" +version = "2.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" dependencies = [ "proc-macro2", "quote", @@ -3078,9 +3074,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.29.8" +version = "0.29.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d10ed79c22663a35a255d289a7fdcb43559fc77ff15df5ce6c341809e7867528" +checksum = "0a18d114d420ada3a891e6bc8e96a2023402203296a47cdd65083377dad18ba5" dependencies = [ "cfg-if", "core-foundation-sys", @@ -3111,7 +3107,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.38.8", + "rustix 0.38.13", "windows-sys 0.48.0", ] @@ -3148,22 +3144,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -3178,20 +3174,9 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ "deranged", "itoa", @@ -3208,9 +3193,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -3237,7 +3222,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ "backtrace", - "bytes 1.4.0", + "bytes 1.5.0", "libc", "mio", "num_cpus", @@ -3267,7 +3252,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -3307,7 +3292,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "futures-core", "futures-sink", "pin-project-lite", @@ -3317,9 +3302,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", @@ -3338,9 +3323,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.0.0", "serde", @@ -3375,7 +3360,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", ] [[package]] @@ -3495,9 +3480,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -3554,12 +3539,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -3587,7 +3566,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", "wasm-bindgen-shared", ] @@ -3621,7 +3600,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.32", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3826,9 +3805,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.14" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] @@ -3947,7 +3926,7 @@ dependencies = [ "crc32fast", "crossbeam-utils", "flate2", - "time 0.3.25", + "time", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index c2cc96452..91dcdc79a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,10 +17,10 @@ slow_integration_tests = [] [dependencies] atty = "0.2" -chrono = "0.4.26" -clap = { version = "4.3.16", default-features = false, features = ["derive", "usage", "wrap_help", "std", "color", "error-context"] } +chrono = "0.4.28" +clap = { version = "4.4.2", default-features = false, features = ["derive", "usage", "wrap_help", "std", "color", "error-context"] } clap-verbosity-flag = "2.0.1" -clap_complete = "4.3.2" +clap_complete = "4.4.0" console = { version = "0.15.7", features = ["windows-console-colors"] } deno_task_shell = "0.13.2" # deno_task_shell = { path = "../deno_task_shell" } @@ -28,12 +28,12 @@ dirs = "5.0.1" dunce = "1.0.4" futures = "0.3.28" indexmap = { version = "1.9.3", features = ["serde"] } -indicatif = "0.17.5" +indicatif = "0.17.6" insta = { version = "1.31.0", features = ["yaml"] } is_executable = "1.0.1" itertools = "0.11.0" miette = { version = "5.10.0", features = ["fancy", "supports-color", "supports-hyperlinks", "supports-unicode", "terminal_size", "textwrap"] } -minijinja = { version = "1.0.5", features = ["builtins"] } +minijinja = { version = "1.0.7", features = ["builtins"] } once_cell = "1.18.0" rattler = { version = "0.8.0", default-features = false } rattler_conda_types = { version = "0.8.0", default-features = false } @@ -43,25 +43,25 @@ rattler_repodata_gateway = { version = "0.8.0", default-features = false, featur rattler_shell = { version = "0.8.0", default-features = false, features = ["sysinfo"] } rattler_solve = { version = "0.8.0", default-features = false, features = ["libsolv_rs"] } rattler_virtual_packages = { version = "0.8.0", default-features = false } -reqwest = { version = "0.11.18", default-features = false } -serde = "1.0.171" -serde_json = "1.0.103" +reqwest = { version = "0.11.20", default-features = false } +serde = "1.0.188" +serde_json = "1.0.105" serde_spanned = "0.6.3" -serde_with = { version = "3.1.0", features = ["indexmap"] } +serde_with = { version = "3.3.0", features = ["indexmap"] } spdx = "0.10.2" strsim = "0.10.0" -tempfile = "3.6.0" -tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread", "signal"] } +tempfile = "3.8.0" +tokio = { version = "1.32.0", features = ["macros", "rt-multi-thread", "signal"] } tokio-util = "0.7.8" toml_edit = { version = "0.19.14", features = ["serde"] } tracing = "0.1.37" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } -url = "2.4.0" +url = "2.4.1" [dev-dependencies] rattler_digest = "0.8.0" -serde_json = "1.0.103" -tokio = { version = "1.29.1", features = ["rt"] } +serde_json = "1.0.105" +tokio = { version = "1.32.0", features = ["rt"] } toml = "0.7.6" [patch.crates-io] diff --git a/src/cli/add.rs b/src/cli/add.rs index 652cf2e83..f16ae1c01 100644 --- a/src/cli/add.rs +++ b/src/cli/add.rs @@ -11,8 +11,10 @@ use console::style; use indexmap::IndexMap; use itertools::Itertools; use miette::{IntoDiagnostic, WrapErr}; +use rattler_conda_types::version_spec::StrictRangeOperator; +use rattler_conda_types::PackageName; use rattler_conda_types::{ - version_spec::VersionOperator, MatchSpec, NamelessMatchSpec, Platform, Version, VersionSpec, + MatchSpec, NamelessMatchSpec, Platform, StrictVersion, Version, VersionSpec, }; use rattler_repodata_gateway::sparse::SparseRepoData; use rattler_solve::{libsolv_rs, SolverImpl}; @@ -121,7 +123,7 @@ pub async fn add_specs_to_project( Some(name) => Ok((name.clone(), spec.into())), None => Err(miette::miette!("missing package name for spec '{spec}'")), }) - .collect::>>()?; + .collect::>>()?; // Get the current specs @@ -154,7 +156,7 @@ pub async fn add_specs_to_project( Err(err) => { return Err(err).wrap_err_with(||miette::miette!( "could not determine any available versions for {} on {platform}. Either the package could not be found or version constraints on other dependencies result in a conflict.", - new_specs.keys().join(", ") + new_specs.keys().map(|s| s.as_source()).join(", ") )); } }; @@ -183,9 +185,9 @@ pub async fn add_specs_to_project( .expect("a version must have been previously selected"); let updated_spec = if spec.version.is_none() { let mut updated_spec = spec.clone(); - updated_spec.version = Some(VersionSpec::Operator( - VersionOperator::StartsWith, - best_version, + updated_spec.version = Some(VersionSpec::StrictRange( + StrictRangeOperator::StartsWith, + StrictVersion(best_version), )); updated_spec } else { @@ -256,11 +258,11 @@ pub async fn add_specs_to_project( /// Given several specs determines the highest installable version for them. pub fn determine_best_version( - new_specs: &HashMap, - current_specs: &IndexMap, + new_specs: &HashMap, + current_specs: &IndexMap, sparse_repo_data: &[SparseRepoData], platform: Platform, -) -> miette::Result> { +) -> miette::Result> { let combined_specs = current_specs .iter() .chain(new_specs.iter()) diff --git a/src/cli/global/install.rs b/src/cli/global/install.rs index 075e0eaad..3aba4b569 100644 --- a/src/cli/global/install.rs +++ b/src/cli/global/install.rs @@ -8,7 +8,7 @@ use dirs::home_dir; use itertools::Itertools; use miette::IntoDiagnostic; use rattler::install::Transaction; -use rattler_conda_types::{Channel, ChannelConfig, MatchSpec, Platform, PrefixRecord}; +use rattler_conda_types::{Channel, ChannelConfig, MatchSpec, PackageName, Platform, PrefixRecord}; use rattler_networking::AuthenticatedClient; use rattler_repodata_gateway::sparse::SparseRepoData; use rattler_shell::{ @@ -80,12 +80,12 @@ pub(crate) struct BinEnvDir(pub PathBuf); impl BinEnvDir { /// Construct the path to the env directory for the binary package `package_name`. - fn package_bin_env_dir(package_name: &str) -> miette::Result { - Ok(bin_env_dir()?.join(package_name)) + fn package_bin_env_dir(package_name: &PackageName) -> miette::Result { + Ok(bin_env_dir()?.join(package_name.as_normalized())) } /// Get the Binary Environment directory, erroring if it doesn't already exist. - pub async fn from_existing(package_name: &str) -> miette::Result { + pub async fn from_existing(package_name: &PackageName) -> miette::Result { let bin_env_dir = Self::package_bin_env_dir(package_name)?; if tokio::fs::try_exists(&bin_env_dir) .await @@ -94,13 +94,14 @@ impl BinEnvDir { Ok(Self(bin_env_dir)) } else { Err(miette::miette!( - "could not find environment for package {package_name}" + "could not find environment for package {}", + package_name.as_source() )) } } /// Create the Binary Environment directory - pub async fn create(package_name: &str) -> miette::Result { + pub async fn create(package_name: &PackageName) -> miette::Result { let bin_env_dir = Self::package_bin_env_dir(package_name)?; tokio::fs::create_dir_all(&bin_env_dir) .await @@ -119,13 +120,13 @@ pub(crate) fn bin_env_dir() -> miette::Result { /// Find the designated package in the prefix pub(crate) async fn find_designated_package( prefix: &Prefix, - package_name: &str, + package_name: &PackageName, ) -> miette::Result { let prefix_records = prefix.find_installed_packages(None).await?; prefix_records .into_iter() - .find(|r| r.repodata_record.package_record.name == package_name) - .ok_or_else(|| miette::miette!("could not find {} in prefix", package_name)) + .find(|r| r.repodata_record.package_record.name == *package_name) + .ok_or_else(|| miette::miette!("could not find {} in prefix", package_name.as_source())) } /// Create the environment activation script @@ -391,7 +392,7 @@ pub async fn execute(args: Args) -> miette::Result<()> { if scripts.is_empty() { miette::bail!( "could not find an executable entrypoint in package {} {} {} from {}, are you sure it exists?", - console::style(prefix_package.repodata_record.package_record.name).bold(), + console::style(prefix_package.repodata_record.package_record.name.as_source()).bold(), console::style(prefix_package.repodata_record.package_record.version).bold(), console::style(prefix_package.repodata_record.package_record.build).bold(), channel, @@ -401,7 +402,14 @@ pub async fn execute(args: Args) -> miette::Result<()> { eprintln!( "{}Installed package {} {} {} from {}", console::style(console::Emoji("✔ ", "")).green(), - console::style(prefix_package.repodata_record.package_record.name).bold(), + console::style( + prefix_package + .repodata_record + .package_record + .name + .as_source() + ) + .bold(), console::style(prefix_package.repodata_record.package_record.version).bold(), console::style(prefix_package.repodata_record.package_record.build).bold(), channel, diff --git a/src/cli/global/list.rs b/src/cli/global/list.rs index 992d5279d..dfb2d67e9 100644 --- a/src/cli/global/list.rs +++ b/src/cli/global/list.rs @@ -1,9 +1,11 @@ use std::collections::HashSet; use std::fmt::Display; +use std::str::FromStr; use clap::Parser; use itertools::Itertools; use miette::IntoDiagnostic; +use rattler_conda_types::PackageName; use crate::cli::global::install::{ bin_env_dir, find_and_map_executable_scripts, find_designated_package, BinDir, BinEnvDir, @@ -17,7 +19,7 @@ pub struct Args {} #[derive(Debug)] struct InstalledPackageInfo { - name: String, + name: PackageName, binaries: Vec, } @@ -31,7 +33,7 @@ impl Display for InstalledPackageInfo { write!( f, " - [package] {}\n - {binaries}", - console::style(&self.name).bold() + console::style(&self.name.as_source()).bold() ) } } @@ -50,7 +52,8 @@ pub async fn execute(_args: Args) -> miette::Result<()> { .into_diagnostic()?; while let Some(entry) = dir_contents.next_entry().await.into_diagnostic()? { if entry.file_type().await.into_diagnostic()?.is_dir() { - packages.push(entry.file_name().to_string_lossy().to_string()); + let Ok(name) = PackageName::from_str(entry.file_name().to_string_lossy().as_ref()) else { continue }; + packages.push(name); } } diff --git a/src/cli/global/remove.rs b/src/cli/global/remove.rs index ff2b19f49..483eca409 100644 --- a/src/cli/global/remove.rs +++ b/src/cli/global/remove.rs @@ -88,7 +88,7 @@ pub async fn execute(args: Args) -> miette::Result<()> { eprintln!( "{}Successfully removed global package {}", console::style(console::Emoji("✔ ", "")).green(), - console::style(package_name).bold(), + console::style(package_name.as_source()).bold(), ); } else { let whitespace = console::Emoji(" ", "").to_string(); @@ -98,7 +98,7 @@ pub async fn execute(args: Args) -> miette::Result<()> { .join(&format!("\n{whitespace} - ")); miette::bail!( "got multiple errors trying to remove global package {}:\n{} - {}", - package_name, + package_name.as_source(), whitespace, error_string, ); diff --git a/src/cli/search.rs b/src/cli/search.rs index 0843e25b7..47c9147af 100644 --- a/src/cli/search.rs +++ b/src/cli/search.rs @@ -3,7 +3,7 @@ use std::{cmp::Ordering, path::PathBuf}; use clap::Parser; use itertools::Itertools; use miette::IntoDiagnostic; -use rattler_conda_types::{Channel, ChannelConfig, Platform, RepoDataRecord}; +use rattler_conda_types::{Channel, ChannelConfig, PackageName, Platform, RepoDataRecord}; use rattler_repodata_gateway::sparse::SparseRepoData; use strsim::jaro; use tokio::task::spawn_blocking; @@ -34,12 +34,12 @@ pub struct Args { /// fetch packages from `repo_data` based on `filter_func` fn search_package_by_filter( - package: &str, + package: &PackageName, repo_data: &[SparseRepoData], filter_func: F, ) -> miette::Result> where - F: Fn(&str, &str) -> bool, + F: Fn(&str, &PackageName) -> bool, { let similar_packages = repo_data .iter() @@ -55,7 +55,9 @@ where // add the latest version of the fetched package to latest_packages vector for repo in repo_data { for package in &similar_packages { - let mut records = repo.load_records(package).into_diagnostic()?; + let mut records = repo + .load_records(&PackageName::new_unchecked(*package)) + .into_diagnostic()?; // sort records by version, get the latest one records.sort_by(|a, b| a.package_record.version.cmp(&b.package_record.version)); let latest_package = records.last().cloned(); @@ -96,17 +98,18 @@ pub async fn execute(args: Args) -> miette::Result<()> { let platforms = [Platform::current()]; let repo_data = fetch_sparse_repodata(&channels, &platforms).await?; - let p = package_name.clone(); + let p = PackageName::try_from(package_name.clone()).into_diagnostic()?; let mut packages = await_in_progress( "searching packages", spawn_blocking(move || { - let packages = search_package_by_filter(&p, &repo_data, |pn, n| pn.contains(n)); + let packages = + search_package_by_filter(&p, &repo_data, |pn, n| pn.contains(n.as_normalized())); match packages { Ok(packages) => { if packages.is_empty() { let similarity = 0.6; return search_package_by_filter(&p, &repo_data, |pn, n| { - jaro(pn, n) > similarity + jaro(pn, n.as_normalized()) > similarity }); } Ok(packages) @@ -119,8 +122,8 @@ pub async fn execute(args: Args) -> miette::Result<()> { .into_diagnostic()??; packages.sort_by(|a, b| { - let ord = jaro(&b.package_record.name, &package_name) - .partial_cmp(&jaro(&a.package_record.name, &package_name)); + let ord = jaro(b.package_record.name.as_normalized(), &package_name) + .partial_cmp(&jaro(a.package_record.name.as_normalized(), &package_name)); if let Some(ord) = ord { ord } else { @@ -155,7 +158,7 @@ pub async fn execute(args: Args) -> miette::Result<()> { println!( "{:40} {:19} {:19}", - console::style(package_name).cyan().bright(), + console::style(package_name.as_source()).cyan().bright(), console::style(version), console::style(channel_name), ); diff --git a/src/environment.rs b/src/environment.rs index 9f2b1d1fa..fc34b5df2 100644 --- a/src/environment.rs +++ b/src/environment.rs @@ -20,7 +20,7 @@ use rattler_conda_types::{ conda_lock, conda_lock::builder::{LockFileBuilder, LockedPackage, LockedPackages}, conda_lock::CondaLock, - MatchSpec, NamelessMatchSpec, Platform, PrefixRecord, RepoDataRecord, Version, + MatchSpec, NamelessMatchSpec, PackageName, Platform, PrefixRecord, RepoDataRecord, Version, }; use rattler_networking::AuthenticatedClient; use rattler_repodata_gateway::sparse::SparseRepoData; @@ -189,13 +189,13 @@ pub fn lock_file_up_to_date(project: &Project, lock_file: &CondaLock) -> miette: if let Some(vpkg) = virtual_packages.get(&name) { if let Some(version_spec) = spec.version { if !version_spec.matches(&vpkg.version) { - tracing::info!("found a dependency on virtual package '{}' but the version spec '{}' does not match the expected version of the virtual package '{}'.", &name, &version_spec, &vpkg.version); + tracing::info!("found a dependency on virtual package '{}' but the version spec '{}' does not match the expected version of the virtual package '{}'.", name.as_source(), &version_spec, &vpkg.version); return Ok(false); } } if let Some(build_spec) = spec.build { if !build_spec.matches(&vpkg.build_string) { - tracing::info!("found a dependency on virtual package '{}' but the build spec '{}' does not match the expected build of the virtual package '{}'.", &name, &build_spec, &vpkg.build_string); + tracing::info!("found a dependency on virtual package '{}' but the build spec '{}' does not match the expected build of the virtual package '{}'.", name.as_source(), &build_spec, &vpkg.build_string); return Ok(false); } } @@ -213,7 +213,7 @@ pub fn lock_file_up_to_date(project: &Project, lock_file: &CondaLock) -> miette: None => { // No package found that matches the dependency, the lock file is not in a // consistent state. - tracing::info!("failed to find a locked package for '{} {}', assuming the lock file is out of date.", &name, &spec); + tracing::info!("failed to find a locked package for '{} {}', assuming the lock file is out of date.", name.as_source(), &spec); return Ok(false); } Some(package) => { @@ -253,11 +253,11 @@ pub fn lock_file_up_to_date(project: &Project, lock_file: &CondaLock) -> miette: /// TODO: Make this more elaborate to include all properties of MatchSpec fn locked_dependency_satisfies( locked_package: &conda_lock::LockedDependency, - name: &str, + name: &PackageName, spec: &NamelessMatchSpec, ) -> bool { // Check if the name of the package matches - if locked_package.name.as_str() != name { + if locked_package.name != *name { return false; } @@ -330,7 +330,7 @@ pub async fn update_lock_file( // Load only records we need for this platform let available_packages = SparseRepoData::load_records_recursive( platform_sparse_repo_data, - package_names.iter().copied(), + package_names.into_iter().cloned(), None, ) .into_diagnostic()?; @@ -596,7 +596,11 @@ async fn install_package_to_environment( // Write the conda-meta information let pkg_meta_path = conda_meta_path.join(format!( "{}-{}-{}.json", - prefix_record.repodata_record.package_record.name, + prefix_record + .repodata_record + .package_record + .name + .as_source(), prefix_record.repodata_record.package_record.version, prefix_record.repodata_record.package_record.build )); @@ -642,7 +646,7 @@ async fn remove_package_from_environment( // Remove the conda-meta file let conda_meta_path = target_prefix.join("conda-meta").join(format!( "{}-{}-{}.json", - package.repodata_record.package_record.name, + package.repodata_record.package_record.name.as_normalized(), package.repodata_record.package_record.version, package.repodata_record.package_record.build )); diff --git a/src/project/mod.rs b/src/project/mod.rs index 95a81a885..4e1e68e1e 100644 --- a/src/project/mod.rs +++ b/src/project/mod.rs @@ -8,7 +8,7 @@ use crate::task::{CmdArgs, Task}; use indexmap::IndexMap; use miette::{IntoDiagnostic, LabeledSpan, NamedSource, WrapErr}; use rattler_conda_types::{ - Channel, ChannelConfig, MatchSpec, NamelessMatchSpec, Platform, Version, + Channel, ChannelConfig, MatchSpec, NamelessMatchSpec, PackageName, Platform, Version, }; use rattler_virtual_packages::VirtualPackage; use std::collections::{HashMap, HashSet}; @@ -337,7 +337,7 @@ impl Project { pub fn dependencies( &self, platform: Platform, - ) -> miette::Result> { + ) -> miette::Result> { // Get the base dependencies (defined in the `[dependencies]` section) let base_dependencies = self.manifest.dependencies.iter(); @@ -349,17 +349,18 @@ impl Project { // Combine the specs. // // Note that if a dependency was specified twice the platform specific one "wins". - Ok(base_dependencies + base_dependencies .chain(platform_specific) - .map(|(name, spec)| (name.clone(), spec.clone())) - .collect()) + .map(|(name, spec)| PackageName::try_from(name).map(|name| (name, spec.clone()))) + .collect::>() + .into_diagnostic() } /// Returns the build dependencies of the project. pub fn build_dependencies( &self, platform: Platform, - ) -> miette::Result> { + ) -> miette::Result> { // Get the base dependencies (defined in the `[build-dependencies]` section) let base_dependencies = self.manifest.build_dependencies.iter(); @@ -371,18 +372,19 @@ impl Project { // Combine the specs. // // Note that if a dependency was specified twice the platform specific one "wins". - Ok(base_dependencies + base_dependencies .chain(platform_specific) .flatten() - .map(|(name, spec)| (name.clone(), spec.clone())) - .collect()) + .map(|(name, spec)| PackageName::try_from(name).map(|name| (name, spec.clone()))) + .collect::>() + .into_diagnostic() } /// Returns the host dependencies of the project. pub fn host_dependencies( &self, platform: Platform, - ) -> miette::Result> { + ) -> miette::Result> { // Get the base dependencies (defined in the `[host-dependencies]` section) let base_dependencies = self.manifest.host_dependencies.iter(); @@ -394,18 +396,19 @@ impl Project { // Combine the specs. // // Note that if a dependency was specified twice the platform specific one "wins". - Ok(base_dependencies + base_dependencies .chain(platform_specific) .flatten() - .map(|(name, spec)| (name.clone(), spec.clone())) - .collect()) + .map(|(name, spec)| PackageName::try_from(name).map(|name| (name, spec.clone()))) + .collect::>() + .into_diagnostic() } /// Returns all dependencies of the project. These are the run, host, build dependency sets combined. pub fn all_dependencies( &self, platform: Platform, - ) -> miette::Result> { + ) -> miette::Result> { let mut dependencies = self.dependencies(platform)?; dependencies.extend(self.host_dependencies(platform)?); dependencies.extend(self.build_dependencies(platform)?); @@ -441,7 +444,7 @@ impl Project { fn add_to_deps_table( deps_table: &mut Item, spec: &MatchSpec, - ) -> miette::Result<(String, NamelessMatchSpec)> { + ) -> miette::Result<(PackageName, NamelessMatchSpec)> { // If it doesnt exist create a proper table if deps_table.is_none() { *deps_table = Item::Table(Table::new()); @@ -455,7 +458,7 @@ impl Project { // Determine the name of the package to add let name = spec .name - .as_deref() + .clone() .ok_or_else(|| miette::miette!("* package specifier is not supported"))?; // Format the requirement @@ -465,9 +468,9 @@ impl Project { let nameless = NamelessMatchSpec::from(spec.to_owned()); // Store (or replace) in the document - deps_table.insert(name, Item::Value(nameless.to_string().into())); + deps_table.insert(name.as_source(), Item::Value(nameless.to_string().into())); - Ok((name.to_string(), nameless)) + Ok((name, nameless)) } fn add_dep_to_target_table( @@ -475,7 +478,7 @@ impl Project { platform: Platform, dep_type: String, spec: &MatchSpec, - ) -> miette::Result<(String, NamelessMatchSpec)> { + ) -> miette::Result<(PackageName, NamelessMatchSpec)> { let target = self.doc["target"] .or_insert(Item::Table(Table::new())) .as_table_mut() @@ -507,7 +510,7 @@ impl Project { // Determine the name of the package to add let name = spec .name - .as_deref() + .clone() .ok_or_else(|| miette::miette!("* package specifier is not supported"))?; // Format the requirement @@ -517,9 +520,9 @@ impl Project { let nameless = NamelessMatchSpec::from(spec.to_owned()); // Store (or replace) in the document - dependencies.insert(name, Item::Value(nameless.to_string().into())); + dependencies.insert(name.as_source(), Item::Value(nameless.to_string().into())); - Ok((name.to_string(), nameless)) + Ok((name, nameless)) } pub fn add_target_dependency( @@ -538,7 +541,7 @@ impl Project { .entry(TargetSelector::Platform(platform).into()) .or_insert(TargetMetadata::default()) .dependencies - .insert(name, nameless); + .insert(name.as_source().into(), nameless); Ok(()) } @@ -549,7 +552,7 @@ impl Project { self.manifest .create_or_get_dependencies(spec_type) - .insert(name, nameless); + .insert(name.as_source().into(), nameless); Ok(()) } diff --git a/src/project/snapshots/pixi__project__manifest__test__dependency_types.snap b/src/project/snapshots/pixi__project__manifest__test__dependency_types.snap index d80ebe1c8..56753e82b 100644 --- a/src/project/snapshots/pixi__project__manifest__test__dependency_types.snap +++ b/src/project/snapshots/pixi__project__manifest__test__dependency_types.snap @@ -38,7 +38,7 @@ ProjectManifest { dependencies: { "my-game": NamelessMatchSpec { version: Some( - Operator( + Exact( Equals, Version { version: [[0], [1], [0], [0]], diff --git a/src/project/snapshots/pixi__project__manifest__test__target_specific.snap b/src/project/snapshots/pixi__project__manifest__test__target_specific.snap index 5465accbb..386137779 100644 --- a/src/project/snapshots/pixi__project__manifest__test__target_specific.snap +++ b/src/project/snapshots/pixi__project__manifest__test__target_specific.snap @@ -50,7 +50,7 @@ ProjectManifest { dependencies: { "foo": NamelessMatchSpec { version: Some( - Operator( + Exact( Equals, Version { version: [[0], [3], [4], [5]], @@ -84,7 +84,7 @@ ProjectManifest { dependencies: { "foo": NamelessMatchSpec { version: Some( - Operator( + Exact( Equals, Version { version: [[0], [1], [2], [3]], diff --git a/src/project/snapshots/pixi__project__tests__dependency_sets.snap b/src/project/snapshots/pixi__project__tests__dependency_sets.snap index 5ed94a0ee..e214856a6 100644 --- a/src/project/snapshots/pixi__project__tests__dependency_sets.snap +++ b/src/project/snapshots/pixi__project__tests__dependency_sets.snap @@ -1,12 +1,14 @@ --- source: src/project/mod.rs -assertion_line: 589 expression: "project.all_dependencies(Platform::Linux64).unwrap()" --- { - "foo": NamelessMatchSpec { + PackageName { + normalized: None, + source: "foo", + }: NamelessMatchSpec { version: Some( - Operator( + Exact( Equals, Version { version: [[0], [1], [0]], @@ -23,9 +25,12 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()" md5: None, sha256: None, }, - "libc": NamelessMatchSpec { + PackageName { + normalized: None, + source: "libc", + }: NamelessMatchSpec { version: Some( - Operator( + Exact( Equals, Version { version: [[0], [2], [12]], @@ -42,9 +47,12 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()" md5: None, sha256: None, }, - "bar": NamelessMatchSpec { + PackageName { + normalized: None, + source: "bar", + }: NamelessMatchSpec { version: Some( - Operator( + Exact( Equals, Version { version: [[0], [1], [0]], diff --git a/src/project/snapshots/pixi__project__tests__dependency_target_sets.snap b/src/project/snapshots/pixi__project__tests__dependency_target_sets.snap index 81f401f37..9faf57d85 100644 --- a/src/project/snapshots/pixi__project__tests__dependency_target_sets.snap +++ b/src/project/snapshots/pixi__project__tests__dependency_target_sets.snap @@ -1,12 +1,14 @@ --- source: src/project/mod.rs -assertion_line: 625 expression: "project.all_dependencies(Platform::Linux64).unwrap()" --- { - "foo": NamelessMatchSpec { + PackageName { + normalized: None, + source: "foo", + }: NamelessMatchSpec { version: Some( - Operator( + Exact( Equals, Version { version: [[0], [1], [0]], @@ -23,9 +25,12 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()" md5: None, sha256: None, }, - "wolflib": NamelessMatchSpec { + PackageName { + normalized: None, + source: "wolflib", + }: NamelessMatchSpec { version: Some( - Operator( + Exact( Equals, Version { version: [[0], [1], [0]], @@ -42,9 +47,12 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()" md5: None, sha256: None, }, - "libc": NamelessMatchSpec { + PackageName { + normalized: None, + source: "libc", + }: NamelessMatchSpec { version: Some( - Operator( + Exact( Equals, Version { version: [[0], [2], [12]], @@ -61,9 +69,12 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()" md5: None, sha256: None, }, - "banksy": NamelessMatchSpec { + PackageName { + normalized: None, + source: "banksy", + }: NamelessMatchSpec { version: Some( - Operator( + Exact( Equals, Version { version: [[0], [1], [0]], @@ -80,9 +91,12 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()" md5: None, sha256: None, }, - "bar": NamelessMatchSpec { + PackageName { + normalized: None, + source: "bar", + }: NamelessMatchSpec { version: Some( - Operator( + Exact( Equals, Version { version: [[0], [1], [0]], @@ -99,9 +113,12 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()" md5: None, sha256: None, }, - "baz": NamelessMatchSpec { + PackageName { + normalized: None, + source: "baz", + }: NamelessMatchSpec { version: Some( - Operator( + Exact( Equals, Version { version: [[0], [1], [0]], diff --git a/src/repodata.rs b/src/repodata.rs index 26eea1c14..191b206ef 100644 --- a/src/repodata.rs +++ b/src/repodata.rs @@ -130,13 +130,11 @@ async fn fetch_repo_data_records_with_progress( channel.platform_url(platform), client, repodata_cache, - fetch::FetchRepoDataOptions { - download_progress: Some(Box::new(move |fetch::DownloadProgress { total, bytes }| { - download_progress_progress_bar.set_length(total.unwrap_or(bytes)); - download_progress_progress_bar.set_position(bytes); - })), - ..Default::default() - }, + Default::default(), + Some(Box::new(move |fetch::DownloadProgress { total, bytes }| { + download_progress_progress_bar.set_length(total.unwrap_or(bytes)); + download_progress_progress_bar.set_position(bytes); + })), ) .await; diff --git a/src/virtual_packages.rs b/src/virtual_packages.rs index b0eaf2e1a..6205708cd 100644 --- a/src/virtual_packages.rs +++ b/src/virtual_packages.rs @@ -179,14 +179,14 @@ pub fn verify_current_platform_has_required_virtual_packages( for req_pkg in required_pkgs { if let Some(local_vpkg) = system_virtual_packages.get(&req_pkg.name) { if req_pkg.build_string != local_vpkg.build_string { - miette::bail!("The current system has a mismatching virtual package. The project requires '{}' to be on build '{}' but the system has build '{}'", req_pkg.name, req_pkg.build_string, local_vpkg.build_string); + miette::bail!("The current system has a mismatching virtual package. The project requires '{}' to be on build '{}' but the system has build '{}'", req_pkg.name.as_source(), req_pkg.build_string, local_vpkg.build_string); } if req_pkg.version > local_vpkg.version { - miette::bail!("The current system has a mismatching virtual package. The project requires '{}' to be at least version '{}' but the system has version '{}'", req_pkg.name, req_pkg.version, local_vpkg.version); + miette::bail!("The current system has a mismatching virtual package. The project requires '{}' to be at least version '{}' but the system has version '{}'", req_pkg.name.as_source(), req_pkg.version, local_vpkg.version); } } else { - miette::bail!("The platform you are running on should at least have the virtual package {} on version {}, build_string: {}", req_pkg.name, req_pkg.version, req_pkg.build_string) + miette::bail!("The platform you are running on should at least have the virtual package {} on version {}, build_string: {}", req_pkg.name.as_source(), req_pkg.version, req_pkg.build_string) } } diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 0955d85ba..2e10a1196 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -12,7 +12,7 @@ use pixi::cli::task::{AddArgs, AliasArgs}; use pixi::cli::{add, init, run, task}; use pixi::{consts, Project}; use rattler_conda_types::conda_lock::CondaLock; -use rattler_conda_types::{MatchSpec, Platform, Version}; +use rattler_conda_types::{MatchSpec, PackageName, Platform, Version}; use miette::IntoDiagnostic; use std::path::{Path, PathBuf}; @@ -49,7 +49,7 @@ pub fn string_from_iter(iter: impl IntoIterator>) -> Vec< pub trait LockFileExt { /// Check if this package is contained in the lockfile - fn contains_package(&self, name: impl AsRef) -> bool; + fn contains_package(&self, name: &PackageName) -> bool; /// Check if this matchspec is contained in the lockfile fn contains_matchspec(&self, matchspec: impl IntoMatchSpec) -> bool; /// Check if this matchspec is contained in the lockfile for this platform @@ -61,10 +61,10 @@ pub trait LockFileExt { } impl LockFileExt for CondaLock { - fn contains_package(&self, name: impl AsRef) -> bool { + fn contains_package(&self, name: &PackageName) -> bool { self.package .iter() - .any(|locked_dep| locked_dep.name == name.as_ref()) + .any(|locked_dep| locked_dep.name == *name) } fn contains_matchspec(&self, matchspec: impl IntoMatchSpec) -> bool { diff --git a/tests/common/package_database.rs b/tests/common/package_database.rs index 7ff1760a1..fe9ff0afe 100644 --- a/tests/common/package_database.rs +++ b/tests/common/package_database.rs @@ -7,7 +7,8 @@ use itertools::Itertools; use miette::IntoDiagnostic; use rattler_conda_types::{ - package::ArchiveType, ChannelInfo, PackageRecord, Platform, RepoData, VersionWithSource, + package::ArchiveType, ChannelInfo, PackageName, PackageRecord, Platform, RepoData, + VersionWithSource, }; use std::{collections::HashSet, path::Path}; @@ -140,7 +141,7 @@ impl Package { pub fn file_name(&self) -> String { format!( "{}-{}-{}{}", - self.package_record.name, + self.package_record.name.as_normalized(), self.package_record.version, self.package_record.build, self.archive_type.extension() @@ -206,7 +207,7 @@ impl PackageBuilder { license: None, license_family: None, md5: Some(md5), - name: self.name, + name: PackageName::new_unchecked(self.name), noarch: Default::default(), platform: None, sha256: Some(sha256),