diff --git a/Cargo.lock b/Cargo.lock index ee8ec8f88..2ad683c64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 4 +version = 3 [[package]] name = "addr2line" @@ -334,9 +334,9 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.84" +version = "0.1.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1244b10dcd56c92219da4e14caa97e312079e185f04ba3eea25061561dc0a0" +checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" dependencies = [ "proc-macro2", "quote", @@ -432,7 +432,7 @@ name = "barrier_cell" version = "0.1.0" dependencies = [ "parking_lot 0.12.3", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", ] @@ -756,9 +756,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.23" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" +checksum = "9560b07a799281c7e0958b9296854d6fafd4c5f31444a7e5bb1ad6dde5ccf1bd" dependencies = [ "clap_builder", "clap_derive", @@ -776,9 +776,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.23" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" +checksum = "874e0dd3eb68bf99058751ac9712f622e61e6f393a94f7128fa26e3f02f5c7cd" dependencies = [ "anstream", "anstyle", @@ -789,9 +789,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.40" +version = "4.5.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac2e663e3e3bed2d32d065a8404024dad306e699a04263ec59919529f803aee9" +checksum = "942dc5991a34d8cf58937ec33201856feba9cbceeeab5adf04116ec7c763bff1" dependencies = [ "clap", ] @@ -808,9 +808,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.18" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1003,7 +1003,7 @@ version = "3.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" dependencies = [ - "nix 0.29.0", + "nix", "windows-sys 0.59.0", ] @@ -1093,18 +1093,18 @@ dependencies = [ [[package]] name = "deno_task_shell" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa3763bc068e17b6d488fb73ecda463c13ef792b0a5288b6018bc2119becd635" +checksum = "e2da21d6f1061632e50ee585afa570bcad080b7a42fe7baedf447007c49f848e" dependencies = [ "anyhow", "futures", "glob", "monch", - "nix 0.27.1", + "nix", "os_pipe", "path-dedot", - "thiserror 1.0.69", + "thiserror 2.0.10", "tokio", "windows-sys 0.59.0", ] @@ -1339,9 +1339,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.3.1" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" dependencies = [ "concurrent-queue", "parking", @@ -1400,7 +1400,7 @@ checksum = "6f1bb23b4220d7fcd5601b2eccdd3609da6d394bdf02b9f485cc81ecbb9413e6" dependencies = [ "itertools 0.14.0", "percent-encoding", - "thiserror 2.0.9", + "thiserror 2.0.10", "typed-path", "url", ] @@ -1423,6 +1423,12 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "flate2" version = "1.0.35" @@ -1761,9 +1767,9 @@ dependencies = [ [[package]] name = "goblin" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53ab3f32d1d77146981dea5d6b1e8fe31eedcb7013e5e00d6ccd1259a4b4d923" +checksum = "daa0a64d21a7eb230583b4c5f4e23b7e4e57974f96620f42a7e75e08ae66d745" dependencies = [ "log", "plain", @@ -2378,14 +2384,14 @@ dependencies = [ [[package]] name = "insta" -version = "1.41.1" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9ffc4d4892617c50a928c52b2961cb5174b6fc6ebf252b2fac9d21955c48b8" +checksum = "6513e4067e16e69ed1db5ab56048ed65db32d10ba5fc1217f5393f8f17d8b5a5" dependencies = [ "console", "globset", - "lazy_static", "linked-hash-map", + "once_cell", "regex", "serde", "similar", @@ -2475,9 +2481,9 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jiff" -version = "0.1.19" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943611a469f78ab9afdac9022e473a80fca16a9deca6c5be3eb566d872231e76" +checksum = "ed0ce60560149333a8e41ca7dc78799c47c5fd435e2bc18faf6a054382eec037" dependencies = [ "jiff-tzdb-platform", "log", @@ -2724,7 +2730,7 @@ dependencies = [ "log", "secret-service", "security-framework 2.11.1", - "security-framework 3.1.0", + "security-framework 3.2.0", "windows-sys 0.59.0", "zbus", ] @@ -2824,9 +2830,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "litemap" @@ -3003,9 +3009,9 @@ dependencies = [ [[package]] name = "minijinja" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c37e1b517d1dcd0e51dc36c4567b9d5a29262b3ec8da6cb5d35e27a8fb529b5" +checksum = "212b4cab3aad057bc6e611814472905546c533295723b9e26a31c7feb19a8e65" dependencies = [ "serde", ] @@ -3103,17 +3109,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea2970fbbc8c785e8246234a7bd004ed66cd1ed1a35ec73669a92545e419b836" -[[package]] -name = "nix" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" -dependencies = [ - "bitflags 2.6.0", - "cfg-if", - "libc", -] - [[package]] name = "nix" version = "0.29.0" @@ -3529,15 +3524,25 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ - "fixedbitset", + "fixedbitset 0.4.2", + "indexmap 2.7.0", +] + +[[package]] +name = "petgraph" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +dependencies = [ + "fixedbitset 0.5.7", "indexmap 2.7.0", ] [[package]] name = "phf" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ "phf_macros", "phf_shared", @@ -3545,9 +3550,9 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared", "rand", @@ -3555,9 +3560,9 @@ dependencies = [ [[package]] name = "phf_macros" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ "phf_generator", "phf_shared", @@ -3569,9 +3574,9 @@ dependencies = [ [[package]] name = "phf_shared" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ "siphasher", "unicase", @@ -3579,18 +3584,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ "proc-macro2", "quote", @@ -3599,9 +3604,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -3661,7 +3666,7 @@ dependencies = [ "libc", "miette 7.4.0", "minijinja", - "nix 0.29.0", + "nix", "once_cell", "parking_lot 0.12.3", "pep440_rs", @@ -3709,7 +3714,7 @@ dependencies = [ "tabwriter", "tar", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tokio-util", "toml-span", @@ -3777,7 +3782,7 @@ dependencies = [ "serde_yaml", "sha1", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tokio-stream", "tokio-util", @@ -3819,7 +3824,7 @@ dependencies = [ "serde", "serde_ignored", "serde_json", - "thiserror 2.0.9", + "thiserror 2.0.10", "toml_edit", "tracing", "url", @@ -3854,7 +3859,7 @@ dependencies = [ "reqwest", "reqwest-middleware", "serde", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tracing", "url", @@ -3874,7 +3879,7 @@ dependencies = [ "rattler_digest", "rstest", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "wax", ] @@ -3898,7 +3903,6 @@ dependencies = [ "pixi_consts", "pixi_spec", "pixi_toml", - "pixi_utils", "pyproject-toml", "rattler_conda_types", "rattler_lock", @@ -3913,7 +3917,7 @@ dependencies = [ "strsim", "strum", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "toml-span", "toml_edit", "tracing", @@ -3933,7 +3937,7 @@ name = "pixi_pty" version = "0.1.0" dependencies = [ "libc", - "nix 0.29.0", + "nix", "signal-hook", ] @@ -3949,7 +3953,7 @@ dependencies = [ "rattler_digest", "rattler_lock", "serde", - "thiserror 2.0.9", + "thiserror 2.0.10", "typed-path", "url", ] @@ -3970,7 +3974,7 @@ dependencies = [ "serde-untagged", "serde_json", "serde_with", - "thiserror 2.0.9", + "thiserror 2.0.10", "toml-span", "toml_edit", "tracing", @@ -4014,7 +4018,7 @@ dependencies = [ "serde_json", "serde_yaml", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tracing", "tracing-subscriber", "url", @@ -4030,7 +4034,7 @@ dependencies = [ "pixi_manifest", "rattler_lock", "serde_json", - "thiserror 2.0.9", + "thiserror 2.0.10", "url", "uv-configuration", "uv-distribution-filename", @@ -4227,7 +4231,7 @@ dependencies = [ "log", "priority-queue", "rustc-hash", - "thiserror 2.0.9", + "thiserror 2.0.10", "version-ranges", ] @@ -4320,7 +4324,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tracing", ] @@ -4339,7 +4343,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.9", + "thiserror 2.0.10", "tinyvec", "tracing", "web-time", @@ -4454,7 +4458,7 @@ dependencies = [ "simple_spawn_blocking", "smallvec", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tracing", "url", @@ -4485,7 +4489,7 @@ dependencies = [ "reqwest", "reqwest-middleware", "simple_spawn_blocking", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tracing", "url", @@ -4523,7 +4527,7 @@ dependencies = [ "simd-json", "smallvec", "strum", - "thiserror 2.0.9", + "thiserror 2.0.10", "tracing", "typed-path", "url", @@ -4566,7 +4570,7 @@ dependencies = [ "serde_repr", "serde_with", "serde_yaml", - "thiserror 2.0.9", + "thiserror 2.0.10", "typed-path", "url", ] @@ -4605,7 +4609,7 @@ dependencies = [ "retry-policies", "serde", "serde_json", - "thiserror 2.0.9", + "thiserror 2.0.10", "tracing", "url", ] @@ -4630,7 +4634,7 @@ dependencies = [ "serde_json", "tar", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tokio-util", "tracing", @@ -4697,7 +4701,7 @@ dependencies = [ "simple_spawn_blocking", "superslice", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tokio-util", "tracing", @@ -4721,7 +4725,7 @@ dependencies = [ "shlex", "sysinfo", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tracing", ] @@ -4739,7 +4743,7 @@ dependencies = [ "resolvo", "serde", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tracing", "url", ] @@ -4758,7 +4762,7 @@ dependencies = [ "rattler_conda_types", "regex", "serde", - "thiserror 2.0.9", + "thiserror 2.0.10", "tracing", ] @@ -4842,13 +4846,13 @@ dependencies = [ [[package]] name = "reflink-copy" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17400ed684c3a0615932f00c271ae3eea13e47056a1455821995122348ab6438" +checksum = "8a076c8c302cbd01e62bd6c2f74fc4913c3131aa6fa72dae78047f5535e4fc88" dependencies = [ "cfg-if", "rustix", - "windows 0.58.0", + "windows 0.59.0", ] [[package]] @@ -5005,9 +5009,9 @@ dependencies = [ [[package]] name = "resolvo" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c97bd4f62df459230cffd87a8a70b007aebe97bd2391955fd7ef5a7c282f4833" +checksum = "5314eb4b865d39acd1b3cd05eb91b87031bb49fd1278a1bdf8d6680f1389ec29" dependencies = [ "ahash", "bitvec", @@ -5015,8 +5019,8 @@ dependencies = [ "event-listener", "futures", "indexmap 2.7.0", - "itertools 0.13.0", - "petgraph", + "itertools 0.14.0", + "petgraph 0.7.1", "tracing", ] @@ -5168,9 +5172,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.42" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ "bitflags 2.6.0", "errno", @@ -5216,7 +5220,7 @@ dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.1.0", + "security-framework 3.2.0", ] [[package]] @@ -5397,9 +5401,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d3f8c9bfcc3cbb6b0179eb57042d75b1582bdc65c3cb95f3fa999509c03cbc" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ "bitflags 2.6.0", "core-foundation 0.10.0", @@ -5410,9 +5414,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.13.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -5504,9 +5508,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.134" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ "indexmap 2.7.0", "itoa", @@ -5746,9 +5750,9 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "slab" @@ -5917,9 +5921,9 @@ checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" [[package]] name = "syn" -version = "2.0.94" +version = "2.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3" +checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a" dependencies = [ "proc-macro2", "quote", @@ -6007,11 +6011,11 @@ dependencies = [ [[package]] name = "tabwriter" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a327282c4f64f6dc37e3bba4c2b6842cc3a992f204fa58d917696a89f691e5f6" +checksum = "fce91f2f0ec87dff7e6bcbbeb267439aa1188703003c6055193c821487400432" dependencies = [ - "unicode-width 0.1.14", + "unicode-width 0.2.0", ] [[package]] @@ -6083,11 +6087,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.9" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" +checksum = "a3ac7f54ca534db81081ef1c1e7f6ea8a3ef428d2fc069097c079443d24124d3" dependencies = [ - "thiserror-impl 2.0.9", + "thiserror-impl 2.0.10", ] [[package]] @@ -6103,9 +6107,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.9" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" +checksum = "9e9465d30713b56a37ede7185763c3492a91be2f5fa68d958c44e41ab9248beb" dependencies = [ "proc-macro2", "quote", @@ -6185,9 +6189,9 @@ source = "git+https://github.com/astral-sh/tl.git?rev=6e25b2ee2513d75385101a8ff9 [[package]] name = "tokio" -version = "1.42.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -6203,9 +6207,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", @@ -6597,7 +6601,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "toml_edit", "tracing", @@ -6646,7 +6650,7 @@ dependencies = [ "fs-err", "globwalk", "serde", - "thiserror 2.0.9", + "thiserror 2.0.10", "toml", "tracing", ] @@ -6685,7 +6689,7 @@ dependencies = [ "serde", "serde_json", "sys-info", - "thiserror 2.0.9", + "thiserror 2.0.10", "tl", "tokio", "tokio-util", @@ -6722,7 +6726,7 @@ dependencies = [ "serde", "serde-untagged", "serde_json", - "thiserror 2.0.9", + "thiserror 2.0.10", "tracing", "url", "uv-auth", @@ -6797,7 +6801,7 @@ dependencies = [ "rustc-hash", "serde", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tokio-util", "tracing", @@ -6832,7 +6836,7 @@ source = "git+https://github.com/wolfv/uv?branch=ignore-rayon-init#878234ba6b9a3 dependencies = [ "rkyv", "serde", - "thiserror 2.0.9", + "thiserror 2.0.10", "url", "uv-normalize", "uv-pep440", @@ -6849,12 +6853,12 @@ dependencies = [ "fs-err", "itertools 0.13.0", "jiff", - "petgraph", + "petgraph 0.6.5", "rkyv", "rustc-hash", "serde", "serde_json", - "thiserror 2.0.9", + "thiserror 2.0.10", "tracing", "url", "urlencoding", @@ -6887,7 +6891,7 @@ dependencies = [ "reqwest", "rustc-hash", "sha2", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tokio-util", "tracing", @@ -6934,7 +6938,7 @@ dependencies = [ "reqwest", "reqwest-middleware", "serde", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tracing", "url", @@ -6966,7 +6970,7 @@ dependencies = [ "serde_json", "sha2", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tracing", "uv-cache-info", "uv-distribution-filename", @@ -6995,7 +6999,7 @@ dependencies = [ "rustc-hash", "same-file", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tracing", "url", @@ -7038,7 +7042,7 @@ dependencies = [ "async_zip", "fs-err", "futures", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tokio-util", "uv-distribution-filename", @@ -7101,7 +7105,7 @@ dependencies = [ "schemars", "serde", "smallvec", - "thiserror 2.0.9", + "thiserror 2.0.10", "unicode-width 0.1.14", "url", "uv-fs", @@ -7117,7 +7121,7 @@ source = "git+https://github.com/wolfv/uv?branch=ignore-rayon-init#878234ba6b9a3 dependencies = [ "rustc-hash", "serde", - "thiserror 2.0.9", + "thiserror 2.0.10", ] [[package]] @@ -7135,7 +7139,7 @@ dependencies = [ "schemars", "serde", "serde-untagged", - "thiserror 2.0.9", + "thiserror 2.0.10", "toml", "toml_edit", "tracing", @@ -7171,7 +7175,7 @@ dependencies = [ "serde_json", "target-lexicon", "tempfile", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tokio-util", "tracing", @@ -7211,7 +7215,7 @@ dependencies = [ "futures", "rustc-hash", "serde", - "thiserror 2.0.9", + "thiserror 2.0.10", "toml", "tracing", "url", @@ -7243,7 +7247,7 @@ dependencies = [ "regex", "reqwest", "reqwest-middleware", - "thiserror 2.0.9", + "thiserror 2.0.10", "tracing", "unscanny", "url", @@ -7271,14 +7275,14 @@ dependencies = [ "itertools 0.13.0", "jiff", "owo-colors", - "petgraph", + "petgraph 0.6.5", "pubgrub", "rkyv", "rustc-hash", "same-file", "serde", "textwrap", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tokio-stream", "toml", @@ -7346,7 +7350,7 @@ version = "0.0.1" source = "git+https://github.com/wolfv/uv?branch=ignore-rayon-init#878234ba6b9a3b143e079ca9baa4bec99af93600" dependencies = [ "fs-err", - "thiserror 2.0.9", + "thiserror 2.0.10", "uv-fs", "zip 0.6.6", ] @@ -7358,7 +7362,7 @@ source = "git+https://github.com/wolfv/uv?branch=ignore-rayon-init#878234ba6b9a3 dependencies = [ "anyhow", "rustc-hash", - "thiserror 2.0.9", + "thiserror 2.0.10", "url", "uv-cache", "uv-configuration", @@ -7385,7 +7389,7 @@ dependencies = [ "fs-err", "itertools 0.13.0", "pathdiff", - "thiserror 2.0.9", + "thiserror 2.0.10", "tracing", "uv-fs", "uv-platform-tags", @@ -7417,7 +7421,7 @@ dependencies = [ "rustc-hash", "same-file", "serde", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "toml", "toml_edit", @@ -7695,12 +7699,12 @@ dependencies = [ [[package]] name = "windows" -version = "0.58.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +checksum = "7f919aee0a93304be7f62e8e5027811bbba96bcb1de84d6618be56e43f8a32a1" dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", + "windows-core 0.59.0", + "windows-targets 0.53.0", ] [[package]] @@ -7726,15 +7730,15 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.58.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +checksum = "810ce18ed2112484b0d4e15d022e5f598113e220c53e373fb31e67e21670c1ce" dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", + "windows-implement 0.59.0", + "windows-interface 0.59.0", + "windows-result 0.3.0", + "windows-strings 0.3.0", + "windows-targets 0.53.0", ] [[package]] @@ -7750,9 +7754,9 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.58.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1" dependencies = [ "proc-macro2", "quote", @@ -7772,9 +7776,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.58.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01" dependencies = [ "proc-macro2", "quote", @@ -7821,6 +7825,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-result" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d08106ce80268c4067c0571ca55a9b4e9516518eaa1a1fe9b37ca403ae1d1a34" +dependencies = [ + "windows-targets 0.53.0", +] + [[package]] name = "windows-strings" version = "0.1.0" @@ -7840,6 +7853,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-strings" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b888f919960b42ea4e11c2f408fadb55f78a9f236d5eef084103c8ce52893491" +dependencies = [ + "windows-targets 0.53.0", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -7891,13 +7913,29 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -7910,6 +7948,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -7922,6 +7966,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -7934,12 +7984,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -7952,6 +8014,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -7964,6 +8032,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -7976,6 +8050,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -7988,11 +8068,17 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" -version = "0.6.21" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f5bb5257f2407a5425c6e749bfd9692192a73e70a6060516ac04f889087d68" +checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" dependencies = [ "memchr", ] @@ -8042,9 +8128,9 @@ dependencies = [ [[package]] name = "xattr" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +checksum = "e105d177a3871454f754b33bb0ee637ecaaac997446375fd3e5d43a2ed00c909" dependencies = [ "libc", "linux-raw-sys", @@ -8128,7 +8214,7 @@ dependencies = [ "futures-sink", "futures-util", "hex", - "nix 0.29.0", + "nix", "ordered-stream", "rand", "serde", @@ -8263,7 +8349,7 @@ dependencies = [ "flate2", "indexmap 2.7.0", "memchr", - "thiserror 2.0.9", + "thiserror 2.0.10", "time", "zopfli", ] diff --git a/crates/pixi_manifest/Cargo.toml b/crates/pixi_manifest/Cargo.toml index e7d399a7b..19aeefe49 100644 --- a/crates/pixi_manifest/Cargo.toml +++ b/crates/pixi_manifest/Cargo.toml @@ -19,7 +19,6 @@ pep508_rs = { workspace = true } pixi_consts = { workspace = true } pixi_spec = { workspace = true } pixi_toml = { workspace = true } -pixi_utils = { workspace = true } regex = { workspace = true } serde = { workspace = true } serde-value = { workspace = true } diff --git a/crates/pixi_manifest/src/manifests/manifest.rs b/crates/pixi_manifest/src/manifests/manifest.rs index 1bd51bf3e..457d35ccb 100644 --- a/crates/pixi_manifest/src/manifests/manifest.rs +++ b/crates/pixi_manifest/src/manifests/manifest.rs @@ -12,7 +12,7 @@ use indexmap::{Equivalent, IndexSet}; use itertools::Itertools; use miette::{miette, IntoDiagnostic, NamedSource, Report, WrapErr}; use pixi_spec::PixiSpec; -use rattler_conda_types::{ChannelConfig, MatchSpec, PackageName, Platform, Version}; +use rattler_conda_types::{PackageName, Platform, Version}; use toml_edit::{DocumentMut, Value}; use crate::toml::FromTomlStr; @@ -372,34 +372,26 @@ impl Manifest { Ok(()) } - /// Add a matchspec to the manifest + /// Add a pixi spec to the manifest pub fn add_dependency( &mut self, - spec: &MatchSpec, + name: &PackageName, + spec: &PixiSpec, spec_type: SpecType, platforms: &[Platform], feature_name: &FeatureName, overwrite_behavior: DependencyOverwriteBehavior, - channel_config: &ChannelConfig, ) -> miette::Result { - // Determine the name of the package to add - let (Some(name), spec) = spec.clone().into_nameless() else { - miette::bail!( - "{} does not support wildcard dependencies", - pixi_utils::executable_name() - ); - }; - let spec = PixiSpec::from_nameless_matchspec(spec, channel_config); let mut any_added = false; for platform in to_options(platforms) { // Add the dependency to the manifest match self .get_or_insert_target_mut(platform, Some(feature_name)) - .try_add_dependency(&name, &spec, spec_type, overwrite_behavior) + .try_add_dependency(name, spec, spec_type, overwrite_behavior) { Ok(true) => { self.source - .add_dependency(&name, &spec, spec_type, platform, feature_name)?; + .add_dependency(name, spec, spec_type, platform, feature_name)?; any_added = true; } Ok(false) => {} @@ -813,8 +805,8 @@ mod tests { use insta::assert_snapshot; use miette::NarratableReportHandler; use rattler_conda_types::{ - NamedChannelOrUrl, ParseStrictness, - ParseStrictness::{Lenient, Strict}, + MatchSpec, NamedChannelOrUrl, + ParseStrictness::{self, Lenient, Strict}, VersionSpec, }; use rstest::*; @@ -2062,14 +2054,22 @@ bar = "*" "#; let channel_config = default_channel_config(); let mut manifest = Manifest::from_str(Path::new("pixi.toml"), file_contents).unwrap(); + // Determine the name of the package to add + let spec = &MatchSpec::from_str("baz >=1.2.3", Strict).unwrap(); + + let (name, spec) = spec.clone().into_nameless(); + let name = name.unwrap(); + + let spec = PixiSpec::from_nameless_matchspec(spec, &channel_config); + manifest .add_dependency( - &MatchSpec::from_str("baz >=1.2.3", Strict).unwrap(), + &name, + &spec, SpecType::Run, &[], &FeatureName::Default, DependencyOverwriteBehavior::Overwrite, - &channel_config, ) .unwrap(); assert_eq!( @@ -2085,14 +2085,20 @@ bar = "*" .as_version_spec(), Some(&VersionSpec::from_str(">=1.2.3", Strict).unwrap()) ); + + let (name, spec) = MatchSpec::from_str("bal >=2.3", Strict) + .unwrap() + .into_nameless(); + let pixi_spec = PixiSpec::from_nameless_matchspec(spec, &channel_config); + manifest .add_dependency( - &MatchSpec::from_str(" bal >=2.3", Strict).unwrap(), + &name.unwrap(), + &pixi_spec, SpecType::Run, &[], &FeatureName::Named("test".to_string()), DependencyOverwriteBehavior::Overwrite, - &channel_config, ) .unwrap(); @@ -2113,14 +2119,19 @@ bar = "*" ">=2.3".to_string() ); + let (package_name, nameless) = MatchSpec::from_str(" boef >=2.3", Strict) + .unwrap() + .into_nameless(); + let pixi_spec = PixiSpec::from_nameless_matchspec(nameless, &channel_config); + manifest .add_dependency( - &MatchSpec::from_str(" boef >=2.3", Strict).unwrap(), + &package_name.unwrap(), + &pixi_spec, SpecType::Run, &[Platform::Linux64], &FeatureName::Named("extra".to_string()), DependencyOverwriteBehavior::Overwrite, - &channel_config, ) .unwrap(); @@ -2142,14 +2153,19 @@ bar = "*" ">=2.3".to_string() ); + let matchspec = MatchSpec::from_str(" cmake >=2.3", ParseStrictness::Strict).unwrap(); + let (package_name, nameless) = matchspec.into_nameless(); + + let pixi_spec = PixiSpec::from_nameless_matchspec(nameless, &channel_config); + manifest .add_dependency( - &MatchSpec::from_str(" cmake >=2.3", ParseStrictness::Strict).unwrap(), + &package_name.unwrap(), + &pixi_spec, SpecType::Build, &[Platform::Linux64], &FeatureName::Named("build".to_string()), DependencyOverwriteBehavior::Overwrite, - &channel_config, ) .unwrap(); diff --git a/crates/pixi_spec/src/git.rs b/crates/pixi_spec/src/git.rs index 6aa57c0f8..82324b448 100644 --- a/crates/pixi_spec/src/git.rs +++ b/crates/pixi_spec/src/git.rs @@ -1,6 +1,7 @@ use std::fmt::Display; use pixi_git::git::GitReference; +use serde::{Serialize, Serializer}; use thiserror::Error; use url::Url; @@ -12,7 +13,7 @@ pub struct GitSpec { pub git: Url, /// The git revision of the package - #[serde(skip_serializing_if = "Option::is_none", flatten)] + #[serde(skip_serializing_if = "Reference::is_default_branch", flatten)] pub rev: Option, /// The git subdirectory of the package @@ -21,9 +22,7 @@ pub struct GitSpec { } /// A reference to a specific commit in a git repository. -#[derive( - Debug, Clone, Hash, Eq, PartialEq, PartialOrd, Ord, ::serde::Serialize, ::serde::Deserialize, -)] +#[derive(Debug, Clone, Hash, Eq, PartialEq, PartialOrd, Ord, ::serde::Deserialize)] #[serde(rename_all = "kebab-case")] pub enum Reference { /// The HEAD commit of a branch. @@ -39,6 +38,16 @@ pub enum Reference { DefaultBranch, } +impl Reference { + /// Returns the reference as a string. + pub fn is_default_branch(reference: &Option) -> bool { + reference.is_none() + || reference + .as_ref() + .is_some_and(|reference| matches!(reference, Reference::DefaultBranch)) + } +} + impl Display for Reference { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -65,6 +74,48 @@ impl From for Reference { } } +impl Serialize for Reference { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + #[derive(Serialize)] + struct RawReference<'a> { + #[serde(skip_serializing_if = "Option::is_none")] + tag: Option<&'a str>, + #[serde(skip_serializing_if = "Option::is_none")] + branch: Option<&'a str>, + #[serde(skip_serializing_if = "Option::is_none")] + rev: Option<&'a str>, + } + + let ser = match self { + Reference::Branch(name) => RawReference { + branch: Some(name), + tag: None, + rev: None, + }, + Reference::Tag(name) => RawReference { + branch: None, + tag: Some(name), + rev: None, + }, + Reference::Rev(name) => RawReference { + branch: None, + tag: None, + rev: Some(name), + }, + Reference::DefaultBranch => RawReference { + branch: None, + tag: None, + rev: None, + }, + }; + + ser.serialize(serializer) + } +} + #[derive(Error, Debug)] pub enum GitReferenceError { #[error("The commit string is invalid: \"{0}\"")] diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 5f6240789..26b0e10e6 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -79,6 +79,12 @@ These dependencies will be read by pixi as if they had been added to the pixi `p - `--pypi`: Specifies a PyPI dependency, not a conda package. Parses dependencies as [PEP508](https://peps.python.org/pep-0508/) requirements, supporting extras and versions. See [configuration](pixi_manifest.md) for details. +- `--git`: Specifies a git dependency, the package will be installed from the git repository. + The `--git` flag can be used with the following options: + - `--branch `: The branch to use when installing the package. + - `--tag `: The tag to use when installing the package. + - `--rev `: The revision to use when installing the package. + - `--subdir `: The subdirectory to use when installing the package. - `--no-install`: Don't install the package to the environment, only add the package to the lock-file. - `--no-lockfile-update`: Don't update the lock-file, implies the `--no-install` flag. - `--platform (-p)`: The platform for which the dependency should be added. (Allowed to be used more than once) @@ -98,15 +104,20 @@ pixi add --platform osx-64 clang # (7)! pixi add --no-install numpy # (8)! pixi add --no-lockfile-update numpy # (9)! pixi add --feature featurex numpy # (10)! +pixi add --git https://github.com/wolfv/pixi-build-examples boost-check # (11)! +pixi add --git https://github.com/wolfv/pixi-build-examples --branch main --subdir boost-check boost-check # (12)! +pixi add --git https://github.com/wolfv/pixi-build-examples --tag v0.1.0 boost-check # (13)! +pixi add --git https://github.com/wolfv/pixi-build-examples --rev e50d4a1 boost-check # (14)! # Add a pypi dependency -pixi add --pypi requests[security] # (11)! -pixi add --pypi Django==5.1rc1 # (12)! -pixi add --pypi "boltons>=24.0.0" --feature lint # (13)! -pixi add --pypi "boltons @ https://files.pythonhosted.org/packages/46/35/e50d4a115f93e2a3fbf52438435bb2efcf14c11d4fcd6bdcd77a6fc399c9/boltons-24.0.0-py3-none-any.whl" # (14)! -pixi add --pypi "exchangelib @ git+https://github.com/ecederstrand/exchangelib" # (15)! -pixi add --pypi "project @ file:///absolute/path/to/project" # (16)! -pixi add --pypi "project@file:///absolute/path/to/project" --editable # (17)! +pixi add --pypi requests[security] # (15)! +pixi add --pypi Django==5.1rc1 # (16)! +pixi add --pypi "boltons>=24.0.0" --feature lint # (17)! +pixi add --pypi "boltons @ https://files.pythonhosted.org/packages/46/35/e50d4a115f93e2a3fbf52438435bb2efcf14c11d4fcd6bdcd77a6fc399c9/boltons-24.0.0-py3-none-any.whl" # (18)! +pixi add --pypi "exchangelib @ git+https://github.com/ecederstrand/exchangelib" # (19)! +pixi add --pypi "project @ file:///absolute/path/to/project" # (20)! +pixi add --pypi "project@file:///absolute/path/to/project" --editable # (21)! +pixi add --git https://github.com/mahmoud/boltons.git boltons --pypi # (22)! ``` 1. This will add the `numpy` package to the project with the latest available for the solved environment. @@ -119,13 +130,18 @@ pixi add --pypi "project@file:///absolute/path/to/project" --editable # (17)! 8. This will add the `numpy` package to the manifest and lockfile, without installing it in an environment. 9. This will add the `numpy` package to the manifest without updating the lockfile or installing it in the environment. 10. This will add the `numpy` package in the feature `featurex`. -11. This will add the `requests` package as `pypi` dependency with the `security` extra. -12. This will add the `pre-release` version of `Django` to the project as a `pypi` dependency. -13. This will add the `boltons` package in the feature `lint` as `pypi` dependency. -14. This will add the `boltons` package with the given `url` as `pypi` dependency. -15. This will add the `exchangelib` package with the given `git` url as `pypi` dependency. -16. This will add the `project` package with the given `file` url as `pypi` dependency. -17. This will add the `project` package with the given `file` url as an `editable` package as `pypi` dependency. +11. This will add the `boost-check` source package to the dependencies from the git repository. +12. This will add the `boost-check` source package to the dependencies from the git repository using `main` branch and the `boost-check` folder in the repository. +13. This will add the `boost-check` source package to the dependencies from the git repository using `v0.1.0` tag. +14. This will add the `boost-check` source package to the dependencies from the git repository using `e50d4a1` revision. +15. This will add the `requests` package as `pypi` dependency with the `security` extra. +16. This will add the `pre-release` version of `Django` to the project as a `pypi` dependency. +17. This will add the `boltons` package in the feature `lint` as `pypi` dependency. +18. This will add the `boltons` package with the given `url` as `pypi` dependency. +19. This will add the `exchangelib` package with the given `git` url as `pypi` dependency. +20. This will add the `project` package with the given `file` url as `pypi` dependency. +21. This will add the `project` package with the given `file` url as an `editable` package as `pypi` dependency. +22. This will add the `boltons` package with the given `git` url as `pypi` dependency. `branch`, `tag`, and `rev` are not yet supported. !!! tip If you want to use a non default pinning strategy, you can set it using [pixi's configuration](./pixi_configuration.md#pinning-strategy). diff --git a/src/cli/add.rs b/src/cli/add.rs index ee732a7a1..52aa4207b 100644 --- a/src/cli/add.rs +++ b/src/cli/add.rs @@ -1,7 +1,9 @@ use clap::Parser; use indexmap::IndexMap; use miette::IntoDiagnostic; -use pixi_manifest::FeatureName; +use pixi_manifest::{FeatureName, SpecType}; +use pixi_spec::{GitSpec, SourceSpec}; +use rattler_conda_types::{MatchSpec, PackageName}; use super::has_specs::HasSpecs; use crate::{ @@ -98,24 +100,55 @@ pub async fn execute(args: Args) -> miette::Result<()> { .manifest .add_platforms(dependency_config.platforms.iter(), &FeatureName::Default)?; - let (match_specs, pypi_deps) = match dependency_config.dependency_type() { + let (match_specs, source_specs, pypi_deps) = match dependency_config.dependency_type() { DependencyType::CondaDependency(spec_type) => { - let match_specs = dependency_config + // if user passed some git configuration + // we will use it to create pixi source specs + let passed_specs: IndexMap = dependency_config .specs()? .into_iter() .map(|(name, spec)| (name, (spec, spec_type))) .collect(); - let pypi_deps = IndexMap::default(); - (match_specs, pypi_deps) + + if let Some(git) = &dependency_config.git { + let source_specs = passed_specs + .iter() + .map(|(name, (_spec, spec_type))| { + let git_reference = + dependency_config.rev.clone().unwrap_or_default().into(); + + let git_spec = GitSpec { + git: git.clone(), + rev: Some(git_reference), + subdirectory: dependency_config.subdir.clone(), + }; + (name.clone(), (SourceSpec::Git(git_spec), *spec_type)) + }) + .collect(); + (IndexMap::default(), source_specs, IndexMap::default()) + } else { + (passed_specs, IndexMap::default(), IndexMap::default()) + } } DependencyType::PypiDependency => { let match_specs = IndexMap::default(); - let pypi_deps = dependency_config - .pypi_deps(&project)? - .into_iter() - .map(|(name, req)| (name, (req, None))) - .collect(); - (match_specs, pypi_deps) + let source_specs = IndexMap::default(); + let pypi_deps = match dependency_config + .vcs_pep508_requirements(&project) + .transpose()? + { + Some(vcs_reqs) => vcs_reqs + .into_iter() + .map(|(name, req)| (name, (req, None))) + .collect(), + None => dependency_config + .pypi_deps(&project)? + .into_iter() + .map(|(name, req)| (name, (req, None))) + .collect(), + }; + + (match_specs, source_specs, pypi_deps) } }; // TODO: add dry_run logic to add @@ -129,6 +162,7 @@ pub async fn execute(args: Args) -> miette::Result<()> { .update_dependencies( match_specs, pypi_deps, + source_specs, prefix_update_config, &args.dependency_config.feature, &args.dependency_config.platforms, diff --git a/src/cli/cli_config.rs b/src/cli/cli_config.rs index 398f49c65..3ce1d50e6 100644 --- a/src/cli/cli_config.rs +++ b/src/cli/cli_config.rs @@ -4,17 +4,22 @@ use crate::lock_file::UpdateMode; use crate::DependencyType; use crate::Project; use clap::Parser; +use indexmap::IndexMap; use indexmap::IndexSet; use itertools::Itertools; use miette::IntoDiagnostic; +use pep508_rs::Requirement; use pixi_config::{Config, ConfigCli}; use pixi_consts::consts; +use pixi_manifest::pypi::PyPiPackageName; use pixi_manifest::FeaturesExt; use pixi_manifest::{FeatureName, SpecType}; +use pixi_spec::Reference; use rattler_conda_types::ChannelConfig; use rattler_conda_types::{Channel, NamedChannelOrUrl, Platform}; use std::collections::HashMap; use std::path::PathBuf; +use url::Url; /// Project configuration #[derive(Parser, Debug, Default, Clone)] @@ -129,6 +134,73 @@ impl PrefixUpdateConfig { } } } + +#[derive(Parser, Debug, Default, Clone)] +pub struct GitRev { + /// The git branch + #[clap(long, requires = "git", conflicts_with_all = ["tag", "rev", "pypi"])] + pub branch: Option, + + /// The git tag + #[clap(long, requires = "git", conflicts_with_all = ["branch", "rev", "pypi"])] + pub tag: Option, + + /// The git revision + #[clap(long, requires = "git", conflicts_with_all = ["branch", "tag", "pypi"])] + pub rev: Option, +} + +impl GitRev { + /// Create a new `GitRev` + pub fn new() -> Self { + Default::default() + } + + /// Set the branch + pub fn with_branch(mut self, branch: String) -> GitRev { + self.branch = Some(branch); + self + } + + /// Set the revision + pub fn with_rev(mut self, rev: String) -> GitRev { + self.rev = Some(rev); + self + } + + /// Set the tag + pub fn with_tag(mut self, tag: String) -> GitRev { + self.tag = Some(tag); + self + } + + pub fn as_str(&self) -> Option<&str> { + if let Some(branch) = &self.branch { + Some(branch) + } else if let Some(tag) = &self.tag { + Some(tag) + } else if let Some(rev) = &self.rev { + Some(rev) + } else { + None + } + } +} + +impl From for Reference { + fn from(git_rev: GitRev) -> Self { + if let Some(branch) = git_rev.branch { + Reference::Branch(branch) + } else if let Some(tag) = git_rev.tag { + Reference::Tag(tag) + } else if let Some(rev) = git_rev.rev { + Reference::Rev(rev) + } else { + Reference::DefaultBranch + } + } +} + #[derive(Parser, Debug, Default)] pub struct DependencyConfig { /// The dependencies as names, conda MatchSpecs or PyPi requirements @@ -157,6 +229,18 @@ pub struct DependencyConfig { /// The feature for which the dependency should be modified #[clap(long, short, default_value_t)] pub feature: FeatureName, + + /// The git url to use when adding a git dependency + #[clap(long, short)] + pub git: Option, + + #[clap(flatten)] + /// The git revisions to use when adding a git dependency + pub rev: Option, + + /// The subdirectory of the git repository to use + #[clap(long, short, requires = "git")] + pub subdir: Option, } impl DependencyConfig { @@ -219,6 +303,39 @@ impl DependencyConfig { } } } + + pub fn vcs_pep508_requirements( + &self, + project: &Project, + ) -> Option>> { + match &self.git { + Some(git) => { + // pep 508 requirements with direct reference + // should be in this format + // name @ url@rev#subdirectory=subdir + // we need to construct it + let pep_reqs: miette::Result> = self + .specs + .iter() + .map(|package_name| { + let vcs_req = build_vcs_requirement( + package_name, + git, + self.rev.as_ref(), + self.subdir.clone(), + ); + + let dep = Requirement::parse(&vcs_req, project.root()).into_diagnostic()?; + let name = PyPiPackageName::from_normalized(dep.clone().name); + + Ok((name, dep)) + }) + .collect(); + Some(pep_reqs) + } + None => None, + } + } } impl HasSpecs for DependencyConfig { @@ -226,3 +343,77 @@ impl HasSpecs for DependencyConfig { self.specs.iter().map(AsRef::as_ref).collect() } } + +/// Builds a PEP 508 compliant VCS requirement string +fn build_vcs_requirement( + package_name: &str, + git: &Url, + rev: Option<&GitRev>, + subdir: Option, +) -> String { + let mut vcs_req = format!("{} @ {}", package_name, git); + if let Some(rev_str) = rev.and_then(|rev| rev.as_str().map(|s| s.to_string())) { + vcs_req.push_str(&format!("@{}", rev_str)); + } + if let Some(subdir) = subdir { + vcs_req.push_str(&format!("#subdirectory={}", subdir)); + } + vcs_req +} + +#[cfg(test)] +mod tests { + use url::Url; + + use crate::cli::cli_config::{build_vcs_requirement, GitRev}; + + #[test] + fn test_build_vcs_requirement_with_all_fields() { + let result = build_vcs_requirement( + "mypackage", + &Url::parse("https://github.com/user/repo").unwrap(), + Some(&GitRev::new().with_tag("v1.0.0".to_string())), + Some("subdir".to_string()), + ); + assert_eq!( + result, + "mypackage @ https://github.com/user/repo@v1.0.0#subdirectory=subdir" + ); + } + + #[test] + fn test_build_vcs_requirement_with_no_rev() { + let result = build_vcs_requirement( + "mypackage", + &Url::parse("https://github.com/user/repo").unwrap(), + None, + Some("subdir".to_string()), + ); + assert_eq!( + result, + "mypackage @ https://github.com/user/repo#subdirectory=subdir" + ); + } + + #[test] + fn test_build_vcs_requirement_with_no_subdir() { + let result = build_vcs_requirement( + "mypackage", + &Url::parse("https://github.com/user/repo").unwrap(), + Some(&GitRev::new().with_tag("v1.0.0".to_string())), + None, + ); + assert_eq!(result, "mypackage @ https://github.com/user/repo@v1.0.0"); + } + + #[test] + fn test_build_vcs_requirement_with_only_git() { + let result = build_vcs_requirement( + "mypackage", + &Url::parse("https://github.com/user/repo").unwrap(), + None, + None, + ); + assert_eq!(result, "mypackage @ https://github.com/user/repo"); + } +} diff --git a/src/cli/init.rs b/src/cli/init.rs index 900bafb93..6dc580969 100644 --- a/src/cli/init.rs +++ b/src/cli/init.rs @@ -14,6 +14,7 @@ use pixi_consts::consts; use pixi_manifest::{ pyproject::PyProjectManifest, DependencyOverwriteBehavior, FeatureName, SpecType, }; +use pixi_spec::PixiSpec; use pixi_utils::conda_environment_file::CondaEnvFile; use rattler_conda_types::{NamedChannelOrUrl, Platform}; use tokio::fs::OpenOptions; @@ -241,14 +242,22 @@ pub async fn execute(args: Args) -> miette::Result<()> { let mut project = Project::from_str(&pixi_manifest_path, &rv)?; let channel_config = project.channel_config(); for spec in conda_deps { + // Determine the name of the package to add + let (Some(name), spec) = spec.clone().into_nameless() else { + miette::bail!( + "{} does not support wildcard dependencies", + pixi_utils::executable_name() + ); + }; + let spec = PixiSpec::from_nameless_matchspec(spec, &channel_config); project.manifest.add_dependency( + &name, &spec, SpecType::Run, // No platforms required as you can't define them in the yaml &[], &FeatureName::default(), DependencyOverwriteBehavior::Overwrite, - &channel_config, )?; } for requirement in pypi_deps { diff --git a/src/cli/upgrade.rs b/src/cli/upgrade.rs index 5e7f17afb..c2eef1053 100644 --- a/src/cli/upgrade.rs +++ b/src/cli/upgrade.rs @@ -5,6 +5,7 @@ use crate::project::{MatchSpecs, PypiDeps}; use crate::Project; use clap::Parser; use fancy_display::FancyDisplay; +use indexmap::IndexMap; use itertools::Itertools; use miette::MietteDiagnostic; use miette::{Context, IntoDiagnostic}; @@ -76,6 +77,7 @@ pub async fn execute(args: Args) -> miette::Result<()> { .update_dependencies( match_specs, pypi_deps, + IndexMap::default(), &args.prefix_update_config, &args.specs.feature, &[], diff --git a/src/project/mod.rs b/src/project/mod.rs index b725c6f1c..9c85a1fa1 100644 --- a/src/project/mod.rs +++ b/src/project/mod.rs @@ -35,9 +35,12 @@ use pixi_manifest::{ FeaturesExt, HasFeaturesIter, HasManifestRef, Manifest, PypiDependencyLocation, SpecType, WorkspaceManifest, }; +use pixi_spec::{PixiSpec, SourceSpec}; use pixi_utils::reqwest::build_reqwest_clients; use pypi_mapping::{ChannelName, CustomMapping, MappingLocation, MappingSource}; -use rattler_conda_types::{Channel, ChannelConfig, MatchSpec, PackageName, Platform, Version}; +use rattler_conda_types::{ + Channel, ChannelConfig, MatchSpec, NamelessMatchSpec, PackageName, Platform, Version, +}; use rattler_lock::{LockFile, LockedPackageRef}; use rattler_repodata_gateway::Gateway; use reqwest_middleware::ClientWithMiddleware; @@ -161,6 +164,8 @@ pub type PypiDeps = indexmap::IndexMap< pub type MatchSpecs = indexmap::IndexMap; +pub type SourceSpecs = indexmap::IndexMap; + impl Project { /// Constructs a new instance from an internal manifest representation pub(crate) fn from_manifest(manifest: Manifest) -> Self { @@ -687,6 +692,7 @@ impl Project { &mut self, match_specs: MatchSpecs, pypi_deps: PypiDeps, + source_specs: SourceSpecs, prefix_update_config: &PrefixUpdateConfig, feature_name: &FeatureName, platforms: &[Platform], @@ -699,22 +705,40 @@ impl Project { let mut pypi_packages = HashSet::new(); let channel_config = self.channel_config(); for (name, (spec, spec_type)) in match_specs { + let (_, nameless_spec) = spec.into_nameless(); + let pixi_spec = + PixiSpec::from_nameless_matchspec(nameless_spec.clone(), &channel_config); + let added = self.manifest.add_dependency( - &spec, + &name, + &pixi_spec, spec_type, platforms, feature_name, DependencyOverwriteBehavior::Overwrite, - &channel_config, )?; if added { - if spec.version.is_none() { - conda_specs_to_add_constraints_for.insert(name.clone(), (spec_type, spec)); + if nameless_spec.version.is_none() { + conda_specs_to_add_constraints_for + .insert(name.clone(), (spec_type, nameless_spec)); } conda_packages.insert(name); } } + for (name, (spec, spec_type)) in source_specs { + let pixi_spec = PixiSpec::from(spec); + + self.manifest.add_dependency( + &name, + &pixi_spec, + spec_type, + platforms, + feature_name, + DependencyOverwriteBehavior::Overwrite, + )?; + } + for (name, (spec, location)) in pypi_deps { let added = self.manifest.add_pep508_dependency( &spec, @@ -889,7 +913,7 @@ impl Project { fn update_conda_specs_from_lock_file( &mut self, updated_lock_file: &LockFile, - conda_specs_to_add_constraints_for: IndexMap, + conda_specs_to_add_constraints_for: IndexMap, affect_environment_and_platforms: Vec<(String, Platform)>, feature_name: &FeatureName, platforms: &[Platform], @@ -936,17 +960,20 @@ impl Project { if let Some(version_constraint) = version_constraint { implicit_constraints .insert(name.as_source().to_string(), version_constraint.to_string()); - let spec = MatchSpec { + let spec = NamelessMatchSpec { version: Some(version_constraint), ..spec }; + + let pixi_spec = PixiSpec::from_nameless_matchspec(spec.clone(), &channel_config); + self.manifest.add_dependency( - &spec, + &name, + &pixi_spec, spec_type, platforms, feature_name, DependencyOverwriteBehavior::Overwrite, - &channel_config, )?; } } diff --git a/tests/integration_rust/add_tests.rs b/tests/integration_rust/add_tests.rs index 007c69993..d5ae2ab45 100644 --- a/tests/integration_rust/add_tests.rs +++ b/tests/integration_rust/add_tests.rs @@ -5,12 +5,13 @@ use crate::common::{ package_database::{Package, PackageDatabase}, LockFileExt, PixiControl, }; -use pixi::{DependencyType, Project}; +use pixi::{cli::cli_config::GitRev, DependencyType, Project}; use pixi_consts::consts; use pixi_manifest::pypi::VersionOrStar; use pixi_manifest::{pypi::PyPiPackageName, FeaturesExt, PyPiRequirement, SpecType}; use rattler_conda_types::{PackageName, Platform}; use tempfile::TempDir; +use url::Url; /// Test add functionality for different types of packages. /// Run, dev, build @@ -647,6 +648,198 @@ async fn add_dependency_pinning_strategy() { assert_eq!(bar_spec, r#"">=1,<2""#); } +/// Test adding a git dependency with a specific branch +#[tokio::test] +async fn add_git_deps() { + let pixi = PixiControl::from_manifest( + r#" +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["linux-64"] +preview = ['pixi-build'] +"#, + ) + .unwrap(); + + // Add a package + pixi.add("boost-check") + .with_git_url(Url::parse("https://github.com/wolfv/pixi-build-examples").unwrap()) + .with_git_rev(GitRev::new().with_branch("main".to_string())) + .with_git_subdir("boost-check".to_string()) + .await + .unwrap(); + + let lock = pixi.lock_file().await.unwrap(); + insta::with_settings!({filters => vec![ + (r"#([a-f0-9]+)", "#[FULL_COMMIT]"), + ]}, { + insta::assert_snapshot!(lock.render_to_string().unwrap()); + }); + + // Check the manifest itself + insta::assert_snapshot!(pixi.project().unwrap().manifest().source.to_string()); +} + +/// Test adding git dependencies with credentials +/// This tests is skipped on windows because it spawns a credential helper +/// during the CI run +#[cfg(not(windows))] +#[tokio::test] +async fn add_git_deps_with_creds() { + let pixi = PixiControl::from_manifest( + r#" +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["linux-64"] +preview = ['pixi-build'] +"#, + ) + .unwrap(); + + // Add a package + // we want to make sure that the credentials are not exposed in the lock file + pixi.add("boost-check") + .with_git_url( + Url::parse("https://user:token123@github.com/wolfv/pixi-build-examples.git").unwrap(), + ) + .with_git_rev(GitRev::new().with_branch("main".to_string())) + .with_git_subdir("boost-check".to_string()) + .await + .unwrap(); + + let lock = pixi.lock_file().await.unwrap(); + insta::with_settings!({filters => vec![ + (r"#([a-f0-9]+)", "#[FULL_COMMIT]"), + ]}, { + insta::assert_snapshot!(lock.render_to_string().unwrap()); + }); + + // Check the manifest itself + insta::assert_snapshot!(pixi.project().unwrap().manifest().source.to_string()); +} + +/// Test adding a git dependency with a specific commit +#[tokio::test] +async fn add_git_with_specific_commit() { + let pixi = PixiControl::from_manifest( + r#" +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["linux-64"] +preview = ['pixi-build']"#, + ) + .unwrap(); + + // Add a package + pixi.add("boost-check") + .with_git_url(Url::parse("https://github.com/wolfv/pixi-build-examples").unwrap()) + .with_git_rev(GitRev::new().with_rev("9de9e1b".to_string())) + .with_git_subdir("boost-check".to_string()) + .await + .unwrap(); + + // Check the lock file + let lock = pixi.lock_file().await.unwrap(); + insta::with_settings!({filters => vec![ + (r"#([a-f0-9]+)", "#[FULL_COMMIT]"), + ]}, { + insta::assert_snapshot!(lock.render_to_string().unwrap()); + }); + + // Check the manifest itself + insta::assert_snapshot!(pixi.project().unwrap().manifest().source.to_string()); +} + +/// Test adding a git dependency with a specific tag +#[tokio::test] +async fn add_git_with_tag() { + let pixi = PixiControl::from_manifest( + r#" +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["linux-64"] +preview = ['pixi-build']"#, + ) + .unwrap(); + + // Add a package + pixi.add("boost-check") + .with_git_url(Url::parse("https://github.com/wolfv/pixi-build-examples").unwrap()) + .with_git_rev(GitRev::new().with_tag("v0.1.0".to_string())) + .with_git_subdir("boost-check".to_string()) + .await + .unwrap(); + + // Check the lock file + let lock = pixi.lock_file().await.unwrap(); + insta::with_settings!({filters => vec![ + (r"#([a-f0-9]+)", "#[FULL_COMMIT]"), + ]}, { + insta::assert_snapshot!(lock.render_to_string().unwrap()); + }); + + // Check the manifest itself + insta::assert_snapshot!(pixi.project().unwrap().manifest().source.to_string()); +} + +/// Test adding a git dependency using ssh url +#[tokio::test] +async fn add_plain_ssh_url() { + let pixi = PixiControl::from_manifest( + r#" +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["linux-64"] +preview = ['pixi-build']"#, + ) + .unwrap(); + + // Add a package + pixi.add("boost-check") + .with_git_url(Url::parse("git+ssh://git@github.com/wolfv/pixi-build-examples.git").unwrap()) + .with_no_lockfile_update(true) + .await + .unwrap(); + + // Check the manifest itself + insta::assert_snapshot!(pixi.project().unwrap().manifest().source.to_string()); +} + +/// Test adding a git dependency using ssh url +#[tokio::test] +async fn add_pypi_git() { + let pixi = PixiControl::from_manifest( + r#" +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["linux-64"] + +"#, + ) + .unwrap(); + + // Add a package + pixi.add("boltons") + .set_pypi(true) + .with_git_url(Url::parse("https://github.com/mahmoud/boltons.git").unwrap()) + .with_no_lockfile_update(true) + .await + .unwrap(); + + // Check the manifest itself + insta::with_settings!({filters => vec![ + (r"#([a-f0-9]+)", "#[FULL_COMMIT]"), + ]}, { + insta::assert_snapshot!(pixi.project().unwrap().manifest().source.to_string()); + }); +} + #[tokio::test] async fn add_dependency_dont_create_project() { // Create a channel with two packages diff --git a/tests/integration_rust/common/builders.rs b/tests/integration_rust/common/builders.rs index 7ed0a54ab..fb69d4b02 100644 --- a/tests/integration_rust/common/builders.rs +++ b/tests/integration_rust/common/builders.rs @@ -23,7 +23,7 @@ //! } //! ``` -use pixi::cli::cli_config::{PrefixUpdateConfig, ProjectConfig}; +use pixi::cli::cli_config::{GitRev, PrefixUpdateConfig, ProjectConfig}; use std::{ future::{Future, IntoFuture}, io, @@ -143,6 +143,9 @@ pub trait HasDependencyConfig: Sized { pypi: false, platforms: Default::default(), feature: Default::default(), + git: Default::default(), + rev: Default::default(), + subdir: Default::default(), } } @@ -195,10 +198,35 @@ impl AddBuilder { self } + pub fn set_pypi(mut self, pypi: bool) -> Self { + self.args.dependency_config.pypi = pypi; + self + } + pub fn with_feature(mut self, feature: impl ToString) -> Self { self.args.dependency_config.feature = FeatureName::Named(feature.to_string()); self } + + pub fn with_git_url(mut self, url: Url) -> Self { + self.args.dependency_config.git = Some(url); + self + } + + pub fn with_git_rev(mut self, rev: GitRev) -> Self { + self.args.dependency_config.rev = Some(rev); + self + } + + pub fn with_git_subdir(mut self, subdir: String) -> Self { + self.args.dependency_config.subdir = Some(subdir); + self + } + + pub fn with_no_lockfile_update(mut self, no_lockfile_update: bool) -> Self { + self.args.prefix_update_config.no_lockfile_update = no_lockfile_update; + self + } } impl HasDependencyConfig for AddBuilder { diff --git a/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_deps-2.snap b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_deps-2.snap new file mode 100644 index 000000000..271c3e0df --- /dev/null +++ b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_deps-2.snap @@ -0,0 +1,12 @@ +--- +source: tests/integration_rust/add_tests.rs +expression: pixi.project().unwrap().manifest().source.to_string() +--- +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["linux-64"] +preview = ['pixi-build'] + +[dependencies] +boost-check = { git = "https://github.com/wolfv/pixi-build-examples", branch = "main", subdirectory = "boost-check" } diff --git a/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_deps.snap b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_deps.snap new file mode 100644 index 000000000..53afa9d14 --- /dev/null +++ b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_deps.snap @@ -0,0 +1,77 @@ +--- +source: tests/integration_rust/add_tests.rs +expression: lock.render_to_string().unwrap() +--- +version: 6 +environments: + default: + channels: + - url: https://prefix.dev/conda-forge/ + packages: + linux-64: + - conda: https://prefix.dev/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + - conda: https://prefix.dev/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + - conda: https://prefix.dev/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/libstdcxx-14.2.0-hc0a3c3a_1.conda + - conda: git+https://github.com/wolfv/pixi-build-examples?subdirectory=boost-check&branch=main#[FULL_COMMIT] +packages: +- conda: https://prefix.dev/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + sha256: fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726 + md5: d7c89558ba9fa0495403155b64376d81 + license: None + size: 2562 + timestamp: 1578324546067 +- conda: https://prefix.dev/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + build_number: 16 + sha256: fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22 + md5: 73aaf86a425cc6e73fcf236a5a46396d + depends: + - _libgcc_mutex 0.1 conda_forge + - libgomp >=7.5.0 + constrains: + - openmp_impl 9999 + license: BSD-3-Clause + license_family: BSD + size: 23621 + timestamp: 1650670423406 +- conda: git+https://github.com/wolfv/pixi-build-examples?subdirectory=boost-check&branch=main#[FULL_COMMIT] + name: boost-check + version: 0.1.0 + build: hbf21a9e_0 + subdir: linux-64 + depends: + - libstdcxx >=14 + - libgcc >=14 + channel: null +- conda: https://prefix.dev/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda + sha256: 53eb8a79365e58849e7b1a068d31f4f9e718dc938d6f2c03e960345739a03569 + md5: 3cb76c3f10d3bc7f1105b2fc9db984df + depends: + - _libgcc_mutex 0.1 conda_forge + - _openmp_mutex >=4.5 + constrains: + - libgomp 14.2.0 h77fa898_1 + - libgcc-ng ==14.2.0=*_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 848745 + timestamp: 1729027721139 +- conda: https://prefix.dev/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda + sha256: 1911c29975ec99b6b906904040c855772ccb265a1c79d5d75c8ceec4ed89cd63 + md5: cc3573974587f12dda90d96e3e55a702 + depends: + - _libgcc_mutex 0.1 conda_forge + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 460992 + timestamp: 1729027639220 +- conda: https://prefix.dev/conda-forge/linux-64/libstdcxx-14.2.0-hc0a3c3a_1.conda + sha256: 4661af0eb9bdcbb5fb33e5d0023b001ad4be828fccdcc56500059d56f9869462 + md5: 234a5554c53625688d51062645337328 + depends: + - libgcc 14.2.0 h77fa898_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 3893695 + timestamp: 1729027746910 diff --git a/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_deps_with_creds-2.snap b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_deps_with_creds-2.snap new file mode 100644 index 000000000..85ccb9b4c --- /dev/null +++ b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_deps_with_creds-2.snap @@ -0,0 +1,12 @@ +--- +source: tests/integration_rust/add_tests.rs +expression: pixi.project().unwrap().manifest().source.to_string() +--- +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["linux-64"] +preview = ['pixi-build'] + +[dependencies] +boost-check = { git = "https://user:token123@github.com/wolfv/pixi-build-examples.git", branch = "main", subdirectory = "boost-check" } diff --git a/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_deps_with_creds.snap b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_deps_with_creds.snap new file mode 100644 index 000000000..cfc046aad --- /dev/null +++ b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_deps_with_creds.snap @@ -0,0 +1,77 @@ +--- +source: tests/integration_rust/add_tests.rs +expression: lock.render_to_string().unwrap() +--- +version: 6 +environments: + default: + channels: + - url: https://prefix.dev/conda-forge/ + packages: + linux-64: + - conda: https://prefix.dev/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + - conda: https://prefix.dev/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + - conda: https://prefix.dev/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/libstdcxx-14.2.0-hc0a3c3a_1.conda + - conda: git+https://github.com/wolfv/pixi-build-examples.git?subdirectory=boost-check&branch=main#[FULL_COMMIT] +packages: +- conda: https://prefix.dev/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + sha256: fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726 + md5: d7c89558ba9fa0495403155b64376d81 + license: None + size: 2562 + timestamp: 1578324546067 +- conda: https://prefix.dev/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + build_number: 16 + sha256: fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22 + md5: 73aaf86a425cc6e73fcf236a5a46396d + depends: + - _libgcc_mutex 0.1 conda_forge + - libgomp >=7.5.0 + constrains: + - openmp_impl 9999 + license: BSD-3-Clause + license_family: BSD + size: 23621 + timestamp: 1650670423406 +- conda: git+https://github.com/wolfv/pixi-build-examples.git?subdirectory=boost-check&branch=main#[FULL_COMMIT] + name: boost-check + version: 0.1.0 + build: hbf21a9e_0 + subdir: linux-64 + depends: + - libstdcxx >=14 + - libgcc >=14 + channel: null +- conda: https://prefix.dev/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda + sha256: 53eb8a79365e58849e7b1a068d31f4f9e718dc938d6f2c03e960345739a03569 + md5: 3cb76c3f10d3bc7f1105b2fc9db984df + depends: + - _libgcc_mutex 0.1 conda_forge + - _openmp_mutex >=4.5 + constrains: + - libgomp 14.2.0 h77fa898_1 + - libgcc-ng ==14.2.0=*_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 848745 + timestamp: 1729027721139 +- conda: https://prefix.dev/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda + sha256: 1911c29975ec99b6b906904040c855772ccb265a1c79d5d75c8ceec4ed89cd63 + md5: cc3573974587f12dda90d96e3e55a702 + depends: + - _libgcc_mutex 0.1 conda_forge + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 460992 + timestamp: 1729027639220 +- conda: https://prefix.dev/conda-forge/linux-64/libstdcxx-14.2.0-hc0a3c3a_1.conda + sha256: 4661af0eb9bdcbb5fb33e5d0023b001ad4be828fccdcc56500059d56f9869462 + md5: 234a5554c53625688d51062645337328 + depends: + - libgcc 14.2.0 h77fa898_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 3893695 + timestamp: 1729027746910 diff --git a/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_with_specific_commit-2.snap b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_with_specific_commit-2.snap new file mode 100644 index 000000000..7909ce25d --- /dev/null +++ b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_with_specific_commit-2.snap @@ -0,0 +1,12 @@ +--- +source: tests/integration_rust/add_tests.rs +expression: pixi.project().unwrap().manifest().source.to_string() +--- +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["linux-64"] +preview = ['pixi-build'] + +[dependencies] +boost-check = { git = "https://github.com/wolfv/pixi-build-examples", rev = "9de9e1b", subdirectory = "boost-check" } diff --git a/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_with_specific_commit.snap b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_with_specific_commit.snap new file mode 100644 index 000000000..88a089276 --- /dev/null +++ b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_with_specific_commit.snap @@ -0,0 +1,77 @@ +--- +source: tests/integration_rust/add_tests.rs +expression: lock.render_to_string().unwrap() +--- +version: 6 +environments: + default: + channels: + - url: https://prefix.dev/conda-forge/ + packages: + linux-64: + - conda: https://prefix.dev/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + - conda: https://prefix.dev/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + - conda: https://prefix.dev/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/libstdcxx-14.2.0-hc0a3c3a_1.conda + - conda: git+https://github.com/wolfv/pixi-build-examples?subdirectory=boost-check&rev=9de9e1b#[FULL_COMMIT] +packages: +- conda: https://prefix.dev/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + sha256: fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726 + md5: d7c89558ba9fa0495403155b64376d81 + license: None + size: 2562 + timestamp: 1578324546067 +- conda: https://prefix.dev/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + build_number: 16 + sha256: fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22 + md5: 73aaf86a425cc6e73fcf236a5a46396d + depends: + - _libgcc_mutex 0.1 conda_forge + - libgomp >=7.5.0 + constrains: + - openmp_impl 9999 + license: BSD-3-Clause + license_family: BSD + size: 23621 + timestamp: 1650670423406 +- conda: git+https://github.com/wolfv/pixi-build-examples?subdirectory=boost-check&rev=9de9e1b#[FULL_COMMIT] + name: boost-check + version: 0.1.0 + build: hbf21a9e_0 + subdir: linux-64 + depends: + - libstdcxx >=14 + - libgcc >=14 + channel: null +- conda: https://prefix.dev/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda + sha256: 53eb8a79365e58849e7b1a068d31f4f9e718dc938d6f2c03e960345739a03569 + md5: 3cb76c3f10d3bc7f1105b2fc9db984df + depends: + - _libgcc_mutex 0.1 conda_forge + - _openmp_mutex >=4.5 + constrains: + - libgomp 14.2.0 h77fa898_1 + - libgcc-ng ==14.2.0=*_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 848745 + timestamp: 1729027721139 +- conda: https://prefix.dev/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda + sha256: 1911c29975ec99b6b906904040c855772ccb265a1c79d5d75c8ceec4ed89cd63 + md5: cc3573974587f12dda90d96e3e55a702 + depends: + - _libgcc_mutex 0.1 conda_forge + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 460992 + timestamp: 1729027639220 +- conda: https://prefix.dev/conda-forge/linux-64/libstdcxx-14.2.0-hc0a3c3a_1.conda + sha256: 4661af0eb9bdcbb5fb33e5d0023b001ad4be828fccdcc56500059d56f9869462 + md5: 234a5554c53625688d51062645337328 + depends: + - libgcc 14.2.0 h77fa898_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 3893695 + timestamp: 1729027746910 diff --git a/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_with_tag-2.snap b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_with_tag-2.snap new file mode 100644 index 000000000..db0642e5b --- /dev/null +++ b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_with_tag-2.snap @@ -0,0 +1,12 @@ +--- +source: tests/integration_rust/add_tests.rs +expression: pixi.project().unwrap().manifest().source.to_string() +--- +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["linux-64"] +preview = ['pixi-build'] + +[dependencies] +boost-check = { git = "https://github.com/wolfv/pixi-build-examples", tag = "v0.1.0", subdirectory = "boost-check" } diff --git a/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_with_tag.snap b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_with_tag.snap new file mode 100644 index 000000000..640431043 --- /dev/null +++ b/tests/integration_rust/snapshots/integration_rust__add_tests__add_git_with_tag.snap @@ -0,0 +1,77 @@ +--- +source: tests/integration_rust/add_tests.rs +expression: lock.render_to_string().unwrap() +--- +version: 6 +environments: + default: + channels: + - url: https://prefix.dev/conda-forge/ + packages: + linux-64: + - conda: https://prefix.dev/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + - conda: https://prefix.dev/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + - conda: https://prefix.dev/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/libstdcxx-14.2.0-hc0a3c3a_1.conda + - conda: git+https://github.com/wolfv/pixi-build-examples?subdirectory=boost-check&tag=v0.1.0#[FULL_COMMIT] +packages: +- conda: https://prefix.dev/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + sha256: fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726 + md5: d7c89558ba9fa0495403155b64376d81 + license: None + size: 2562 + timestamp: 1578324546067 +- conda: https://prefix.dev/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + build_number: 16 + sha256: fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22 + md5: 73aaf86a425cc6e73fcf236a5a46396d + depends: + - _libgcc_mutex 0.1 conda_forge + - libgomp >=7.5.0 + constrains: + - openmp_impl 9999 + license: BSD-3-Clause + license_family: BSD + size: 23621 + timestamp: 1650670423406 +- conda: git+https://github.com/wolfv/pixi-build-examples?subdirectory=boost-check&tag=v0.1.0#[FULL_COMMIT] + name: boost-check + version: 0.1.0 + build: hbf21a9e_0 + subdir: linux-64 + depends: + - libstdcxx >=14 + - libgcc >=14 + channel: null +- conda: https://prefix.dev/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda + sha256: 53eb8a79365e58849e7b1a068d31f4f9e718dc938d6f2c03e960345739a03569 + md5: 3cb76c3f10d3bc7f1105b2fc9db984df + depends: + - _libgcc_mutex 0.1 conda_forge + - _openmp_mutex >=4.5 + constrains: + - libgomp 14.2.0 h77fa898_1 + - libgcc-ng ==14.2.0=*_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 848745 + timestamp: 1729027721139 +- conda: https://prefix.dev/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda + sha256: 1911c29975ec99b6b906904040c855772ccb265a1c79d5d75c8ceec4ed89cd63 + md5: cc3573974587f12dda90d96e3e55a702 + depends: + - _libgcc_mutex 0.1 conda_forge + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 460992 + timestamp: 1729027639220 +- conda: https://prefix.dev/conda-forge/linux-64/libstdcxx-14.2.0-hc0a3c3a_1.conda + sha256: 4661af0eb9bdcbb5fb33e5d0023b001ad4be828fccdcc56500059d56f9869462 + md5: 234a5554c53625688d51062645337328 + depends: + - libgcc 14.2.0 h77fa898_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 3893695 + timestamp: 1729027746910 diff --git a/tests/integration_rust/snapshots/integration_rust__add_tests__add_plain_git.snap b/tests/integration_rust/snapshots/integration_rust__add_tests__add_plain_git.snap new file mode 100644 index 000000000..bb5edf21d --- /dev/null +++ b/tests/integration_rust/snapshots/integration_rust__add_tests__add_plain_git.snap @@ -0,0 +1,12 @@ +--- +source: tests/integration_rust/add_tests.rs +expression: pixi.project().unwrap().manifest().source.to_string() +--- +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["osx-arm64"] +preview = ['pixi-build'] + +[dependencies] +boost-check = { git = "https://github.com/wolfv/pixi-build-examples" } diff --git a/tests/integration_rust/snapshots/integration_rust__add_tests__add_plain_ssh_url.snap b/tests/integration_rust/snapshots/integration_rust__add_tests__add_plain_ssh_url.snap new file mode 100644 index 000000000..1b6285116 --- /dev/null +++ b/tests/integration_rust/snapshots/integration_rust__add_tests__add_plain_ssh_url.snap @@ -0,0 +1,12 @@ +--- +source: tests/integration_rust/add_tests.rs +expression: pixi.project().unwrap().manifest().source.to_string() +--- +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["linux-64"] +preview = ['pixi-build'] + +[dependencies] +boost-check = { git = "git+ssh://git@github.com/wolfv/pixi-build-examples.git" } diff --git a/tests/integration_rust/snapshots/integration_rust__add_tests__add_pypi_git.snap b/tests/integration_rust/snapshots/integration_rust__add_tests__add_pypi_git.snap new file mode 100644 index 000000000..d0e6eff69 --- /dev/null +++ b/tests/integration_rust/snapshots/integration_rust__add_tests__add_pypi_git.snap @@ -0,0 +1,11 @@ +--- +source: tests/integration_rust/add_tests.rs +expression: pixi.project().unwrap().manifest().source.to_string() +--- +[project] +name = "test-channel-change" +channels = ["https://prefix.dev/conda-forge"] +platforms = ["linux-64"] + +[pypi-dependencies] +boltons = { git = "https://github.com/mahmoud/boltons.git" }