From c70b45d5addaa21c5897a34a548d9a745902af97 Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Wed, 15 May 2024 15:42:16 +0200 Subject: [PATCH 01/20] feat: add isolate flag to tasks and run command --- pixi.lock | 712 +++++++++++++++++++++++++++++++++++++++- pixi.toml | 14 + src/activation.rs | 17 +- src/cli/run.rs | 28 +- src/cli/shell_hook.rs | 5 +- src/cli/task.rs | 6 + src/lock_file/update.rs | 7 +- src/project/mod.rs | 3 +- src/task/mod.rs | 17 + src/task/task_graph.rs | 3 + tests/install_tests.rs | 1 - 11 files changed, 775 insertions(+), 38 deletions(-) diff --git a/pixi.lock b/pixi.lock index e75f74dda..31162aeb0 100644 --- a/pixi.lock +++ b/pixi.lock @@ -40,7 +40,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran-12.3.0-h915e2ae_6.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran_impl_linux-64-12.3.0-h1645026_6.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran_linux-64-12.3.0-h617cb40_3.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/git-2.42.0-pl5321h7bc287a_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/git-2.42.0-pl5321h86e50cf_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx-12.3.0-h915e2ae_6.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_impl_linux-64-12.3.0-h2a574ab_6.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_linux-64-12.3.0-h4a1b8e8_3.conda @@ -76,10 +76,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-hd590300_5.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.4.20240210-h59595ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h59595ed_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/nodeenv-1.8.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.0-hd590300_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.42-hcad00b1_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.40-hc3806b6_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/perl-5.32.1-7_hd590300_perl5.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/pkg-config-0.29.2-h36c2ea0_1008.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.1-pyhd8ed1ab_0.conda @@ -114,7 +114,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/yaml-0.2.5-h7f98852_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.5-hfc55251_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.6-ha6fb4c9_0.conda osx-64: - conda: https://conda.anaconda.org/conda-forge/noarch/attrs-23.2.0-pyh71513ae_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/brotli-python-1.1.0-py312heafc425_1.conda @@ -159,7 +159,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/libsqlite-3.45.3-h92b6c6a_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/libssh2-1.11.0-hd019ec5_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.2.13-h8a1eda9_5.conda - - conda: https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.4.20240210-h73e2aa4_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.5-h5846eda_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/nodeenv-1.8.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/openssl-3.3.0-hd75f5a5_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/pcre2-10.42-h0ad2156_0.conda @@ -196,7 +196,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/xz-5.2.6-h775f41a_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/osx-64/yaml-0.2.5-h0d85af4_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.5-h829000d_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.6-h915ae27_0.conda osx-arm64: - conda: https://conda.anaconda.org/conda-forge/noarch/attrs-23.2.0-pyh71513ae_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/brotli-python-1.1.0-py312h9f69965_1.conda @@ -242,7 +242,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libsqlite-3.45.3-h091b4b1_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libssh2-1.11.0-h7a5bd25_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libzlib-1.2.13-h53f4e23_5.conda - - conda: https://conda.anaconda.org/conda-forge/osx-arm64/ncurses-6.4.20240210-h078ce10_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/ncurses-6.5-hb89a1cb_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/nodeenv-1.8.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/openssl-3.3.0-h0d3ecfb_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/pcre2-10.42-h26f9a81_0.conda @@ -279,7 +279,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/xz-5.2.6-h57fd34a_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/osx-arm64/yaml-0.2.5-h3422bc3_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.5-h4f39d0f_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.6-hb46c0d2_0.conda win-64: - conda: https://conda.anaconda.org/conda-forge/noarch/attrs-23.2.0-pyh71513ae_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/brotli-python-1.1.0-py312h53d5487_1.conda @@ -796,6 +796,128 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/zlib-1.2.13-hcfcfb64_5.conda - conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.5-h12be248_0.conda + isolated: + channels: + - url: https://conda.anaconda.org/conda-forge/ + packages: + linux-64: + - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/attrs-23.2.0-pyh71513ae_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/binutils-2.40-h4852527_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/binutils_impl_linux-64-2.40-ha885e6a_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/binutils_linux-64-2.40-hdade7a5_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/brotli-python-1.1.0-py312h30efb56_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-hd590300_5.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.28.1-hd590300_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/c-compiler-1.7.0-hd590300_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.2.2-hbcca054_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/certifi-2024.2.2-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/cffconvert-2.0.0-pyhd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/cffi-1.16.0-py312hf06ca03_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/cfgv-3.3.1-pyhd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.3.2-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/cli-ui-0.17.2-pyhd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/click-8.1.7-unix_pyh707e725_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/cmake-3.29.3-h91dbaaa_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/compilers-1.7.0-ha770c72_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/contextlib2-21.6.0-pyhd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/coreutils-9.5-hd590300_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/curl-8.7.1-hca28451_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/cxx-compiler-1.7.0-h00ab1b0_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.3.8-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/docopt-0.6.2-py_1.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/filelock-3.14.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/findutils-4.6.0-h166bdaf_1001.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/fortran-compiler-1.7.0-heb67821_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc-12.3.0-h915e2ae_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc_impl_linux-64-12.3.0-h58ffeeb_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc_linux-64-12.3.0-h6477408_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gettext-0.22.5-h59595ed_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gettext-tools-0.22.5-h59595ed_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran-12.3.0-h915e2ae_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran_impl_linux-64-12.3.0-h1645026_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran_linux-64-12.3.0-h617cb40_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/git-2.42.0-pl5321h86e50cf_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/grep-3.11-h3cbd922_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx-12.3.0-h915e2ae_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_impl_linux-64-12.3.0-h2a574ab_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_linux-64-12.3.0-h4a1b8e8_3.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/identify-2.5.36-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/idna-3.7-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-7.1.0-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/jsonschema-3.2.0-pyhd8ed1ab_3.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/kernel-headers_linux-64-2.6.32-he073ed8_17.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/keyutils-1.6.1-h166bdaf_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/krb5-1.21.2-h659d440_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.40-h55db66e_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libasprintf-0.22.5-h661eb56_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libasprintf-devel-0.22.5-h661eb56_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libcurl-8.7.1-hca28451_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20191231-he28a2e2_2.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-hd590300_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.6.2-h59595ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/libgcc-devel_linux-64-12.3.0-h0223996_107.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-13.2.0-h77fa898_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgettextpo-0.22.5-h59595ed_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgettextpo-devel-0.22.5-h59595ed_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-13.2.0-hca663fb_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-13.2.0-h77fa898_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libiconv-1.17-hd590300_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.58.0-h47da74e_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.1-hd590300_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libsanitizer-12.3.0-hb8811af_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.45.3-h2797004_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.11.0-h0841786_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/libstdcxx-devel_linux-64-12.3.0-h0223996_107.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-13.2.0-hc0a3c3a_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libuv-1.48.0-hd590300_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-hd590300_5.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/make-4.3-hd18ef5c_1.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h59595ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/nodeenv-1.8.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.0-hd590300_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.40-hc3806b6_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/perl-5.32.1-7_hd590300_perl5.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pkg-config-0.29.2-h36c2ea0_1008.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.3.3-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pycparser-2.22-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pykwalify-1.8.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pyrsistent-0.20.0-py312h98912ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyha2e5f31_6.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.12.3-hab00c5b_0_cpython.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.9.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/python_abi-3.12-4_cp312.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pyyaml-6.0.1-py312h98912ed_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8228510_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/requests-2.31.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/rhash-1.4.4-hd590300_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml-0.18.6-py312h98912ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml.clib-0.2.8-py312h98912ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/rust-1.77.2-h70c747d_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/rust-std-x86_64-unknown-linux-gnu-1.77.2-h2c6d0dc_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/schema-0.7.7-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/setuptools-69.5.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/six-1.16.0-pyh6c4a22f_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/sysroot_linux-64-2.12-he073ed8_17.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tabulate-0.9.0-pyhd8ed1ab_1.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/tbump-6.9.0-pyhd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tomlkit-0.12.5-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ukkonen-1.0.1-py312h8572e83_4.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/unidecode-1.3.8-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/urllib3-2.2.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/virtualenv-20.26.2-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/yaml-0.2.5-h7f98852_2.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.6-ha6fb4c9_0.conda schema: channels: - url: https://conda.anaconda.org/conda-forge/ @@ -1359,6 +1481,23 @@ packages: license: BSD-3-Clause size: 6324 timestamp: 1714575511013 +- kind: conda + name: c-compiler + version: 1.7.0 + build: hd590300_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/c-compiler-1.7.0-hd590300_1.conda + sha256: 4213b6cbaed673c07f8b79c089f3487afdd56de944f21c4861ead862b7657eb4 + md5: e9dffe1056994133616378309f932d77 + depends: + - binutils + - gcc + - gcc_linux-64 12.* + license: BSD-3-Clause + license_family: BSD + size: 6324 + timestamp: 1714575511013 - kind: conda name: ca-certificates version: 2024.2.2 @@ -1799,6 +1938,30 @@ packages: license_family: BSD size: 85051 timestamp: 1692312207348 +- kind: conda + name: cmake + version: 3.29.3 + build: h91dbaaa_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/cmake-3.29.3-h91dbaaa_0.conda + sha256: fedf3ae3922cf4e5fe6b7eb24ef788c7b8915830376d23ba53327602dfcc3eec + md5: 7d597aedcacb6afeb9303d185c4e8d07 + depends: + - bzip2 >=1.0.8,<2.0a0 + - libcurl >=8.7.1,<9.0a0 + - libexpat >=2.6.2,<3.0a0 + - libgcc-ng >=12 + - libstdcxx-ng >=12 + - libuv >=1.48.0,<2.0a0 + - libzlib >=1.2.13,<1.3.0a0 + - ncurses >=6.5,<7.0a0 + - rhash >=1.4.4,<2.0a0 + - xz >=5.2.6,<6.0a0 + - zstd >=1.5.6,<1.6.0a0 + license: BSD-3-Clause + license_family: BSD + size: 18945833 + timestamp: 1715500207599 - kind: conda name: colorama version: 0.4.6 @@ -1846,6 +2009,20 @@ packages: license_family: PSF size: 16367 timestamp: 1624848715744 +- kind: conda + name: coreutils + version: '9.5' + build: hd590300_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/coreutils-9.5-hd590300_0.conda + sha256: 7cd3b0f55aa55bb27b045c30f32b3f6b874ecc006f3abcb274c71a3bcbacb358 + md5: 126d457e0e7a535278e808a7d8960015 + depends: + - libgcc-ng >=12 + license: GPL-3.0-or-later + license_family: GPL + size: 3014238 + timestamp: 1711655132451 - kind: conda name: cssselect2 version: 0.2.1 @@ -1937,6 +2114,23 @@ packages: license: BSD-3-Clause size: 6283 timestamp: 1714575513327 +- kind: conda + name: cxx-compiler + version: 1.7.0 + build: h00ab1b0_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/cxx-compiler-1.7.0-h00ab1b0_1.conda + sha256: cf895938292cfd4cfa2a06c6d57aa25c33cc974d4ffe52e704ffb67f5577b93f + md5: 28de2e073db9ca9b72858bee9fb6f571 + depends: + - c-compiler 1.7.0 hd590300_1 + - gxx + - gxx_linux-64 12.* + license: BSD-3-Clause + license_family: BSD + size: 6283 + timestamp: 1714575513327 - kind: conda name: defusedxml version: 0.7.1 @@ -2069,6 +2263,22 @@ packages: license: Unlicense size: 15902 timestamp: 1714422911808 +- kind: conda + name: findutils + version: 4.6.0 + build: h166bdaf_1001 + build_number: 1001 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/findutils-4.6.0-h166bdaf_1001.tar.bz2 + sha256: 30aca48b587e51d51f148d9b450a07fb21475585375e5c54c0048b13a31a437a + md5: 0045534ae3fc1682e8096b0c70b2570b + depends: + - gettext + - libgcc-ng >=12 + license: GPL-3.0 + license_family: GPL + size: 570573 + timestamp: 1666198102478 - kind: conda name: font-ttf-dejavu-sans-mono version: '2.37' @@ -2242,6 +2452,24 @@ packages: license: BSD-3-Clause size: 6300 timestamp: 1714575515211 +- kind: conda + name: fortran-compiler + version: 1.7.0 + build: heb67821_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/fortran-compiler-1.7.0-heb67821_1.conda + sha256: 4293677cdf4c54d13659a3f9ac15cae778310811c62add29bb2e70630756317a + md5: cf4b0e7c4c78bb0662aed9b27c414a3c + depends: + - binutils + - c-compiler 1.7.0 hd590300_1 + - gfortran + - gfortran_linux-64 12.* + license: BSD-3-Clause + license_family: BSD + size: 6300 + timestamp: 1714575515211 - kind: conda name: freetype version: 2.12.1 @@ -2321,6 +2549,21 @@ packages: license_family: BSD size: 26042 timestamp: 1713754043368 +- kind: conda + name: gcc + version: 12.3.0 + build: h915e2ae_7 + build_number: 7 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/gcc-12.3.0-h915e2ae_7.conda + sha256: 7358118791ddb5e1fb58fb0c52bf4b8b993817bae50f5bbf66677ce4df783fda + md5: 84b1c5cebd0a0443f3d7f90a4be93fc6 + depends: + - gcc_impl_linux-64 12.3.0.* + license: BSD-3-Clause + license_family: BSD + size: 25966 + timestamp: 1715016817964 - kind: conda name: gcc_impl_linux-64 version: 12.3.0 @@ -2341,6 +2584,27 @@ packages: license: GPL-3.0-only WITH GCC-exception-3.1 size: 51460097 timestamp: 1714582795671 +- kind: conda + name: gcc_impl_linux-64 + version: 12.3.0 + build: h58ffeeb_7 + build_number: 7 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/gcc_impl_linux-64-12.3.0-h58ffeeb_7.conda + sha256: a86af41f4b240ce86f05bc81cac1d10d272bc57e63ebab779aedc887e329e0c1 + md5: 95f78565a09852783d3e90e0389cfa5f + depends: + - binutils_impl_linux-64 >=2.40 + - libgcc-devel_linux-64 12.3.0 h0223996_107 + - libgcc-ng >=12.3.0 + - libgomp >=12.3.0 + - libsanitizer 12.3.0 hb8811af_7 + - libstdcxx-ng >=12.3.0 + - sysroot_linux-64 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 51128234 + timestamp: 1715016710479 - kind: conda name: gcc_linux-64 version: 12.3.0 @@ -2486,6 +2750,23 @@ packages: license_family: BSD size: 25490 timestamp: 1713754217279 +- kind: conda + name: gfortran + version: 12.3.0 + build: h915e2ae_7 + build_number: 7 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/gfortran-12.3.0-h915e2ae_7.conda + sha256: 9a7967e4d51ca1eeceb0312d6099871a2a9f43e39b31b9dd902c7dd09319f346 + md5: 8efa768f7f74085629f3e1090e7f0569 + depends: + - gcc 12.3.0.* + - gcc_impl_linux-64 12.3.0.* + - gfortran_impl_linux-64 12.3.0.* + license: BSD-3-Clause + license_family: BSD + size: 25420 + timestamp: 1715017008409 - kind: conda name: gfortran_impl_linux-64 version: 12.3.0 @@ -2505,6 +2786,26 @@ packages: license: GPL-3.0-only WITH GCC-exception-3.1 size: 15303925 timestamp: 1714583014694 +- kind: conda + name: gfortran_impl_linux-64 + version: 12.3.0 + build: h1645026_7 + build_number: 7 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/gfortran_impl_linux-64-12.3.0-h1645026_7.conda + sha256: 3fd9ede1409219606502bf5b565ae28b204e35698e95ffff6f3db1cec191c143 + md5: 2d9d4058c433c9ce2a811c76658c4efd + depends: + - gcc_impl_linux-64 >=12.3.0 + - libgcc-ng >=12.3.0 + - libgcc-ng >=4.9 + - libgfortran5 >=12.3.0 + - libstdcxx-ng >=4.9 + - sysroot_linux-64 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 15376006 + timestamp: 1715016903212 - kind: conda name: gfortran_linux-64 version: 12.3.0 @@ -2574,12 +2875,11 @@ packages: - kind: conda name: git version: 2.42.0 - build: pl5321h7bc287a_1 - build_number: 1 + build: pl5321h86e50cf_0 subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/git-2.42.0-pl5321h7bc287a_1.conda - sha256: dee2e29052bb9a7c7ab16d931e10aedd6410ba1c110983a5a232fe06a1dba008 - md5: 7334e613aee6ab4a4d81150a53881074 + url: https://conda.anaconda.org/conda-forge/linux-64/git-2.42.0-pl5321h86e50cf_0.conda + sha256: 6f6b3d60da46f53f1e1708a63d6ce5f119e6aba0f5243326b7ecaf3b0cdbc6d4 + md5: 96ad24c67e0056d171385859c43218a2 depends: - curl - gettext @@ -2587,12 +2887,12 @@ packages: - libgcc-ng >=12 - libiconv >=1.17,<2.0a0 - libzlib >=1.2.13,<1.3.0a0 - - openssl >=3.2.0,<4.0a0 - - pcre2 >=10.42,<10.43.0a0 + - openssl >=3.1.2,<4.0a0 + - pcre2 >=10.40,<10.41.0a0 - perl 5.* license: GPL-2.0-or-later and LGPL-2.1-or-later - size: 9483120 - timestamp: 1701086793863 + size: 9744309 + timestamp: 1692712850682 - kind: conda name: git version: 2.42.0 @@ -2615,6 +2915,21 @@ packages: license: GPL-2.0-or-later and LGPL-2.1-or-later size: 7744105 timestamp: 1701087084155 +- kind: conda + name: grep + version: '3.11' + build: h3cbd922_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/grep-3.11-h3cbd922_0.conda + sha256: 89f4dddad884155d8e163df0682ae750308f1cee75df4f900d4478c68cfbc61a + md5: 6e759ce841faa9c134cf9a98e3b2f621 + depends: + - libgcc-ng >=12 + - pcre2 >=10.40,<10.41.0a0 + license: GPL-3.0-or-later + license_family: GPL + size: 290697 + timestamp: 1684457116924 - kind: conda name: gxx version: 12.3.0 @@ -2631,6 +2946,22 @@ packages: license_family: BSD size: 25494 timestamp: 1713754228105 +- kind: conda + name: gxx + version: 12.3.0 + build: h915e2ae_7 + build_number: 7 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/gxx-12.3.0-h915e2ae_7.conda + sha256: 81bba3a4a27cf8c8f29c31da2ebd2ec49899974d066ba20ce110ac1d067bfb78 + md5: 721c5433122a02bf3a081db10a2e68e2 + depends: + - gcc 12.3.0.* + - gxx_impl_linux-64 12.3.0.* + license: BSD-3-Clause + license_family: BSD + size: 25402 + timestamp: 1715017020869 - kind: conda name: gxx_impl_linux-64 version: 12.3.0 @@ -2647,6 +2978,23 @@ packages: license: GPL-3.0-only WITH GCC-exception-3.1 size: 13037762 timestamp: 1714583092237 +- kind: conda + name: gxx_impl_linux-64 + version: 12.3.0 + build: h2a574ab_7 + build_number: 7 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/gxx_impl_linux-64-12.3.0-h2a574ab_7.conda + sha256: c7a577846ae46dade05b7faa8956a7d4187b747bbc9be5c38a2b4ca8f7c108cc + md5: 265caa78b979f112fc241cecd0015c91 + depends: + - gcc_impl_linux-64 12.3.0 h58ffeeb_7 + - libstdcxx-devel_linux-64 12.3.0 h0223996_107 + - sysroot_linux-64 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 13036959 + timestamp: 1715016975232 - kind: conda name: gxx_linux-64 version: 12.3.0 @@ -3504,6 +3852,20 @@ packages: license: GPL-3.0-only WITH GCC-exception-3.1 size: 2538737 timestamp: 1714582531224 +- kind: conda + name: libgcc-devel_linux-64 + version: 12.3.0 + build: h0223996_107 + build_number: 107 + subdir: noarch + noarch: generic + url: https://conda.anaconda.org/conda-forge/noarch/libgcc-devel_linux-64-12.3.0-h0223996_107.conda + sha256: d6623e46608ef1baf2baa14ac77d0aefbc5187f1b9b5423592bfa124054e6753 + md5: 851e9651c9e4cd5dc19f80398eba9a1c + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 2532549 + timestamp: 1715016464312 - kind: conda name: libgcc-ng version: 13.2.0 @@ -3521,6 +3883,24 @@ packages: license: GPL-3.0-only WITH GCC-exception-3.1 size: 777610 timestamp: 1714581763008 +- kind: conda + name: libgcc-ng + version: 13.2.0 + build: h77fa898_7 + build_number: 7 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-13.2.0-h77fa898_7.conda + sha256: 62af2b89acbe74a21606c8410c276e57309c0a2ab8a9e8639e3c8131c0b60c92 + md5: 72ec1b1b04c4d15d4204ece1ecea5978 + depends: + - _libgcc_mutex 0.1 conda_forge + - _openmp_mutex >=4.5 + constrains: + - libgomp 13.2.0 h77fa898_7 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 775806 + timestamp: 1715016057793 - kind: conda name: libgettextpo version: 0.22.5 @@ -3634,6 +4014,23 @@ packages: license: GPL-3.0-only WITH GCC-exception-3.1 size: 1439194 timestamp: 1714581774681 +- kind: conda + name: libgfortran5 + version: 13.2.0 + build: hca663fb_7 + build_number: 7 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-13.2.0-hca663fb_7.conda + sha256: 754ab038115edce550fdccdc9ddf7dead2fa8346b8cdd4428c59ae1e83293978 + md5: c0bd771f09a326fdcd95a60b617795bf + depends: + - libgcc-ng >=13.2.0 + constrains: + - libgfortran-ng 13.2.0 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 1441361 + timestamp: 1715016068766 - kind: conda name: libglib version: 2.78.4 @@ -3732,6 +4129,21 @@ packages: license: GPL-3.0-only WITH GCC-exception-3.1 size: 420177 timestamp: 1714581699319 +- kind: conda + name: libgomp + version: 13.2.0 + build: h77fa898_7 + build_number: 7 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libgomp-13.2.0-h77fa898_7.conda + sha256: 781444fa069d3b50e8ed667b750571cacda785761c7fc2a89ece1ac49693d4ad + md5: abf3fec87c2563697defa759dec3d639 + depends: + - _libgcc_mutex 0.1 conda_forge + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 422336 + timestamp: 1715015995979 - kind: conda name: libiconv version: '1.17' @@ -4067,6 +4479,21 @@ packages: license: GPL-3.0-only WITH GCC-exception-3.1 size: 3956122 timestamp: 1714582698210 +- kind: conda + name: libsanitizer + version: 12.3.0 + build: hb8811af_7 + build_number: 7 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libsanitizer-12.3.0-hb8811af_7.conda + sha256: 3f481da2367b5e407a954210b86a828528c0416023315a8d78e6729639c7d072 + md5: ee573415c47ce17f65101d0b3fba396d + depends: + - libgcc-ng >=12.3.0 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 3939615 + timestamp: 1715016598795 - kind: conda name: libsqlite version: 3.45.3 @@ -4181,6 +4608,20 @@ packages: license: GPL-3.0-only WITH GCC-exception-3.1 size: 11907338 timestamp: 1714582586636 +- kind: conda + name: libstdcxx-devel_linux-64 + version: 12.3.0 + build: h0223996_107 + build_number: 107 + subdir: noarch + noarch: generic + url: https://conda.anaconda.org/conda-forge/noarch/libstdcxx-devel_linux-64-12.3.0-h0223996_107.conda + sha256: b67931a6ad04effddaf5b18c732ac6154f0f494d5d5189e5e23fbc5a26212389 + md5: 167a1f5d77d8f3c2a638f7eb418429f1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 11881031 + timestamp: 1715016519463 - kind: conda name: libstdcxx-ng version: 13.2.0 @@ -4193,6 +4634,19 @@ packages: license: GPL-3.0-only WITH GCC-exception-3.1 size: 3844194 timestamp: 1714581807420 +- kind: conda + name: libstdcxx-ng + version: 13.2.0 + build: hc0a3c3a_7 + build_number: 7 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-13.2.0-hc0a3c3a_7.conda + sha256: 35f1e08be0a84810c9075f5bd008495ac94e6c5fe306dfe4b34546f11fed850f + md5: 53ebd4c833fa01cb2c6353e99f905406 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 3837704 + timestamp: 1715016117360 - kind: conda name: libtiff version: 4.6.0 @@ -4293,6 +4747,20 @@ packages: license_family: BSD size: 33601 timestamp: 1680112270483 +- kind: conda + name: libuv + version: 1.48.0 + build: hd590300_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libuv-1.48.0-hd590300_0.conda + sha256: b7c0e8a0c93c2621be7645b37123d4e8d27e8a974da26a3fba47a9c37711aa7f + md5: 7e8b914b1062dd4386e3de4d82a3ead6 + depends: + - libgcc-ng >=12 + license: MIT + license_family: MIT + size: 899979 + timestamp: 1709913354710 - kind: conda name: libwebp-base version: 1.4.0 @@ -4579,6 +5047,21 @@ packages: license: MIT, BSD size: 31928 timestamp: 1608166099896 +- kind: conda + name: make + version: '4.3' + build: hd18ef5c_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/make-4.3-hd18ef5c_1.tar.bz2 + sha256: 4a5fe7c80bb0de0015328e2d3fc8db1736f528cb1fd53cd0d5527e24269a4f7c + md5: 4049ebfd3190b580dffe76daed26155a + depends: + - libgcc-ng >=7.5.0 + license: GPL-3.0-or-later + license_family: GPL + size: 518896 + timestamp: 1602706451788 - kind: conda name: markdown version: '3.6' @@ -4858,6 +5341,41 @@ packages: license: X11 AND BSD-3-Clause size: 823010 timestamp: 1710866856626 +- kind: conda + name: ncurses + version: '6.5' + build: h5846eda_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.5-h5846eda_0.conda + sha256: 6ecc73db0e49143092c0934355ac41583a5d5a48c6914c5f6ca48e562d3a4b79 + md5: 02a888433d165c99bf09784a7b14d900 + license: X11 AND BSD-3-Clause + size: 823601 + timestamp: 1715195267791 +- kind: conda + name: ncurses + version: '6.5' + build: h59595ed_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h59595ed_0.conda + sha256: 4fc3b384f4072b68853a0013ea83bdfd3d66b0126e2238e1d6e1560747aa7586 + md5: fcea371545eda051b6deafb24889fc69 + depends: + - libgcc-ng >=12 + license: X11 AND BSD-3-Clause + size: 887465 + timestamp: 1715194722503 +- kind: conda + name: ncurses + version: '6.5' + build: hb89a1cb_0 + subdir: osx-arm64 + url: https://conda.anaconda.org/conda-forge/osx-arm64/ncurses-6.5-hb89a1cb_0.conda + sha256: 87d7cf716d9d930dab682cb57b3b8d3a61940b47d6703f3529a155c938a6990a + md5: b13ad5724ac9ae98b6b4fd87e4500ba4 + license: X11 AND BSD-3-Clause + size: 795131 + timestamp: 1715194898402 - kind: conda name: nodeenv version: 1.8.0 @@ -5058,6 +5576,22 @@ packages: license_family: MOZILLA size: 41173 timestamp: 1702250135032 +- kind: conda + name: pcre2 + version: '10.40' + build: hc3806b6_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.40-hc3806b6_0.tar.bz2 + sha256: 7a29ec847556eed4faa1646010baae371ced69059a4ade43851367a076d6108a + md5: 69e2c796349cd9b273890bee0febfe1b + depends: + - bzip2 >=1.0.8,<2.0a0 + - libgcc-ng >=12 + - libzlib >=1.2.12,<1.3.0a0 + license: BSD-3-Clause + license_family: BSD + size: 2412495 + timestamp: 1665562915343 - kind: conda name: pcre2 version: '10.42' @@ -6451,6 +6985,20 @@ packages: license_family: APACHE size: 56690 timestamp: 1684774408600 +- kind: conda + name: rhash + version: 1.4.4 + build: hd590300_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/rhash-1.4.4-hd590300_0.conda + sha256: 12711d2d4a808a503c2e49b25d26ecb351435521e814c154e682dd2be71c2611 + md5: ec972a9a2925ac8d7a19eb9606561fff + depends: + - libgcc-ng >=12 + license: MIT + license_family: MIT + size: 185144 + timestamp: 1693455923632 - kind: conda name: ruamel.yaml version: 0.18.6 @@ -6616,6 +7164,24 @@ packages: license_family: MIT size: 186765686 timestamp: 1712741423714 +- kind: conda + name: rust + version: 1.77.2 + build: h70c747d_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/rust-1.77.2-h70c747d_1.conda + sha256: fc981fbc0a5e76fc5fbd6364bd079e114769e71a420c052881d9ae8f5a513b54 + md5: 3c1c59e0515577dd985ae9eb8e70cca3 + depends: + - gcc_impl_linux-64 + - libgcc-ng >=12 + - libzlib >=1.2.13,<1.3.0a0 + - rust-std-x86_64-unknown-linux-gnu 1.77.2 h2c6d0dc_1 + license: MIT + license_family: MIT + size: 186692944 + timestamp: 1715154179188 - kind: conda name: rust version: 1.77.2 @@ -6712,6 +7278,24 @@ packages: license_family: MIT size: 33827015 timestamp: 1712741238767 +- kind: conda + name: rust-std-x86_64-unknown-linux-gnu + version: 1.77.2 + build: h2c6d0dc_1 + build_number: 1 + subdir: noarch + noarch: generic + url: https://conda.anaconda.org/conda-forge/noarch/rust-std-x86_64-unknown-linux-gnu-1.77.2-h2c6d0dc_1.conda + sha256: 6a82d49964c98f1510f4e27c50df33ce1abdd2ade2625b9133ce8e34b3819c75 + md5: 116000ac370d62d9e9062d6e8ce8cd70 + depends: + - __unix + constrains: + - rust >=1.77.2,<1.77.3.0a0 + license: MIT + license_family: MIT + size: 33923495 + timestamp: 1715154009471 - kind: conda name: schema version: 0.7.5 @@ -6729,6 +7313,22 @@ packages: license_family: MIT size: 22493 timestamp: 1684241157250 +- kind: conda + name: schema + version: 0.7.7 + build: pyhd8ed1ab_0 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/schema-0.7.7-pyhd8ed1ab_0.conda + sha256: e2341ab1cf6128bde5037a6ba3c48ee33abc6bbe8d3db10f5f73f24b9f28b83c + md5: 1add6f6b99191efab14f16e6aa9b6461 + depends: + - contextlib2 >=0.5.5 + - python >=3.6 + license: MIT + license_family: MIT + size: 23534 + timestamp: 1714829277138 - kind: conda name: setuptools version: 69.5.1 @@ -6981,6 +7581,21 @@ packages: license_family: MIT size: 37173 timestamp: 1709043886347 +- kind: conda + name: tomlkit + version: 0.12.5 + build: pyha770c72_0 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/tomlkit-0.12.5-pyha770c72_0.conda + sha256: 5117eff35992d896ca177dfffc08be8a9b3bf3d306ddc3d8bf4b699cdf1e1b79 + md5: e5dde5caf905e9d95895e05f94967e14 + depends: + - python >=3.7 + license: MIT + license_family: MIT + size: 37297 + timestamp: 1715185504185 - kind: conda name: typing-extensions version: 4.11.0 @@ -7212,6 +7827,23 @@ packages: license_family: MIT size: 3459994 timestamp: 1714439521015 +- kind: conda + name: virtualenv + version: 20.26.2 + build: pyhd8ed1ab_0 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/virtualenv-20.26.2-pyhd8ed1ab_0.conda + sha256: 1eefd180723fb2fd295352323b53777eeae5765b24d62ae75fc9f1e71b455f11 + md5: 7d36e7a485ea2f5829408813bdbbfb38 + depends: + - distlib <1,>=0.3.7 + - filelock <4,>=3.12.2 + - platformdirs <5,>=3.9.1 + - python >=3.8 + license: MIT + size: 3458445 + timestamp: 1715681264937 - kind: conda name: vs2015_runtime version: 14.38.33130 @@ -7816,3 +8448,49 @@ packages: license_family: BSD size: 545199 timestamp: 1693151163452 +- kind: conda + name: zstd + version: 1.5.6 + build: h915ae27_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.6-h915ae27_0.conda + sha256: efa04a98cb149643fa54c4dad5a0179e36a5fbc88427ea0eec88ceed87fd0f96 + md5: 4cb2cd56f039b129bb0e491c1164167e + depends: + - __osx >=10.9 + - libzlib >=1.2.13,<1.3.0a0 + license: BSD-3-Clause + license_family: BSD + size: 498900 + timestamp: 1714723303098 +- kind: conda + name: zstd + version: 1.5.6 + build: ha6fb4c9_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.6-ha6fb4c9_0.conda + sha256: c558b9cc01d9c1444031bd1ce4b9cff86f9085765f17627a6cd85fc623c8a02b + md5: 4d056880988120e29d75bfff282e0f45 + depends: + - libgcc-ng >=12 + - libstdcxx-ng >=12 + - libzlib >=1.2.13,<1.3.0a0 + license: BSD-3-Clause + license_family: BSD + size: 554846 + timestamp: 1714722996770 +- kind: conda + name: zstd + version: 1.5.6 + build: hb46c0d2_0 + subdir: osx-arm64 + url: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.6-hb46c0d2_0.conda + sha256: 2d4fd1ff7ee79cd954ca8e81abf11d9d49954dd1fef80f27289e2402ae9c2e09 + md5: d96942c06c3e84bfcc5efb038724a7fd + depends: + - __osx >=11.0 + - libzlib >=1.2.13,<1.3.0a0 + license: BSD-3-Clause + license_family: BSD + size: 405089 + timestamp: 1714723101397 diff --git a/pixi.toml b/pixi.toml index 76e235373..e1c9953fa 100644 --- a/pixi.toml +++ b/pixi.toml @@ -37,6 +37,19 @@ tbump = ">=6.9.0,<6.10" [target.linux-64.dependencies] compilers = ">=1.6.0" +[feature.isolated] +platforms = ["linux-64"] + +[feature.isolated.tasks] +install = { cmd = "cargo install --path . --locked", isolated = true} + +[feature.isolated.dependencies] +cmake = ">=3.29.3,<3.30" +make = ">=4.3,<5" +coreutils = ">=9.5,<10" +grep = ">=3.11,<4" +findutils = ">=4.6.0,<4.7" + [feature.docs.dependencies] mkdocs = "1.5.3.*" mkdocs-material = ">=9.5.16" @@ -69,5 +82,6 @@ pyyaml = ">=6.0.1,<6.1" taplo = ">=0.9.1,<0.10" [environments] +isolated = { features = ["isolated"] } docs = { features = ["docs"], no-default-feature = true } schema = { features = ["schema"], no-default-feature = true } diff --git a/src/activation.rs b/src/activation.rs index 0a7d5ffbe..9929313c5 100644 --- a/src/activation.rs +++ b/src/activation.rs @@ -130,6 +130,7 @@ pub fn get_activator<'p>( /// Runs and caches the activation script. pub async fn run_activation( environment: &Environment<'_>, + isolated: bool, ) -> miette::Result> { let activator = get_activator(environment, ShellEnum::default()).map_err(|e| { miette::miette!(format!( @@ -139,6 +140,11 @@ pub async fn run_activation( )) })?; + let path_modification_behavior = if isolated { + PathModificationBehavior::Replace + } else { + PathModificationBehavior::Prepend + }; let activator_result = match tokio::task::spawn_blocking(move || { // Run and cache the activation script activator.run_activation(ActivationVariables { @@ -149,7 +155,7 @@ pub async fn run_activation( conda_prefix: None, // Prepending environment paths so they get found first. - path_modification_behavior: PathModificationBehavior::Prepend, + path_modification_behavior, }) }) .await @@ -183,7 +189,6 @@ pub async fn run_activation( } } }; - Ok(activator_result) } @@ -222,7 +227,10 @@ pub async fn get_activation_env<'p>( // Get the prefix which we can then activate. get_up_to_date_prefix(environment, lock_file_usage, false).await?; - environment.project().get_env_variables(environment).await + environment + .project() + .get_env_variables(environment, false) + .await } #[cfg(test)] @@ -248,14 +256,13 @@ mod tests { let default_env = project.default_environment(); let env = default_env.get_metadata_env(); - dbg!(&env); + assert_eq!(env.get("PIXI_ENVIRONMENT_NAME").unwrap(), "default"); assert!(env.get("PIXI_ENVIRONMENT_PLATFORMS").is_some()); assert!(env.get("PIXI_PROMPT").unwrap().contains("pixi")); let test_env = project.environment("test").unwrap(); let env = test_env.get_metadata_env(); - dbg!(&env); assert_eq!(env.get("PIXI_ENVIRONMENT_NAME").unwrap(), "test"); assert!(env.get("PIXI_PROMPT").unwrap().contains("pixi")); diff --git a/src/cli/run.rs b/src/cli/run.rs index c309f39a1..9d153d261 100644 --- a/src/cli/run.rs +++ b/src/cli/run.rs @@ -11,7 +11,6 @@ use itertools::Itertools; use miette::{miette, Context, Diagnostic, IntoDiagnostic}; use rattler_conda_types::Platform; -use crate::activation::get_environment_variables; use crate::environment::verify_prefix_location_unchanged; use crate::project::errors::UnsupportedPlatformError; use crate::task::{ @@ -49,6 +48,9 @@ pub struct Args { #[clap(flatten)] pub config: ConfigCli, + + #[arg(long)] + pub isolated: bool, } /// CLI entry point for `pixi run` @@ -110,7 +112,8 @@ pub async fn execute(args: Args) -> miette::Result<()> { ) .with_disambiguate_fn(disambiguate_task_interactive); - let task_graph = TaskGraph::from_cmd_args(&project, &search_environment, task_args)?; + let task_graph = + TaskGraph::from_cmd_args(&project, &search_environment, task_args, args.isolated)?; tracing::info!("Task graph: {}", task_graph); @@ -171,8 +174,12 @@ pub async fn execute(args: Args) -> miette::Result<()> { let task_env: &_ = match task_envs.entry(executable_task.run_environment.clone()) { Entry::Occupied(env) => env.into_mut(), Entry::Vacant(entry) => { - let command_env = - get_task_env(&mut lock_file, &executable_task.run_environment).await?; + let command_env = get_task_env( + &mut lock_file, + &executable_task.run_environment, + args.isolated || executable_task.task().is_isolated(), + ) + .await?; entry.insert(command_env) } }; @@ -235,6 +242,7 @@ fn command_not_found<'p>(project: &'p Project, explicit_environment: Option( lock_file_derived_data: &mut LockFileDerivedData<'p>, environment: &Environment<'p>, + isolated: bool, ) -> miette::Result> { // Make sure the system requirements are met verify_current_platform_has_required_virtual_packages(environment).into_diagnostic()?; @@ -244,19 +252,17 @@ pub async fn get_task_env<'p>( // Get environment variables from the activation let activation_env = await_in_progress("activating environment", |_| { - crate::activation::run_activation(environment) + crate::activation::run_activation(environment, isolated) }) .await .wrap_err("failed to activate environment")?; - // Get environments from pixi - let environment_variables = get_environment_variables(environment); + if isolated { + return Ok(activation_env); + } // Concatenate with the system environment variables - Ok(std::env::vars() - .chain(activation_env) - .chain(environment_variables) - .collect()) + Ok(std::env::vars().chain(activation_env).collect()) } #[derive(Debug, Error, Diagnostic)] diff --git a/src/cli/shell_hook.rs b/src/cli/shell_hook.rs index 899d40847..73d4873be 100644 --- a/src/cli/shell_hook.rs +++ b/src/cli/shell_hook.rs @@ -82,7 +82,10 @@ async fn generate_activation_script( /// Generates a JSON object describing the changes to the shell environment when activating /// the provided pixi environment. async fn generate_environment_json(environment: &Environment<'_>) -> miette::Result { - let environment_variables = environment.project().get_env_variables(environment).await?; + let environment_variables = environment + .project() + .get_env_variables(environment, false) + .await?; let shell_env = ShellEnv { environment_variables, }; diff --git a/src/cli/task.rs b/src/cli/task.rs index 9fc438bc8..2bded5dbe 100644 --- a/src/cli/task.rs +++ b/src/cli/task.rs @@ -78,6 +78,10 @@ pub struct AddArgs { /// The environment variable to set, use --env key=value multiple times for more than one variable #[arg(long, value_parser = parse_key_val)] pub env: Vec<(String, String)>, + + /// Isolate the task from the shell environment, and only use the pixi environment to run the task + #[arg(long)] + pub isolated: bool, } /// Parse a single key-value pair @@ -139,6 +143,7 @@ impl From for Task { } else if depends_on.is_empty() && value.cwd.is_none() && value.env.is_empty() { Self::Plain(cmd_args) } else { + let isolated = value.isolated; let cwd = value.cwd; let env = if value.env.is_empty() { None @@ -156,6 +161,7 @@ impl From for Task { outputs: None, cwd, env, + isolated, }) } } diff --git a/src/lock_file/update.rs b/src/lock_file/update.rs index 7d6961f3b..7664416db 100644 --- a/src/lock_file/update.rs +++ b/src/lock_file/update.rs @@ -121,7 +121,10 @@ impl<'p> LockFileDerivedData<'p> { Some(context) => context.clone(), }; - let env_variables = environment.project().get_env_variables(environment).await?; + let env_variables = environment + .project() + .get_env_variables(environment, false) + .await?; // Update the prefix with Pypi records environment::update_prefix_pypi( environment.name(), @@ -773,7 +776,7 @@ pub async fn ensure_up_to_date_lock_file( }; // Get environment variables from the activation - let env_variables = project.get_env_variables(&environment).await?; + let env_variables = project.get_env_variables(&environment, false).await?; // Get the previously locked pypi records let locked_pypi_records = Arc::new( diff --git a/src/project/mod.rs b/src/project/mod.rs index c848ef0f1..67c49a363 100644 --- a/src/project/mod.rs +++ b/src/project/mod.rs @@ -498,6 +498,7 @@ impl Project { pub async fn get_env_variables( &self, environment: &Environment<'_>, + isolated: bool, ) -> miette::Result<&HashMap> { let cell = self.env_vars.get(environment.name()).ok_or_else(|| { miette::miette!( @@ -507,7 +508,7 @@ impl Project { })?; cell.get_or_try_init::(async { - let activation_env = run_activation(environment).await?; + let activation_env = run_activation(environment, isolated).await?; let environment_variables = get_environment_variables(environment); diff --git a/src/task/mod.rs b/src/task/mod.rs index 2d42f2d2f..ce5e38d70 100644 --- a/src/task/mod.rs +++ b/src/task/mod.rs @@ -154,6 +154,16 @@ impl Task { pub fn is_custom(&self) -> bool { matches!(self, Task::Custom(_)) } + + /// True if this task is isolated. + pub fn is_isolated(&self) -> bool { + match self { + Task::Plain(_) => false, + Task::Custom(custom) => custom.isolated, + Task::Execute(execute) => execute.isolated, + Task::Alias(_) => false, + } + } } /// A command script executes a single command from the environment @@ -182,6 +192,10 @@ pub struct Execute { /// A list of environment variables to set before running the command pub env: Option>, + + /// Isolate the task from the running machine + #[serde(default)] + pub isolated: bool, } impl From for Task { @@ -199,6 +213,9 @@ pub struct Custom { /// The working directory for the command relative to the root of the project. pub cwd: Option, + + /// Isolate the task from the running machine + pub isolated: bool, } impl From for Task { fn from(value: Custom) -> Self { diff --git a/src/task/task_graph.rs b/src/task/task_graph.rs index 38b9fa53b..793e27247 100644 --- a/src/task/task_graph.rs +++ b/src/task/task_graph.rs @@ -118,6 +118,7 @@ impl<'p> TaskGraph<'p> { project: &'p Project, search_envs: &SearchEnvironments<'p, D>, args: Vec, + isolated: bool, ) -> Result { let mut args = args; @@ -164,6 +165,7 @@ impl<'p> TaskGraph<'p> { Custom { cmd: CmdArgs::from(args), cwd: env::current_dir().ok(), + isolated, } .into(), ), @@ -318,6 +320,7 @@ mod test { &project, &search_envs, run_args.iter().map(|arg| arg.to_string()).collect(), + false, ) .unwrap(); diff --git a/tests/install_tests.rs b/tests/install_tests.rs index b4c064472..d4b9603b7 100644 --- a/tests/install_tests.rs +++ b/tests/install_tests.rs @@ -428,7 +428,6 @@ async fn test_installer_name() { .with_install(true) .await .unwrap(); - dbg!(pixi.default_env_path().unwrap()); // Get the correct dist-info folder let dist_info = if cfg!(not(target_os = "windows")) { From 29b011114fdae8f942d87ff4ccc099a34977627f Mon Sep 17 00:00:00 2001 From: "Ruben Arts(win)" Date: Thu, 16 May 2024 17:28:25 +0200 Subject: [PATCH 02/20] fix: isolate on windows --- pixi.toml | 2 +- src/activation.rs | 67 +++++++++++++++++++++++++++++++++++++++++++++++ src/cli/run.rs | 6 +++++ 3 files changed, 74 insertions(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index e1c9953fa..92814f322 100644 --- a/pixi.toml +++ b/pixi.toml @@ -41,7 +41,7 @@ compilers = ">=1.6.0" platforms = ["linux-64"] [feature.isolated.tasks] -install = { cmd = "cargo install --path . --locked", isolated = true} +##install = { cmd = "cargo install --path . --locked", isolated = true} [feature.isolated.dependencies] cmake = ">=3.29.3,<3.30" diff --git a/src/activation.rs b/src/activation.rs index 9929313c5..4c2e321d3 100644 --- a/src/activation.rs +++ b/src/activation.rs @@ -216,6 +216,67 @@ pub fn get_environment_variables<'p>(environment: &'p Environment<'p>) -> HashMa .collect() } +pub fn get_windows_isolated_environment_variables() -> HashMap { + let env = std::env::vars().collect::>(); + let default_keys = vec![ + "APPDATA", + "COMPUTERNAME", + "COMSPEC", + "COMMONPROGRAMFILES", + "COMMONPROGRAMFILES(X86)", + "COMMONPROGRAMW6432", + "DRIVERDATA", + "HOMEDRIVE", + "HOMEPATH", + "LOGONSERVER", + "NUMBER_OF_PROCESSORS", + "OS", + "PATHEXT", + "PROCESSOR_ARCHITECTURE", + "PROCESSOR_IDENTIFIER", + "PROCESSOR_LEVEL", + "PROCESSOR_REVISION", + "PROMPT_COMMAND", + "PROMPT_COMMAND_RIGHT", + "PROMPT_INDICATOR", + "PROMPT_INDICATOR_VI_INSERT", + "PROMPT_INDICATOR_VI_NORMAL", + "PROMPT_MULTILINE_INDICATOR", + "PWD", + "SESSIONNAME", + "SYSTEMDRIVE", + "SYSTEMROOT", + "TEMP", + "TMP", + "TERMINAL_EMULATOR", + "USERNAME", + "USERPROFILE", + "USERDOMAIN_ROAMINGPROFILE", + "USERDOMAIN", + "windir", + ]; + + let path = env + .get("Path") + .map(|path| { + let path = path.split(';').collect::>(); + let path = path + .iter() + .filter(|p| p.to_lowercase().contains(":\\windows")) + .join(";"); + path + }) + .expect("Could not find PATH in environment variables"); + + let env = env + .into_iter() + .filter(|(key, _)| default_keys.contains(&key.as_str())) + .chain(vec![("PATH".to_string(), path)]) + .collect(); + + env +} + /// Determine the environment variables that need to be set in an interactive shell to make it /// function as if the environment has been activated. This method runs the activation scripts from /// the environment and stores the environment variables it added, finally it adds environment @@ -295,4 +356,10 @@ mod tests { &project.version().as_ref().unwrap().to_string() ); } + + #[test] + fn test_get_windows_isolated_environment_variables() { + let env = get_windows_isolated_environment_variables(); + dbg!(env); + } } diff --git a/src/cli/run.rs b/src/cli/run.rs index 9d153d261..c109c366c 100644 --- a/src/cli/run.rs +++ b/src/cli/run.rs @@ -19,6 +19,7 @@ use crate::task::{ }; use crate::Project; +use crate::activation::get_windows_isolated_environment_variables; use crate::lock_file::LockFileDerivedData; use crate::lock_file::UpdateLockFileOptions; use crate::progress::await_in_progress; @@ -258,6 +259,11 @@ pub async fn get_task_env<'p>( .wrap_err("failed to activate environment")?; if isolated { + if cfg!(windows) { + let mut win_env = get_windows_isolated_environment_variables(); + win_env.extend(activation_env); + return Ok(win_env); + } return Ok(activation_env); } From 0f58648cc049a2f23e41a14dc463d7e1cc32bbbd Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Fri, 24 May 2024 10:37:47 +0200 Subject: [PATCH 03/20] misc: rename to `isolated` to `clean-env` --- docs/reference/cli.md | 6 +++++- src/activation.rs | 10 +++++----- src/cli/run.rs | 19 +++++++++++-------- src/cli/task.rs | 6 +++--- src/lock_file/update.rs | 1 - src/project/mod.rs | 4 ++-- src/task/mod.rs | 14 +++++++------- src/task/task_graph.rs | 4 ++-- 8 files changed, 35 insertions(+), 29 deletions(-) diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 774ad7067..4072a7cd4 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -150,7 +150,7 @@ You cannot run `pixi run source setup.bash` as `source` is not available in the - `--frozen`: install the environment as defined in the lock file, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--environment (-e)`: The environment to run the task in, if none are provided the default environment will be used or a selector will be given to select the right environment. - +- `--clean-env`: Run the task in a clean environment, this will remove all environment variables of the shell environment except for the ones pixi sets. ```shell pixi run python pixi run cowpy "Hey pixi user" @@ -164,6 +164,10 @@ pixi run task argument1 argument2 # If you have multiple environments you can select the right one with the --environment flag. pixi run --environment cuda python + +# If you want to run a command in a clean environment you can use the --clean-env flag. +# The PATH should only contain the pixi environment here. +pixi run --clean-env "echo \$PATH" ``` !!! info diff --git a/src/activation.rs b/src/activation.rs index 4c2e321d3..b1e16bd29 100644 --- a/src/activation.rs +++ b/src/activation.rs @@ -130,7 +130,7 @@ pub fn get_activator<'p>( /// Runs and caches the activation script. pub async fn run_activation( environment: &Environment<'_>, - isolated: bool, + clean_env: bool, ) -> miette::Result> { let activator = get_activator(environment, ShellEnum::default()).map_err(|e| { miette::miette!(format!( @@ -140,7 +140,7 @@ pub async fn run_activation( )) })?; - let path_modification_behavior = if isolated { + let path_modification_behavior = if clean_env { PathModificationBehavior::Replace } else { PathModificationBehavior::Prepend @@ -216,7 +216,7 @@ pub fn get_environment_variables<'p>(environment: &'p Environment<'p>) -> HashMa .collect() } -pub fn get_windows_isolated_environment_variables() -> HashMap { +pub fn get_windows_clean_environment_variables() -> HashMap { let env = std::env::vars().collect::>(); let default_keys = vec![ "APPDATA", @@ -358,8 +358,8 @@ mod tests { } #[test] - fn test_get_windows_isolated_environment_variables() { - let env = get_windows_isolated_environment_variables(); + fn test_get_windows_clean_environment_variables() { + let env = get_windows_clean_environment_variables(); dbg!(env); } } diff --git a/src/cli/run.rs b/src/cli/run.rs index 527515bbc..4183e6c17 100644 --- a/src/cli/run.rs +++ b/src/cli/run.rs @@ -19,7 +19,7 @@ use crate::task::{ }; use crate::Project; -use crate::activation::get_windows_isolated_environment_variables; +use crate::activation::get_windows_clean_environment_variables; use crate::lock_file::LockFileDerivedData; use crate::lock_file::UpdateLockFileOptions; use crate::progress::await_in_progress; @@ -51,8 +51,11 @@ pub struct Args { #[clap(flatten)] pub config: ConfigCli, + /// Use a clean environment to run the task + /// + /// Using this flag will ignore your current shell environment and use bare minimum environment to activate the pixi environment in. #[arg(long)] - pub isolated: bool, + pub clean_env: bool, } /// CLI entry point for `pixi run` @@ -115,7 +118,7 @@ pub async fn execute(args: Args) -> miette::Result<()> { .with_disambiguate_fn(disambiguate_task_interactive); let task_graph = - TaskGraph::from_cmd_args(&project, &search_environment, task_args, args.isolated)?; + TaskGraph::from_cmd_args(&project, &search_environment, task_args, args.clean_env)?; tracing::info!("Task graph: {}", task_graph); @@ -179,7 +182,7 @@ pub async fn execute(args: Args) -> miette::Result<()> { let command_env = get_task_env( &mut lock_file, &executable_task.run_environment, - args.isolated || executable_task.task().is_isolated(), + args.clean_env || executable_task.task().clean_env(), ) .await?; entry.insert(command_env) @@ -244,7 +247,7 @@ fn command_not_found<'p>(project: &'p Project, explicit_environment: Option( lock_file_derived_data: &mut LockFileDerivedData<'p>, environment: &Environment<'p>, - isolated: bool, + clean_env: bool, ) -> miette::Result> { // Make sure the system requirements are met verify_current_platform_has_required_virtual_packages(environment).into_diagnostic()?; @@ -254,14 +257,14 @@ pub async fn get_task_env<'p>( // Get environment variables from the activation let activation_env = await_in_progress("activating environment", |_| { - crate::activation::run_activation(environment, isolated) + crate::activation::run_activation(environment, clean_env) }) .await .wrap_err("failed to activate environment")?; - if isolated { + if clean_env { if cfg!(windows) { - let mut win_env = get_windows_isolated_environment_variables(); + let mut win_env = get_windows_clean_environment_variables(); win_env.extend(activation_env); return Ok(win_env); } diff --git a/src/cli/task.rs b/src/cli/task.rs index 98e1e2a75..189902e8f 100644 --- a/src/cli/task.rs +++ b/src/cli/task.rs @@ -81,7 +81,7 @@ pub struct AddArgs { /// Isolate the task from the shell environment, and only use the pixi environment to run the task #[arg(long)] - pub isolated: bool, + pub clean_env: bool, } /// Parse a single key-value pair @@ -143,7 +143,7 @@ impl From for Task { } else if depends_on.is_empty() && value.cwd.is_none() && value.env.is_empty() { Self::Plain(cmd_args) } else { - let isolated = value.isolated; + let clean_env = value.clean_env; let cwd = value.cwd; let env = if value.env.is_empty() { None @@ -161,7 +161,7 @@ impl From for Task { outputs: None, cwd, env, - isolated, + clean_env, }) } } diff --git a/src/lock_file/update.rs b/src/lock_file/update.rs index 78a51e761..b7354e5da 100644 --- a/src/lock_file/update.rs +++ b/src/lock_file/update.rs @@ -938,7 +938,6 @@ impl<'p> UpdateContext<'p> { continue; } - // Construct a future that will resolve when we have the repodata available let repodata_future = self .get_latest_group_repodata_records(&group, platform) diff --git a/src/project/mod.rs b/src/project/mod.rs index 80165abe9..1826b0823 100644 --- a/src/project/mod.rs +++ b/src/project/mod.rs @@ -419,7 +419,7 @@ impl Project { pub async fn get_env_variables( &self, environment: &Environment<'_>, - isolated: bool, + clean_env: bool, ) -> miette::Result<&HashMap> { let cell = self.env_vars.get(environment.name()).ok_or_else(|| { miette::miette!( @@ -429,7 +429,7 @@ impl Project { })?; cell.get_or_try_init::(async { - let activation_env = run_activation(environment, isolated).await?; + let activation_env = run_activation(environment, clean_env).await?; let environment_variables = get_environment_variables(environment); diff --git a/src/task/mod.rs b/src/task/mod.rs index ce5e38d70..c9f5bf209 100644 --- a/src/task/mod.rs +++ b/src/task/mod.rs @@ -155,12 +155,12 @@ impl Task { matches!(self, Task::Custom(_)) } - /// True if this task is isolated. - pub fn is_isolated(&self) -> bool { + /// True if this task is meant to run in a clean environment, stripped of all non required variables. + pub fn clean_env(&self) -> bool { match self { Task::Plain(_) => false, - Task::Custom(custom) => custom.isolated, - Task::Execute(execute) => execute.isolated, + Task::Custom(custom) => custom.clean_env, + Task::Execute(execute) => execute.clean_env, Task::Alias(_) => false, } } @@ -169,7 +169,7 @@ impl Task { /// A command script executes a single command from the environment #[serde_as] #[derive(Debug, Clone, Deserialize)] -#[serde(deny_unknown_fields)] +#[serde(deny_unknown_fields, rename_all = "kebab-case")] pub struct Execute { /// A list of arguments, the first argument denotes the command to run. When deserializing both /// an array of strings and a single string are supported. @@ -195,7 +195,7 @@ pub struct Execute { /// Isolate the task from the running machine #[serde(default)] - pub isolated: bool, + pub clean_env: bool, } impl From for Task { @@ -215,7 +215,7 @@ pub struct Custom { pub cwd: Option, /// Isolate the task from the running machine - pub isolated: bool, + pub clean_env: bool, } impl From for Task { fn from(value: Custom) -> Self { diff --git a/src/task/task_graph.rs b/src/task/task_graph.rs index 793e27247..b1432ce84 100644 --- a/src/task/task_graph.rs +++ b/src/task/task_graph.rs @@ -118,7 +118,7 @@ impl<'p> TaskGraph<'p> { project: &'p Project, search_envs: &SearchEnvironments<'p, D>, args: Vec, - isolated: bool, + clean_env: bool, ) -> Result { let mut args = args; @@ -165,7 +165,7 @@ impl<'p> TaskGraph<'p> { Custom { cmd: CmdArgs::from(args), cwd: env::current_dir().ok(), - isolated, + clean_env, } .into(), ), From 98b29f1f91f8953e899e1a163c357a9b1d35cdfb Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Fri, 24 May 2024 10:38:15 +0200 Subject: [PATCH 04/20] misc: add clean env to pixi.toml --- pixi.lock | 397 +++++++++++++++++++++++++++++++----------------------- pixi.toml | 12 +- 2 files changed, 235 insertions(+), 174 deletions(-) diff --git a/pixi.lock b/pixi.lock index 31162aeb0..9a0285692 100644 --- a/pixi.lock +++ b/pixi.lock @@ -1,5 +1,127 @@ version: 5 environments: + clean: + channels: + - url: https://conda.anaconda.org/conda-forge/ + packages: + linux-64: + - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/attrs-23.2.0-pyh71513ae_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/binutils-2.40-h4852527_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/binutils_impl_linux-64-2.40-ha885e6a_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/binutils_linux-64-2.40-hdade7a5_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/brotli-python-1.1.0-py312h30efb56_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-hd590300_5.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.28.1-hd590300_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/c-compiler-1.7.0-hd590300_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.2.2-hbcca054_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/certifi-2024.2.2-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/cffconvert-2.0.0-pyhd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/cffi-1.16.0-py312hf06ca03_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/cfgv-3.3.1-pyhd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.3.2-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/cli-ui-0.17.2-pyhd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/click-8.1.7-unix_pyh707e725_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/cmake-3.29.3-h91dbaaa_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/compilers-1.7.0-ha770c72_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/contextlib2-21.6.0-pyhd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/coreutils-9.5-hd590300_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/curl-8.8.0-he654da7_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/cxx-compiler-1.7.0-h00ab1b0_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.3.8-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/docopt-0.6.2-py_1.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/filelock-3.14.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/findutils-4.6.0-h166bdaf_1001.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/fortran-compiler-1.7.0-heb67821_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc-12.3.0-h915e2ae_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc_impl_linux-64-12.3.0-h58ffeeb_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc_linux-64-12.3.0-h6477408_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gettext-0.22.5-h59595ed_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gettext-tools-0.22.5-h59595ed_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran-12.3.0-h915e2ae_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran_impl_linux-64-12.3.0-h1645026_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran_linux-64-12.3.0-h617cb40_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/git-2.42.0-pl5321h86e50cf_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/grep-3.11-h3cbd922_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx-12.3.0-h915e2ae_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_impl_linux-64-12.3.0-h2a574ab_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_linux-64-12.3.0-h4a1b8e8_3.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/identify-2.5.36-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/idna-3.7-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-7.1.0-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/jsonschema-3.2.0-pyhd8ed1ab_3.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/kernel-headers_linux-64-2.6.32-he073ed8_17.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/keyutils-1.6.1-h166bdaf_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/krb5-1.21.2-h659d440_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.40-h55db66e_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libasprintf-0.22.5-h661eb56_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libasprintf-devel-0.22.5-h661eb56_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libcurl-8.8.0-hca28451_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20191231-he28a2e2_2.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-hd590300_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.6.2-h59595ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/libgcc-devel_linux-64-12.3.0-h0223996_107.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-13.2.0-h77fa898_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgettextpo-0.22.5-h59595ed_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgettextpo-devel-0.22.5-h59595ed_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-13.2.0-hca663fb_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-13.2.0-h77fa898_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libiconv-1.17-hd590300_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.58.0-h47da74e_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.1-hd590300_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libsanitizer-12.3.0-hb8811af_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.45.3-h2797004_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.11.0-h0841786_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/libstdcxx-devel_linux-64-12.3.0-h0223996_107.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-13.2.0-hc0a3c3a_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libuv-1.48.0-hd590300_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-hd590300_5.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/make-4.3-hd18ef5c_1.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h59595ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/nodeenv-1.8.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.0-h4ab18f5_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.40-hc3806b6_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/perl-5.32.1-7_hd590300_perl5.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pkg-config-0.29.2-h36c2ea0_1008.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.3.3-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pycparser-2.22-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pykwalify-1.8.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pyrsistent-0.20.0-py312h98912ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyha2e5f31_6.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.12.3-hab00c5b_0_cpython.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.9.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/python_abi-3.12-4_cp312.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pyyaml-6.0.1-py312h98912ed_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8228510_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/requests-2.32.2-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/rhash-1.4.4-hd590300_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml-0.18.6-py312h98912ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml.clib-0.2.8-py312h98912ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/rust-1.77.2-h70c747d_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/rust-std-x86_64-unknown-linux-gnu-1.77.2-h2c6d0dc_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/schema-0.7.7-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/setuptools-70.0.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/six-1.16.0-pyh6c4a22f_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/sysroot_linux-64-2.12-he073ed8_17.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tabulate-0.9.0-pyhd8ed1ab_1.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/tbump-6.9.0-pyhd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tomlkit-0.12.5-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ukkonen-1.0.1-py312h8572e83_4.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/unidecode-1.3.8-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/urllib3-2.2.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/virtualenv-20.26.2-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/yaml-0.2.5-h7f98852_2.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.6-ha6fb4c9_0.conda default: channels: - url: https://conda.anaconda.org/conda-forge/ @@ -796,128 +918,6 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/zlib-1.2.13-hcfcfb64_5.conda - conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.5-h12be248_0.conda - isolated: - channels: - - url: https://conda.anaconda.org/conda-forge/ - packages: - linux-64: - - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/noarch/attrs-23.2.0-pyh71513ae_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/binutils-2.40-h4852527_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/binutils_impl_linux-64-2.40-ha885e6a_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/binutils_linux-64-2.40-hdade7a5_3.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/brotli-python-1.1.0-py312h30efb56_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-hd590300_5.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.28.1-hd590300_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/c-compiler-1.7.0-hd590300_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.2.2-hbcca054_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/certifi-2024.2.2-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/cffconvert-2.0.0-pyhd8ed1ab_0.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/cffi-1.16.0-py312hf06ca03_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/cfgv-3.3.1-pyhd8ed1ab_0.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.3.2-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/cli-ui-0.17.2-pyhd8ed1ab_0.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/noarch/click-8.1.7-unix_pyh707e725_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/cmake-3.29.3-h91dbaaa_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/compilers-1.7.0-ha770c72_1.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/contextlib2-21.6.0-pyhd8ed1ab_0.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/coreutils-9.5-hd590300_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/curl-8.7.1-hca28451_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/cxx-compiler-1.7.0-h00ab1b0_1.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.3.8-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/docopt-0.6.2-py_1.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/noarch/filelock-3.14.0-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/findutils-4.6.0-h166bdaf_1001.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/fortran-compiler-1.7.0-heb67821_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc-12.3.0-h915e2ae_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc_impl_linux-64-12.3.0-h58ffeeb_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc_linux-64-12.3.0-h6477408_3.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/gettext-0.22.5-h59595ed_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/gettext-tools-0.22.5-h59595ed_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran-12.3.0-h915e2ae_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran_impl_linux-64-12.3.0-h1645026_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran_linux-64-12.3.0-h617cb40_3.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/git-2.42.0-pl5321h86e50cf_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/grep-3.11-h3cbd922_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx-12.3.0-h915e2ae_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_impl_linux-64-12.3.0-h2a574ab_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_linux-64-12.3.0-h4a1b8e8_3.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/identify-2.5.36-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/idna-3.7-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-7.1.0-pyha770c72_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/jsonschema-3.2.0-pyhd8ed1ab_3.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/noarch/kernel-headers_linux-64-2.6.32-he073ed8_17.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/keyutils-1.6.1-h166bdaf_0.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/krb5-1.21.2-h659d440_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.40-h55db66e_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libasprintf-0.22.5-h661eb56_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libasprintf-devel-0.22.5-h661eb56_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libcurl-8.7.1-hca28451_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20191231-he28a2e2_2.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-hd590300_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.6.2-h59595ed_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/noarch/libgcc-devel_linux-64-12.3.0-h0223996_107.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-13.2.0-h77fa898_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgettextpo-0.22.5-h59595ed_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgettextpo-devel-0.22.5-h59595ed_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-13.2.0-hca663fb_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-13.2.0-h77fa898_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libiconv-1.17-hd590300_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.58.0-h47da74e_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.1-hd590300_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libsanitizer-12.3.0-hb8811af_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.45.3-h2797004_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.11.0-h0841786_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/libstdcxx-devel_linux-64-12.3.0-h0223996_107.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-13.2.0-hc0a3c3a_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libuv-1.48.0-hd590300_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-hd590300_5.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/make-4.3-hd18ef5c_1.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h59595ed_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/nodeenv-1.8.0-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.0-hd590300_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.40-hc3806b6_0.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/perl-5.32.1-7_hd590300_perl5.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/pkg-config-0.29.2-h36c2ea0_1008.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.1-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.3.3-pyha770c72_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/pycparser-2.22-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/pykwalify-1.8.0-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/pyrsistent-0.20.0-py312h98912ed_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyha2e5f31_6.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.12.3-hab00c5b_0_cpython.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.9.0-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/python_abi-3.12-4_cp312.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/pyyaml-6.0.1-py312h98912ed_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8228510_1.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/requests-2.31.0-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/rhash-1.4.4-hd590300_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml-0.18.6-py312h98912ed_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml.clib-0.2.8-py312h98912ed_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/rust-1.77.2-h70c747d_1.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/rust-std-x86_64-unknown-linux-gnu-1.77.2-h2c6d0dc_1.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/schema-0.7.7-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/setuptools-69.5.1-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/six-1.16.0-pyh6c4a22f_0.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/noarch/sysroot_linux-64-2.12-he073ed8_17.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/tabulate-0.9.0-pyhd8ed1ab_1.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/noarch/tbump-6.9.0-pyhd8ed1ab_0.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/tomlkit-0.12.5-pyha770c72_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/ukkonen-1.0.1-py312h8572e83_4.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/unidecode-1.3.8-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/urllib3-2.2.1-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/virtualenv-20.26.2-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/yaml-0.2.5-h7f98852_2.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.6-ha6fb4c9_0.conda schema: channels: - url: https://conda.anaconda.org/conda-forge/ @@ -1465,22 +1465,6 @@ packages: license_family: MIT size: 168875 timestamp: 1711819445938 -- kind: conda - name: c-compiler - version: 1.7.0 - build: hd590300_1 - build_number: 1 - subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/c-compiler-1.7.0-hd590300_1.conda - sha256: 4213b6cbaed673c07f8b79c089f3487afdd56de944f21c4861ead862b7657eb4 - md5: e9dffe1056994133616378309f932d77 - depends: - - binutils - - gcc - - gcc_linux-64 12.* - license: BSD-3-Clause - size: 6324 - timestamp: 1714575511013 - kind: conda name: c-compiler version: 1.7.0 @@ -2099,21 +2083,25 @@ packages: size: 164864 timestamp: 1711548139831 - kind: conda - name: cxx-compiler - version: 1.7.0 - build: h00ab1b0_1 - build_number: 1 + name: curl + version: 8.8.0 + build: he654da7_0 subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/cxx-compiler-1.7.0-h00ab1b0_1.conda - sha256: cf895938292cfd4cfa2a06c6d57aa25c33cc974d4ffe52e704ffb67f5577b93f - md5: 28de2e073db9ca9b72858bee9fb6f571 + url: https://conda.anaconda.org/conda-forge/linux-64/curl-8.8.0-he654da7_0.conda + sha256: 6b44eb191a679ebf3f5b7092970cdc7df0f13ba9f1f891f45f70510b051dece9 + md5: 042341d8b9ba4ee7f2722b81fae9f0ad depends: - - c-compiler 1.7.0 hd590300_1 - - gxx - - gxx_linux-64 12.* - license: BSD-3-Clause - size: 6283 - timestamp: 1714575513327 + - krb5 >=1.21.2,<1.22.0a0 + - libcurl 8.8.0 hca28451_0 + - libgcc-ng >=12 + - libssh2 >=1.11.0,<2.0a0 + - libzlib >=1.2.13,<1.3.0a0 + - openssl >=3.3.0,<4.0a0 + - zstd >=1.5.6,<1.6.0a0 + license: curl + license_family: MIT + size: 166948 + timestamp: 1716378571585 - kind: conda name: cxx-compiler version: 1.7.0 @@ -2435,23 +2423,6 @@ packages: license_family: BSD size: 4102 timestamp: 1566932280397 -- kind: conda - name: fortran-compiler - version: 1.7.0 - build: heb67821_1 - build_number: 1 - subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/fortran-compiler-1.7.0-heb67821_1.conda - sha256: 4293677cdf4c54d13659a3f9ac15cae778310811c62add29bb2e70630756317a - md5: cf4b0e7c4c78bb0662aed9b27c414a3c - depends: - - binutils - - c-compiler 1.7.0 hd590300_1 - - gfortran - - gfortran_linux-64 12.* - license: BSD-3-Clause - size: 6300 - timestamp: 1714575515211 - kind: conda name: fortran-compiler version: 1.7.0 @@ -3559,6 +3530,26 @@ packages: license_family: MIT size: 398293 timestamp: 1711548114077 +- kind: conda + name: libcurl + version: 8.8.0 + build: hca28451_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libcurl-8.8.0-hca28451_0.conda + sha256: 45aec0ffc6fe3fd4c0083b815aa102b8103380acc2b6714fb272d921acc68ab2 + md5: f21c27f076a07907e70c49bb57bd0f20 + depends: + - krb5 >=1.21.2,<1.22.0a0 + - libgcc-ng >=12 + - libnghttp2 >=1.58.0,<2.0a0 + - libssh2 >=1.11.0,<2.0a0 + - libzlib >=1.2.13,<1.3.0a0 + - openssl >=3.3.0,<4.0a0 + - zstd >=1.5.6,<1.6.0a0 + license: curl + license_family: MIT + size: 405535 + timestamp: 1716378550673 - kind: conda name: libcxx version: 16.0.6 @@ -5479,6 +5470,24 @@ packages: license_family: Apache size: 2888226 timestamp: 1714466346030 +- kind: conda + name: openssl + version: 3.3.0 + build: h4ab18f5_3 + build_number: 3 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.0-h4ab18f5_3.conda + sha256: 33dcea0ed3a61b2de6b66661cdd55278640eb99d676cd129fbff3e53641fa125 + md5: 12ea6d0d4ed54530eaed18e4835c1f7c + depends: + - ca-certificates + - libgcc-ng >=12 + constrains: + - pyopenssl >=22.1 + license: Apache-2.0 + license_family: Apache + size: 2891147 + timestamp: 1716468354865 - kind: conda name: openssl version: 3.3.0 @@ -5929,6 +5938,21 @@ packages: license_family: MIT size: 20248 timestamp: 1713912912262 +- kind: conda + name: platformdirs + version: 4.2.2 + build: pyhd8ed1ab_0 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda + sha256: adc59384cf0b2fc6dc7362840151e8cb076349197a38f7230278252698a88442 + md5: 6f6cf28bf8e021933869bae3f84b8fc9 + depends: + - python >=3.8 + license: MIT + license_family: MIT + size: 20572 + timestamp: 1715777739019 - kind: conda name: pluggy version: 1.5.0 @@ -6985,6 +7009,27 @@ packages: license_family: APACHE size: 56690 timestamp: 1684774408600 +- kind: conda + name: requests + version: 2.32.2 + build: pyhd8ed1ab_0 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/requests-2.32.2-pyhd8ed1ab_0.conda + sha256: 115b796fddc846bee6f47e3c57d04d12fa93a47a7a8ef639cefdc05203c1bf00 + md5: e1643b34b19df8c028a4f00bf5df58a6 + depends: + - certifi >=2017.4.17 + - charset-normalizer >=2,<4 + - idna >=2.5,<4 + - python >=3.7 + - urllib3 >=1.21.1,<3 + constrains: + - chardet >=3.0.2,<6 + license: Apache-2.0 + license_family: APACHE + size: 57885 + timestamp: 1716354575895 - kind: conda name: rhash version: 1.4.4 @@ -7344,6 +7389,21 @@ packages: license_family: MIT size: 501790 timestamp: 1713094963112 +- kind: conda + name: setuptools + version: 70.0.0 + build: pyhd8ed1ab_0 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/setuptools-70.0.0-pyhd8ed1ab_0.conda + sha256: daa4638d288cfdf3b0ecea395d8efa25cafc4ebf4026464a36c797c84541d2be + md5: c8ddb4f34a208df4dd42509a0f6a1c89 + depends: + - python >=3.8 + license: MIT + license_family: MIT + size: 483015 + timestamp: 1716368141661 - kind: conda name: six version: 1.16.0 @@ -7842,6 +7902,7 @@ packages: - platformdirs <5,>=3.9.1 - python >=3.8 license: MIT + license_family: MIT size: 3458445 timestamp: 1715681264937 - kind: conda diff --git a/pixi.toml b/pixi.toml index 92814f322..a14e922ca 100644 --- a/pixi.toml +++ b/pixi.toml @@ -37,13 +37,13 @@ tbump = ">=6.9.0,<6.10" [target.linux-64.dependencies] compilers = ">=1.6.0" -[feature.isolated] +[feature.clean-env] platforms = ["linux-64"] -[feature.isolated.tasks] -##install = { cmd = "cargo install --path . --locked", isolated = true} +[feature.clean-env.tasks] +##install = { cmd = "cargo install --path . --locked", clean-env = true} -[feature.isolated.dependencies] +[feature.clean-env.dependencies] cmake = ">=3.29.3,<3.30" make = ">=4.3,<5" coreutils = ">=9.5,<10" @@ -69,7 +69,7 @@ mike-serve = "mike serve" [feature.schema.tasks] generate-schema = { cmd = "python model.py > schema.json", cwd = "schema" } # Using deprecated `depends_on` to avoid conflicts in ci. Changes after release. -test-schema = { cmd = "pytest -s", depends_on = "generate-schema", cwd = "schema" } +test-schema = { cmd = "pytest -s", depends-on = "generate-schema", cwd = "schema" } toml-lint = "taplo lint --verbose **/pixi.toml" toml-format = "taplo fmt **/pixi.toml" @@ -82,6 +82,6 @@ pyyaml = ">=6.0.1,<6.1" taplo = ">=0.9.1,<0.10" [environments] -isolated = { features = ["isolated"] } +clean = { features = ["clean-env"] } docs = { features = ["docs"], no-default-feature = true } schema = { features = ["schema"], no-default-feature = true } From ea108dd3fc8bb4639369ba4719bd0417acbe7f2f Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Fri, 24 May 2024 10:49:58 +0200 Subject: [PATCH 05/20] misc: update schema --- schema/examples/valid/full.toml | 3 +- schema/model.py | 5 + schema/schema.json | 1220 ------------------------------- 3 files changed, 7 insertions(+), 1221 deletions(-) diff --git a/schema/examples/valid/full.toml b/schema/examples/valid/full.toml index 15dda09fc..e0bcd1c11 100644 --- a/schema/examples/valid/full.toml +++ b/schema/examples/valid/full.toml @@ -49,7 +49,8 @@ test4 = { cmd = "pytest", cwd = "tests", depends-on = ["test2"] } test5 = { cmd = "pytest" } test6 = { depends-on = ["test5"] } test7 = { cmd = "pytest", cwd = "tests", depends-on = ["test5"], env = {PYTHONPATH = "bla", "WEIRD_STRING" = "blu"}} - +test8 = { cmd = "pytest", cwd = "tests", depends-on = ["test5"], env = {PYTHONPATH = "bla", "WEIRD_STRING" = "blu"}, clean-env = true} +test9 = { cmd = "pytest", clean-env = false} [system-requirements] linux = "5.10" libc = { family="glibc", version="2.17" } diff --git a/schema/model.py b/schema/model.py index 9f45383d0..15a8f91f6 100644 --- a/schema/model.py +++ b/schema/model.py @@ -261,6 +261,11 @@ class TaskInlineTable(StrictBaseModel): description="A map of environment variables to values, used in the task, these will be overwritten by the shell.", examples=[{"key": "value"}, {"ARGUMENT": "value"}], ) + clean_env: bool | None = Field( + None, + alias="clean-env", + description="Whether to run in a clean environment, removing all environment variables except those defined in `env` and by pixi itself.", + ) ####################### diff --git a/schema/schema.json b/schema/schema.json index f46981fc3..e69de29bb 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -1,1220 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://pixi.sh/v0.22.0/schema/manifest/schema.json", - "title": "`pixi.toml` manifest file", - "description": "The configuration for a [`pixi`](https://pixi.sh) project.", - "type": "object", - "required": [ - "project" - ], - "additionalProperties": false, - "properties": { - "$schema": { - "title": "Schema", - "description": "The schema identifier for the project's configuration", - "type": "string", - "default": "https://pixi.sh/v0.22.0/schema/manifest/schema.json", - "format": "uri-reference" - }, - "activation": { - "$ref": "#/$defs/Activation", - "description": "The scripts used on the activation of the project" - }, - "build-dependencies": { - "title": "Build-Dependencies", - "description": "The build `conda` dependencies, used in the build process", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/MatchspecTable" - } - ] - } - }, - "dependencies": { - "title": "Dependencies", - "description": "The `conda` dependencies, consisting of a package name and a requirement in [MatchSpec](https://github.com/conda/conda/blob/078e7ee79381060217e1ec7f9b0e9cf80ecc8f3f/conda/models/match_spec.py) format", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/MatchspecTable" - } - ] - } - }, - "environments": { - "title": "Environments", - "description": "The environments of the project, defined as a full object or a list of feature names.", - "type": "object", - "patternProperties": { - "^[a-z\\d\\-]+$": { - "anyOf": [ - { - "$ref": "#/$defs/Environment" - }, - { - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - } - ] - } - } - }, - "feature": { - "title": "Feature", - "description": "The features of the project", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/Feature" - } - }, - "host-dependencies": { - "title": "Host-Dependencies", - "description": "The host `conda` dependencies, used in the build process", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/MatchspecTable" - } - ] - }, - "examples": [ - { - "python": ">=3.8" - } - ] - }, - "project": { - "$ref": "#/$defs/Project", - "description": "The project's metadata information" - }, - "pypi-dependencies": { - "title": "Pypi-Dependencies", - "description": "The PyPI dependencies", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/PyPIVersion" - }, - { - "$ref": "#/$defs/PyPIGitBranchRequirement" - }, - { - "$ref": "#/$defs/PyPIGitTagRequirement" - }, - { - "$ref": "#/$defs/PyPIGitRevRequirement" - }, - { - "$ref": "#/$defs/PyPIPathRequirement" - }, - { - "$ref": "#/$defs/PyPIUrlRequirement" - } - ] - } - }, - "pypi-options": { - "$ref": "#/$defs/PyPIOptions", - "description": "Options related to PyPI indexes" - }, - "system-requirements": { - "$ref": "#/$defs/SystemRequirements", - "description": "The system requirements of the project" - }, - "target": { - "title": "Target", - "description": "The targets of the project", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/Target" - }, - "examples": [ - { - "linux": { - "dependencies": { - "python": "3.8" - } - } - } - ] - }, - "tasks": { - "title": "Tasks", - "description": "The tasks of the project", - "type": "object", - "patternProperties": { - "^[^\\s\\$]+$": { - "anyOf": [ - { - "$ref": "#/$defs/TaskInlineTable" - }, - { - "type": "string", - "minLength": 1 - } - ] - } - } - }, - "tool": { - "title": "Tool", - "description": "Third-party tool configurations, ignored by pixi", - "type": "object" - } - }, - "$defs": { - "Activation": { - "title": "Activation", - "description": "A description of steps performed when an environment is activated", - "type": "object", - "additionalProperties": false, - "properties": { - "scripts": { - "title": "Scripts", - "description": "The scripts to run when the environment is activated", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "examples": [ - "activate.sh", - "activate.bat" - ] - } - } - }, - "ChannelInlineTable": { - "title": "ChannelInlineTable", - "description": "A precise description of a `conda` channel, with an optional priority.", - "type": "object", - "required": [ - "channel" - ], - "additionalProperties": false, - "properties": { - "channel": { - "title": "Channel", - "description": "The channel the packages needs to be fetched from", - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "type": "string", - "format": "uri", - "minLength": 1 - } - ] - }, - "priority": { - "title": "Priority", - "description": "The priority of the channel", - "type": "integer" - } - } - }, - "Environment": { - "title": "Environment", - "description": "A composition of the dependencies of features which can be activated to run tasks or provide a shell", - "type": "object", - "additionalProperties": false, - "properties": { - "features": { - "title": "Features", - "description": "The features that define the environment", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - }, - "no-default-feature": { - "title": "No-Default-Feature", - "description": "Whether to add the default feature to this environment", - "type": "boolean", - "default": false - }, - "solve-group": { - "title": "Solve-Group", - "description": "The group name for environments that should be solved together", - "type": "string", - "minLength": 1 - } - } - }, - "Feature": { - "title": "Feature", - "description": "A composable aspect of the project which can contribute dependencies and tasks to an environment", - "type": "object", - "additionalProperties": false, - "properties": { - "activation": { - "$ref": "#/$defs/Activation", - "description": "The scripts used on the activation of environments using this feature" - }, - "build-dependencies": { - "title": "Build-Dependencies", - "description": "The build `conda` dependencies, used in the build process", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/MatchspecTable" - } - ] - } - }, - "channels": { - "title": "Channels", - "description": "The `conda` channels that can be considered when solving environments containing this feature", - "type": "array", - "items": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/ChannelInlineTable" - } - ] - } - }, - "dependencies": { - "title": "Dependencies", - "description": "The `conda` dependencies, consisting of a package name and a requirement in [MatchSpec](https://github.com/conda/conda/blob/078e7ee79381060217e1ec7f9b0e9cf80ecc8f3f/conda/models/match_spec.py) format", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/MatchspecTable" - } - ] - } - }, - "host-dependencies": { - "title": "Host-Dependencies", - "description": "The host `conda` dependencies, used in the build process", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/MatchspecTable" - } - ] - }, - "examples": [ - { - "python": ">=3.8" - } - ] - }, - "platforms": { - "title": "Platforms", - "description": "The platforms that the feature supports: a union of all features combined in one environment is used for the environment.", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - }, - "pypi-dependencies": { - "title": "Pypi-Dependencies", - "description": "The PyPI dependencies of this feature", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/PyPIVersion" - }, - { - "$ref": "#/$defs/PyPIGitBranchRequirement" - }, - { - "$ref": "#/$defs/PyPIGitTagRequirement" - }, - { - "$ref": "#/$defs/PyPIGitRevRequirement" - }, - { - "$ref": "#/$defs/PyPIPathRequirement" - }, - { - "$ref": "#/$defs/PyPIUrlRequirement" - } - ] - } - }, - "pypi-options": { - "$ref": "#/$defs/PyPIOptions", - "description": "Options related to PyPI indexes for this feature" - }, - "system-requirements": { - "$ref": "#/$defs/SystemRequirements", - "description": "The system requirements of this feature" - }, - "target": { - "title": "Target", - "description": "Machine-specific aspects of this feature", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/Target" - }, - "examples": [ - { - "linux": { - "dependencies": { - "python": "3.8" - } - } - } - ] - }, - "tasks": { - "title": "Tasks", - "description": "The tasks provided by this feature", - "type": "object", - "patternProperties": { - "^[^\\s\\$]+$": { - "anyOf": [ - { - "$ref": "#/$defs/TaskInlineTable" - }, - { - "type": "string", - "minLength": 1 - } - ] - } - } - } - } - }, - "FindLinksPath": { - "title": "FindLinksPath", - "description": "The path to the directory containing packages", - "type": "object", - "additionalProperties": false, - "properties": { - "path": { - "title": "Path", - "description": "Path to the directory of packages", - "type": "string", - "minLength": 1, - "examples": [ - "./links" - ] - } - } - }, - "FindLinksURL": { - "title": "FindLinksURL", - "description": "The URL to the html file containing href-links to packages", - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "title": "Url", - "description": "URL to html file with href-links to packages", - "type": "string", - "minLength": 1, - "examples": [ - "https://simple-index-is-here.com" - ] - } - } - }, - "LibcFamily": { - "title": "LibcFamily", - "type": "object", - "additionalProperties": false, - "properties": { - "family": { - "title": "Family", - "description": "The family of the `libc`", - "type": "string", - "minLength": 1, - "examples": [ - "glibc", - "musl" - ] - }, - "version": { - "title": "Version", - "description": "The version of `libc`", - "anyOf": [ - { - "type": "number" - }, - { - "type": "string", - "minLength": 1 - } - ] - } - } - }, - "MatchspecTable": { - "title": "MatchspecTable", - "description": "A precise description of a `conda` package version.", - "type": "object", - "additionalProperties": false, - "properties": { - "build": { - "title": "Build", - "description": "The build string of the package", - "type": "string", - "minLength": 1 - }, - "channel": { - "title": "Channel", - "description": "The channel the packages needs to be fetched from", - "type": "string", - "minLength": 1, - "examples": [ - "conda-forge", - "pytorch", - "https://repo.prefix.dev/conda-forge" - ] - }, - "version": { - "title": "Version", - "description": "The version of the package in [MatchSpec](https://github.com/conda/conda/blob/078e7ee79381060217e1ec7f9b0e9cf80ecc8f3f/conda/models/match_spec.py) format", - "type": "string", - "minLength": 1 - } - } - }, - "Project": { - "title": "Project", - "description": "The project's metadata information.", - "type": "object", - "required": [ - "name", - "platforms" - ], - "additionalProperties": false, - "properties": { - "authors": { - "title": "Authors", - "description": "The authors of the project", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "examples": [ - "John Doe " - ] - }, - "channels": { - "title": "Channels", - "description": "The `conda` channels that can be used in the project. Unless overridden by `priority`, the first channel listed will be preferred.", - "type": "array", - "items": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/ChannelInlineTable" - } - ] - } - }, - "conda-pypi-map": { - "title": "Conda-Pypi-Map", - "description": "The `conda` to PyPI mapping configuration", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "format": "uri", - "minLength": 1 - }, - { - "type": "string", - "minLength": 1 - } - ] - } - }, - "description": { - "title": "Description", - "description": "A short description of the project", - "type": "string", - "minLength": 1 - }, - "documentation": { - "title": "Documentation", - "description": "The URL of the documentation of the project", - "type": "string", - "format": "uri", - "minLength": 1 - }, - "homepage": { - "title": "Homepage", - "description": "The URL of the homepage of the project", - "type": "string", - "format": "uri", - "minLength": 1 - }, - "license": { - "title": "License", - "description": "The license of the project; we advise using an [SPDX](https://spdx.org/licenses/) identifier.", - "type": "string", - "minLength": 1 - }, - "license-file": { - "title": "License-File", - "description": "The path to the license file of the project", - "type": "string", - "pattern": "^[^\\\\]+$" - }, - "name": { - "title": "Name", - "description": "The name of the project; we advise use of the name of the repository", - "type": "string", - "minLength": 1 - }, - "platforms": { - "title": "Platforms", - "description": "The platforms that the project supports", - "type": "array", - "items": { - "anyOf": [ - { - "const": "linux-32" - }, - { - "const": "linux-64" - }, - { - "const": "linux-aarch64" - }, - { - "const": "linux-armv6l" - }, - { - "const": "linux-armv7l" - }, - { - "const": "linux-ppc64le" - }, - { - "const": "linux-ppc64" - }, - { - "const": "linux-s390x" - }, - { - "const": "linux-riscv32" - }, - { - "const": "linux-riscv64" - }, - { - "const": "osx-64" - }, - { - "const": "osx-arm64" - }, - { - "const": "win-32" - }, - { - "const": "win-64" - }, - { - "const": "win-arm64" - }, - { - "const": "emscripten-wasm32" - }, - { - "const": "wasi-wasm32" - } - ] - } - }, - "readme": { - "title": "Readme", - "description": "The path to the readme file of the project", - "type": "string", - "pattern": "^[^\\\\]+$" - }, - "repository": { - "title": "Repository", - "description": "The URL of the repository of the project", - "type": "string", - "format": "uri", - "minLength": 1 - }, - "version": { - "title": "Version", - "description": "The version of the project; we advise use of [SemVer](https://semver.org)", - "type": "string", - "minLength": 1, - "examples": [ - "1.2.3" - ] - } - } - }, - "PyPIGitBranchRequirement": { - "title": "PyPIGitBranchRequirement", - "type": "object", - "additionalProperties": false, - "properties": { - "branch": { - "title": "Branch", - "description": "A `git` branch to use", - "type": "string", - "minLength": 1 - }, - "extras": { - "title": "Extras", - "description": "The [PEP 508 extras](https://peps.python.org/pep-0508/#extras) of the package", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - }, - "git": { - "title": "Git", - "description": "The `git` URL to the repo e.g https://github.com/prefix-dev/pixi", - "type": "string", - "minLength": 1 - } - } - }, - "PyPIGitRevRequirement": { - "title": "PyPIGitRevRequirement", - "type": "object", - "additionalProperties": false, - "properties": { - "extras": { - "title": "Extras", - "description": "The [PEP 508 extras](https://peps.python.org/pep-0508/#extras) of the package", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - }, - "git": { - "title": "Git", - "description": "The `git` URL to the repo e.g https://github.com/prefix-dev/pixi", - "type": "string", - "minLength": 1 - }, - "rev": { - "title": "Rev", - "description": "A `git` SHA revision to sue", - "type": "string", - "minLength": 1 - } - } - }, - "PyPIGitTagRequirement": { - "title": "PyPIGitTagRequirement", - "type": "object", - "additionalProperties": false, - "properties": { - "extras": { - "title": "Extras", - "description": "The [PEP 508 extras](https://peps.python.org/pep-0508/#extras) of the package", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - }, - "git": { - "title": "Git", - "description": "The `git` URL to the repo e.g https://github.com/prefix-dev/pixi", - "type": "string", - "minLength": 1 - }, - "tag": { - "title": "Tag", - "description": "A `git` tag to use", - "type": "string", - "minLength": 1 - } - } - }, - "PyPIOptions": { - "title": "PyPIOptions", - "description": "Options related to PyPI indexes", - "type": "object", - "additionalProperties": false, - "properties": { - "extra-index-urls": { - "title": "Extra-Index-Urls", - "description": "Additional PyPI registries that should be used as extra indexes", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "examples": [ - [ - "https://pypi.org/simple" - ] - ] - }, - "find-links": { - "title": "Find-Links", - "description": "Paths to directory containing", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/$defs/FindLinksPath" - }, - { - "$ref": "#/$defs/FindLinksURL" - } - ] - }, - "examples": [ - [ - "https://pypi.org/simple" - ] - ] - }, - "index-url": { - "title": "Index-Url", - "description": "Alternative PyPI registry that should be used as the main index", - "type": "string", - "minLength": 1, - "examples": [ - "https://pypi.org/simple" - ] - } - } - }, - "PyPIPathRequirement": { - "title": "PyPIPathRequirement", - "type": "object", - "additionalProperties": false, - "properties": { - "editable": { - "title": "Editable", - "description": "If `true` the package will be installed as editable", - "type": "boolean" - }, - "extras": { - "title": "Extras", - "description": "The [PEP 508 extras](https://peps.python.org/pep-0508/#extras) of the package", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - }, - "path": { - "title": "Path", - "description": "A path to a local source or wheel", - "type": "string", - "minLength": 1 - } - } - }, - "PyPIUrlRequirement": { - "title": "PyPIUrlRequirement", - "type": "object", - "additionalProperties": false, - "properties": { - "extras": { - "title": "Extras", - "description": "The [PEP 508 extras](https://peps.python.org/pep-0508/#extras) of the package", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - }, - "url": { - "title": "Url", - "description": "A URL to a remote source or wheel", - "type": "string", - "minLength": 1 - } - } - }, - "PyPIVersion": { - "title": "PyPIVersion", - "type": "object", - "additionalProperties": false, - "properties": { - "extras": { - "title": "Extras", - "description": "The [PEP 508 extras](https://peps.python.org/pep-0508/#extras) of the package", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - }, - "version": { - "title": "Version", - "description": "The version of the package in [PEP 440](https://www.python.org/dev/peps/pep-0440/) format", - "type": "string", - "minLength": 1 - } - } - }, - "SystemRequirements": { - "title": "SystemRequirements", - "description": "Platform-specific requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "archspec": { - "title": "Archspec", - "description": "The architecture the project supports", - "type": "string", - "minLength": 1 - }, - "cuda": { - "title": "Cuda", - "description": "The minimum version of CUDA", - "anyOf": [ - { - "type": "number" - }, - { - "type": "string", - "minLength": 1 - } - ] - }, - "libc": { - "title": "Libc", - "description": "The minimum version of `libc`", - "anyOf": [ - { - "$ref": "#/$defs/LibcFamily" - }, - { - "type": "number" - }, - { - "type": "string", - "minLength": 1 - } - ] - }, - "linux": { - "title": "Linux", - "description": "The minimum version of the Linux kernel", - "anyOf": [ - { - "type": "number", - "exclusiveMinimum": 0.0 - }, - { - "type": "string", - "minLength": 1 - } - ] - }, - "macos": { - "title": "Macos", - "description": "The minimum version of MacOS", - "anyOf": [ - { - "type": "number", - "exclusiveMinimum": 0.0 - }, - { - "type": "string", - "minLength": 1 - } - ] - }, - "unix": { - "title": "Unix", - "description": "Whether the project supports UNIX", - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "string", - "minLength": 1 - } - ], - "examples": [ - "true" - ] - } - } - }, - "Target": { - "title": "Target", - "description": "A machine-specific configuration of dependencies and tasks", - "type": "object", - "additionalProperties": false, - "properties": { - "activation": { - "$ref": "#/$defs/Activation", - "description": "The scripts used on the activation of the project for this target" - }, - "build-dependencies": { - "title": "Build-Dependencies", - "description": "The build `conda` dependencies, used in the build process", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/MatchspecTable" - } - ] - } - }, - "dependencies": { - "title": "Dependencies", - "description": "The `conda` dependencies, consisting of a package name and a requirement in [MatchSpec](https://github.com/conda/conda/blob/078e7ee79381060217e1ec7f9b0e9cf80ecc8f3f/conda/models/match_spec.py) format", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/MatchspecTable" - } - ] - } - }, - "host-dependencies": { - "title": "Host-Dependencies", - "description": "The host `conda` dependencies, used in the build process", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/MatchspecTable" - } - ] - }, - "examples": [ - { - "python": ">=3.8" - } - ] - }, - "pypi-dependencies": { - "title": "Pypi-Dependencies", - "description": "The PyPI dependencies for this target", - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "$ref": "#/$defs/PyPIVersion" - }, - { - "$ref": "#/$defs/PyPIGitBranchRequirement" - }, - { - "$ref": "#/$defs/PyPIGitTagRequirement" - }, - { - "$ref": "#/$defs/PyPIGitRevRequirement" - }, - { - "$ref": "#/$defs/PyPIPathRequirement" - }, - { - "$ref": "#/$defs/PyPIUrlRequirement" - } - ] - } - }, - "tasks": { - "title": "Tasks", - "description": "The tasks of the target", - "type": "object", - "patternProperties": { - "^[^\\s\\$]+$": { - "anyOf": [ - { - "$ref": "#/$defs/TaskInlineTable" - }, - { - "type": "string", - "minLength": 1 - } - ] - } - } - } - } - }, - "TaskInlineTable": { - "title": "TaskInlineTable", - "description": "A precise definition of a task.", - "type": "object", - "additionalProperties": false, - "properties": { - "cmd": { - "title": "Cmd", - "description": "A shell command to run the task in the limited, but cross-platform `bash`-like `deno_task_shell`. See the documentation for [supported syntax](https://pixi.sh/latest/features/advanced_tasks/#syntax)", - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - }, - { - "type": "string", - "minLength": 1 - } - ] - }, - "cwd": { - "title": "Cwd", - "description": "The working directory to run the task", - "type": "string", - "pattern": "^[^\\\\]+$" - }, - "depends-on": { - "title": "Depends-On", - "description": "The tasks that this task depends on. Environment variables will **not** be expanded.", - "anyOf": [ - { - "type": "array", - "items": { - "description": "A valid task name.", - "type": "string", - "pattern": "^[^\\s\\$]+$" - } - }, - { - "description": "A valid task name.", - "type": "string", - "pattern": "^[^\\s\\$]+$" - } - ] - }, - "depends_on": { - "title": "Depends On", - "description": "The tasks that this task depends on. Environment variables will **not** be expanded. Deprecated in favor of `depends-on` from v0.21.0 onward.", - "anyOf": [ - { - "type": "array", - "items": { - "description": "A valid task name.", - "type": "string", - "pattern": "^[^\\s\\$]+$" - } - }, - { - "description": "A valid task name.", - "type": "string", - "pattern": "^[^\\s\\$]+$" - } - ] - }, - "env": { - "title": "Env", - "description": "A map of environment variables to values, used in the task, these will be overwritten by the shell.", - "type": "object", - "additionalProperties": { - "type": "string", - "minLength": 1 - }, - "examples": [ - { - "key": "value" - }, - { - "ARGUMENT": "value" - } - ] - }, - "inputs": { - "title": "Inputs", - "description": "A list of `.gitignore`-style glob patterns that should be watched for changes before this command is run. Environment variables _will_ be expanded.", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - }, - "outputs": { - "title": "Outputs", - "description": "A list of `.gitignore`-style glob patterns that are generated by this command. Environment variables _will_ be expanded.", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - } - } - } - } - } -} From c91b9111cf3bd74b837637662bb260a5e9d312cf Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Fri, 24 May 2024 10:55:18 +0200 Subject: [PATCH 06/20] fix: re-add schema --- schema/schema.json | 1225 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1225 insertions(+) diff --git a/schema/schema.json b/schema/schema.json index e69de29bb..fb7463081 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -0,0 +1,1225 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://pixi.sh/v0.22.0/schema/manifest/schema.json", + "title": "`pixi.toml` manifest file", + "description": "The configuration for a [`pixi`](https://pixi.sh) project.", + "type": "object", + "required": [ + "project" + ], + "additionalProperties": false, + "properties": { + "$schema": { + "title": "Schema", + "description": "The schema identifier for the project's configuration", + "type": "string", + "default": "https://pixi.sh/v0.22.0/schema/manifest/schema.json", + "format": "uri-reference" + }, + "activation": { + "$ref": "#/$defs/Activation", + "description": "The scripts used on the activation of the project" + }, + "build-dependencies": { + "title": "Build-Dependencies", + "description": "The build `conda` dependencies, used in the build process", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/MatchspecTable" + } + ] + } + }, + "dependencies": { + "title": "Dependencies", + "description": "The `conda` dependencies, consisting of a package name and a requirement in [MatchSpec](https://github.com/conda/conda/blob/078e7ee79381060217e1ec7f9b0e9cf80ecc8f3f/conda/models/match_spec.py) format", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/MatchspecTable" + } + ] + } + }, + "environments": { + "title": "Environments", + "description": "The environments of the project, defined as a full object or a list of feature names.", + "type": "object", + "patternProperties": { + "^[a-z\\d\\-]+$": { + "anyOf": [ + { + "$ref": "#/$defs/Environment" + }, + { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + ] + } + } + }, + "feature": { + "title": "Feature", + "description": "The features of the project", + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/Feature" + } + }, + "host-dependencies": { + "title": "Host-Dependencies", + "description": "The host `conda` dependencies, used in the build process", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/MatchspecTable" + } + ] + }, + "examples": [ + { + "python": ">=3.8" + } + ] + }, + "project": { + "$ref": "#/$defs/Project", + "description": "The project's metadata information" + }, + "pypi-dependencies": { + "title": "Pypi-Dependencies", + "description": "The PyPI dependencies", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/PyPIVersion" + }, + { + "$ref": "#/$defs/PyPIGitBranchRequirement" + }, + { + "$ref": "#/$defs/PyPIGitTagRequirement" + }, + { + "$ref": "#/$defs/PyPIGitRevRequirement" + }, + { + "$ref": "#/$defs/PyPIPathRequirement" + }, + { + "$ref": "#/$defs/PyPIUrlRequirement" + } + ] + } + }, + "pypi-options": { + "$ref": "#/$defs/PyPIOptions", + "description": "Options related to PyPI indexes" + }, + "system-requirements": { + "$ref": "#/$defs/SystemRequirements", + "description": "The system requirements of the project" + }, + "target": { + "title": "Target", + "description": "The targets of the project", + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/Target" + }, + "examples": [ + { + "linux": { + "dependencies": { + "python": "3.8" + } + } + } + ] + }, + "tasks": { + "title": "Tasks", + "description": "The tasks of the project", + "type": "object", + "patternProperties": { + "^[^\\s\\$]+$": { + "anyOf": [ + { + "$ref": "#/$defs/TaskInlineTable" + }, + { + "type": "string", + "minLength": 1 + } + ] + } + } + }, + "tool": { + "title": "Tool", + "description": "Third-party tool configurations, ignored by pixi", + "type": "object" + } + }, + "$defs": { + "Activation": { + "title": "Activation", + "description": "A description of steps performed when an environment is activated", + "type": "object", + "additionalProperties": false, + "properties": { + "scripts": { + "title": "Scripts", + "description": "The scripts to run when the environment is activated", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "examples": [ + "activate.sh", + "activate.bat" + ] + } + } + }, + "ChannelInlineTable": { + "title": "ChannelInlineTable", + "description": "A precise description of a `conda` channel, with an optional priority.", + "type": "object", + "required": [ + "channel" + ], + "additionalProperties": false, + "properties": { + "channel": { + "title": "Channel", + "description": "The channel the packages needs to be fetched from", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "string", + "format": "uri", + "minLength": 1 + } + ] + }, + "priority": { + "title": "Priority", + "description": "The priority of the channel", + "type": "integer" + } + } + }, + "Environment": { + "title": "Environment", + "description": "A composition of the dependencies of features which can be activated to run tasks or provide a shell", + "type": "object", + "additionalProperties": false, + "properties": { + "features": { + "title": "Features", + "description": "The features that define the environment", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "no-default-feature": { + "title": "No-Default-Feature", + "description": "Whether to add the default feature to this environment", + "type": "boolean", + "default": false + }, + "solve-group": { + "title": "Solve-Group", + "description": "The group name for environments that should be solved together", + "type": "string", + "minLength": 1 + } + } + }, + "Feature": { + "title": "Feature", + "description": "A composable aspect of the project which can contribute dependencies and tasks to an environment", + "type": "object", + "additionalProperties": false, + "properties": { + "activation": { + "$ref": "#/$defs/Activation", + "description": "The scripts used on the activation of environments using this feature" + }, + "build-dependencies": { + "title": "Build-Dependencies", + "description": "The build `conda` dependencies, used in the build process", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/MatchspecTable" + } + ] + } + }, + "channels": { + "title": "Channels", + "description": "The `conda` channels that can be considered when solving environments containing this feature", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/ChannelInlineTable" + } + ] + } + }, + "dependencies": { + "title": "Dependencies", + "description": "The `conda` dependencies, consisting of a package name and a requirement in [MatchSpec](https://github.com/conda/conda/blob/078e7ee79381060217e1ec7f9b0e9cf80ecc8f3f/conda/models/match_spec.py) format", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/MatchspecTable" + } + ] + } + }, + "host-dependencies": { + "title": "Host-Dependencies", + "description": "The host `conda` dependencies, used in the build process", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/MatchspecTable" + } + ] + }, + "examples": [ + { + "python": ">=3.8" + } + ] + }, + "platforms": { + "title": "Platforms", + "description": "The platforms that the feature supports: a union of all features combined in one environment is used for the environment.", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "pypi-dependencies": { + "title": "Pypi-Dependencies", + "description": "The PyPI dependencies of this feature", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/PyPIVersion" + }, + { + "$ref": "#/$defs/PyPIGitBranchRequirement" + }, + { + "$ref": "#/$defs/PyPIGitTagRequirement" + }, + { + "$ref": "#/$defs/PyPIGitRevRequirement" + }, + { + "$ref": "#/$defs/PyPIPathRequirement" + }, + { + "$ref": "#/$defs/PyPIUrlRequirement" + } + ] + } + }, + "pypi-options": { + "$ref": "#/$defs/PyPIOptions", + "description": "Options related to PyPI indexes for this feature" + }, + "system-requirements": { + "$ref": "#/$defs/SystemRequirements", + "description": "The system requirements of this feature" + }, + "target": { + "title": "Target", + "description": "Machine-specific aspects of this feature", + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/Target" + }, + "examples": [ + { + "linux": { + "dependencies": { + "python": "3.8" + } + } + } + ] + }, + "tasks": { + "title": "Tasks", + "description": "The tasks provided by this feature", + "type": "object", + "patternProperties": { + "^[^\\s\\$]+$": { + "anyOf": [ + { + "$ref": "#/$defs/TaskInlineTable" + }, + { + "type": "string", + "minLength": 1 + } + ] + } + } + } + } + }, + "FindLinksPath": { + "title": "FindLinksPath", + "description": "The path to the directory containing packages", + "type": "object", + "additionalProperties": false, + "properties": { + "path": { + "title": "Path", + "description": "Path to the directory of packages", + "type": "string", + "minLength": 1, + "examples": [ + "./links" + ] + } + } + }, + "FindLinksURL": { + "title": "FindLinksURL", + "description": "The URL to the html file containing href-links to packages", + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "title": "Url", + "description": "URL to html file with href-links to packages", + "type": "string", + "minLength": 1, + "examples": [ + "https://simple-index-is-here.com" + ] + } + } + }, + "LibcFamily": { + "title": "LibcFamily", + "type": "object", + "additionalProperties": false, + "properties": { + "family": { + "title": "Family", + "description": "The family of the `libc`", + "type": "string", + "minLength": 1, + "examples": [ + "glibc", + "musl" + ] + }, + "version": { + "title": "Version", + "description": "The version of `libc`", + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "minLength": 1 + } + ] + } + } + }, + "MatchspecTable": { + "title": "MatchspecTable", + "description": "A precise description of a `conda` package version.", + "type": "object", + "additionalProperties": false, + "properties": { + "build": { + "title": "Build", + "description": "The build string of the package", + "type": "string", + "minLength": 1 + }, + "channel": { + "title": "Channel", + "description": "The channel the packages needs to be fetched from", + "type": "string", + "minLength": 1, + "examples": [ + "conda-forge", + "pytorch", + "https://repo.prefix.dev/conda-forge" + ] + }, + "version": { + "title": "Version", + "description": "The version of the package in [MatchSpec](https://github.com/conda/conda/blob/078e7ee79381060217e1ec7f9b0e9cf80ecc8f3f/conda/models/match_spec.py) format", + "type": "string", + "minLength": 1 + } + } + }, + "Project": { + "title": "Project", + "description": "The project's metadata information.", + "type": "object", + "required": [ + "name", + "platforms" + ], + "additionalProperties": false, + "properties": { + "authors": { + "title": "Authors", + "description": "The authors of the project", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "examples": [ + "John Doe " + ] + }, + "channels": { + "title": "Channels", + "description": "The `conda` channels that can be used in the project. Unless overridden by `priority`, the first channel listed will be preferred.", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/ChannelInlineTable" + } + ] + } + }, + "conda-pypi-map": { + "title": "Conda-Pypi-Map", + "description": "The `conda` to PyPI mapping configuration", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "format": "uri", + "minLength": 1 + }, + { + "type": "string", + "minLength": 1 + } + ] + } + }, + "description": { + "title": "Description", + "description": "A short description of the project", + "type": "string", + "minLength": 1 + }, + "documentation": { + "title": "Documentation", + "description": "The URL of the documentation of the project", + "type": "string", + "format": "uri", + "minLength": 1 + }, + "homepage": { + "title": "Homepage", + "description": "The URL of the homepage of the project", + "type": "string", + "format": "uri", + "minLength": 1 + }, + "license": { + "title": "License", + "description": "The license of the project; we advise using an [SPDX](https://spdx.org/licenses/) identifier.", + "type": "string", + "minLength": 1 + }, + "license-file": { + "title": "License-File", + "description": "The path to the license file of the project", + "type": "string", + "pattern": "^[^\\\\]+$" + }, + "name": { + "title": "Name", + "description": "The name of the project; we advise use of the name of the repository", + "type": "string", + "minLength": 1 + }, + "platforms": { + "title": "Platforms", + "description": "The platforms that the project supports", + "type": "array", + "items": { + "anyOf": [ + { + "const": "linux-32" + }, + { + "const": "linux-64" + }, + { + "const": "linux-aarch64" + }, + { + "const": "linux-armv6l" + }, + { + "const": "linux-armv7l" + }, + { + "const": "linux-ppc64le" + }, + { + "const": "linux-ppc64" + }, + { + "const": "linux-s390x" + }, + { + "const": "linux-riscv32" + }, + { + "const": "linux-riscv64" + }, + { + "const": "osx-64" + }, + { + "const": "osx-arm64" + }, + { + "const": "win-32" + }, + { + "const": "win-64" + }, + { + "const": "win-arm64" + }, + { + "const": "emscripten-wasm32" + }, + { + "const": "wasi-wasm32" + } + ] + } + }, + "readme": { + "title": "Readme", + "description": "The path to the readme file of the project", + "type": "string", + "pattern": "^[^\\\\]+$" + }, + "repository": { + "title": "Repository", + "description": "The URL of the repository of the project", + "type": "string", + "format": "uri", + "minLength": 1 + }, + "version": { + "title": "Version", + "description": "The version of the project; we advise use of [SemVer](https://semver.org)", + "type": "string", + "minLength": 1, + "examples": [ + "1.2.3" + ] + } + } + }, + "PyPIGitBranchRequirement": { + "title": "PyPIGitBranchRequirement", + "type": "object", + "additionalProperties": false, + "properties": { + "branch": { + "title": "Branch", + "description": "A `git` branch to use", + "type": "string", + "minLength": 1 + }, + "extras": { + "title": "Extras", + "description": "The [PEP 508 extras](https://peps.python.org/pep-0508/#extras) of the package", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "git": { + "title": "Git", + "description": "The `git` URL to the repo e.g https://github.com/prefix-dev/pixi", + "type": "string", + "minLength": 1 + } + } + }, + "PyPIGitRevRequirement": { + "title": "PyPIGitRevRequirement", + "type": "object", + "additionalProperties": false, + "properties": { + "extras": { + "title": "Extras", + "description": "The [PEP 508 extras](https://peps.python.org/pep-0508/#extras) of the package", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "git": { + "title": "Git", + "description": "The `git` URL to the repo e.g https://github.com/prefix-dev/pixi", + "type": "string", + "minLength": 1 + }, + "rev": { + "title": "Rev", + "description": "A `git` SHA revision to sue", + "type": "string", + "minLength": 1 + } + } + }, + "PyPIGitTagRequirement": { + "title": "PyPIGitTagRequirement", + "type": "object", + "additionalProperties": false, + "properties": { + "extras": { + "title": "Extras", + "description": "The [PEP 508 extras](https://peps.python.org/pep-0508/#extras) of the package", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "git": { + "title": "Git", + "description": "The `git` URL to the repo e.g https://github.com/prefix-dev/pixi", + "type": "string", + "minLength": 1 + }, + "tag": { + "title": "Tag", + "description": "A `git` tag to use", + "type": "string", + "minLength": 1 + } + } + }, + "PyPIOptions": { + "title": "PyPIOptions", + "description": "Options related to PyPI indexes", + "type": "object", + "additionalProperties": false, + "properties": { + "extra-index-urls": { + "title": "Extra-Index-Urls", + "description": "Additional PyPI registries that should be used as extra indexes", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "examples": [ + [ + "https://pypi.org/simple" + ] + ] + }, + "find-links": { + "title": "Find-Links", + "description": "Paths to directory containing", + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/$defs/FindLinksPath" + }, + { + "$ref": "#/$defs/FindLinksURL" + } + ] + }, + "examples": [ + [ + "https://pypi.org/simple" + ] + ] + }, + "index-url": { + "title": "Index-Url", + "description": "Alternative PyPI registry that should be used as the main index", + "type": "string", + "minLength": 1, + "examples": [ + "https://pypi.org/simple" + ] + } + } + }, + "PyPIPathRequirement": { + "title": "PyPIPathRequirement", + "type": "object", + "additionalProperties": false, + "properties": { + "editable": { + "title": "Editable", + "description": "If `true` the package will be installed as editable", + "type": "boolean" + }, + "extras": { + "title": "Extras", + "description": "The [PEP 508 extras](https://peps.python.org/pep-0508/#extras) of the package", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "path": { + "title": "Path", + "description": "A path to a local source or wheel", + "type": "string", + "minLength": 1 + } + } + }, + "PyPIUrlRequirement": { + "title": "PyPIUrlRequirement", + "type": "object", + "additionalProperties": false, + "properties": { + "extras": { + "title": "Extras", + "description": "The [PEP 508 extras](https://peps.python.org/pep-0508/#extras) of the package", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "url": { + "title": "Url", + "description": "A URL to a remote source or wheel", + "type": "string", + "minLength": 1 + } + } + }, + "PyPIVersion": { + "title": "PyPIVersion", + "type": "object", + "additionalProperties": false, + "properties": { + "extras": { + "title": "Extras", + "description": "The [PEP 508 extras](https://peps.python.org/pep-0508/#extras) of the package", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "version": { + "title": "Version", + "description": "The version of the package in [PEP 440](https://www.python.org/dev/peps/pep-0440/) format", + "type": "string", + "minLength": 1 + } + } + }, + "SystemRequirements": { + "title": "SystemRequirements", + "description": "Platform-specific requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "archspec": { + "title": "Archspec", + "description": "The architecture the project supports", + "type": "string", + "minLength": 1 + }, + "cuda": { + "title": "Cuda", + "description": "The minimum version of CUDA", + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "minLength": 1 + } + ] + }, + "libc": { + "title": "Libc", + "description": "The minimum version of `libc`", + "anyOf": [ + { + "$ref": "#/$defs/LibcFamily" + }, + { + "type": "number" + }, + { + "type": "string", + "minLength": 1 + } + ] + }, + "linux": { + "title": "Linux", + "description": "The minimum version of the Linux kernel", + "anyOf": [ + { + "type": "number", + "exclusiveMinimum": 0.0 + }, + { + "type": "string", + "minLength": 1 + } + ] + }, + "macos": { + "title": "Macos", + "description": "The minimum version of MacOS", + "anyOf": [ + { + "type": "number", + "exclusiveMinimum": 0.0 + }, + { + "type": "string", + "minLength": 1 + } + ] + }, + "unix": { + "title": "Unix", + "description": "Whether the project supports UNIX", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "minLength": 1 + } + ], + "examples": [ + "true" + ] + } + } + }, + "Target": { + "title": "Target", + "description": "A machine-specific configuration of dependencies and tasks", + "type": "object", + "additionalProperties": false, + "properties": { + "activation": { + "$ref": "#/$defs/Activation", + "description": "The scripts used on the activation of the project for this target" + }, + "build-dependencies": { + "title": "Build-Dependencies", + "description": "The build `conda` dependencies, used in the build process", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/MatchspecTable" + } + ] + } + }, + "dependencies": { + "title": "Dependencies", + "description": "The `conda` dependencies, consisting of a package name and a requirement in [MatchSpec](https://github.com/conda/conda/blob/078e7ee79381060217e1ec7f9b0e9cf80ecc8f3f/conda/models/match_spec.py) format", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/MatchspecTable" + } + ] + } + }, + "host-dependencies": { + "title": "Host-Dependencies", + "description": "The host `conda` dependencies, used in the build process", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/MatchspecTable" + } + ] + }, + "examples": [ + { + "python": ">=3.8" + } + ] + }, + "pypi-dependencies": { + "title": "Pypi-Dependencies", + "description": "The PyPI dependencies for this target", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/$defs/PyPIVersion" + }, + { + "$ref": "#/$defs/PyPIGitBranchRequirement" + }, + { + "$ref": "#/$defs/PyPIGitTagRequirement" + }, + { + "$ref": "#/$defs/PyPIGitRevRequirement" + }, + { + "$ref": "#/$defs/PyPIPathRequirement" + }, + { + "$ref": "#/$defs/PyPIUrlRequirement" + } + ] + } + }, + "tasks": { + "title": "Tasks", + "description": "The tasks of the target", + "type": "object", + "patternProperties": { + "^[^\\s\\$]+$": { + "anyOf": [ + { + "$ref": "#/$defs/TaskInlineTable" + }, + { + "type": "string", + "minLength": 1 + } + ] + } + } + } + } + }, + "TaskInlineTable": { + "title": "TaskInlineTable", + "description": "A precise definition of a task.", + "type": "object", + "additionalProperties": false, + "properties": { + "clean-env": { + "title": "Clean-Env", + "description": "Whether to run in a clean environment, removing all environment variables except those defined in `env` and by pixi itself.", + "type": "boolean" + }, + "cmd": { + "title": "Cmd", + "description": "A shell command to run the task in the limited, but cross-platform `bash`-like `deno_task_shell`. See the documentation for [supported syntax](https://pixi.sh/latest/features/advanced_tasks/#syntax)", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + { + "type": "string", + "minLength": 1 + } + ] + }, + "cwd": { + "title": "Cwd", + "description": "The working directory to run the task", + "type": "string", + "pattern": "^[^\\\\]+$" + }, + "depends-on": { + "title": "Depends-On", + "description": "The tasks that this task depends on. Environment variables will **not** be expanded.", + "anyOf": [ + { + "type": "array", + "items": { + "description": "A valid task name.", + "type": "string", + "pattern": "^[^\\s\\$]+$" + } + }, + { + "description": "A valid task name.", + "type": "string", + "pattern": "^[^\\s\\$]+$" + } + ] + }, + "depends_on": { + "title": "Depends On", + "description": "The tasks that this task depends on. Environment variables will **not** be expanded. Deprecated in favor of `depends-on` from v0.21.0 onward.", + "anyOf": [ + { + "type": "array", + "items": { + "description": "A valid task name.", + "type": "string", + "pattern": "^[^\\s\\$]+$" + } + }, + { + "description": "A valid task name.", + "type": "string", + "pattern": "^[^\\s\\$]+$" + } + ] + }, + "env": { + "title": "Env", + "description": "A map of environment variables to values, used in the task, these will be overwritten by the shell.", + "type": "object", + "additionalProperties": { + "type": "string", + "minLength": 1 + }, + "examples": [ + { + "key": "value" + }, + { + "ARGUMENT": "value" + } + ] + }, + "inputs": { + "title": "Inputs", + "description": "A list of `.gitignore`-style glob patterns that should be watched for changes before this command is run. Environment variables _will_ be expanded.", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "outputs": { + "title": "Outputs", + "description": "A list of `.gitignore`-style glob patterns that are generated by this command. Environment variables _will_ be expanded.", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + } +} From 630c0f8333ebf3d11a51f10c032ac363c8692d17 Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Fri, 24 May 2024 14:11:22 +0200 Subject: [PATCH 07/20] fix: tests and add default envs to unix --- src/activation.rs | 85 +++++++++++++++++++++++++++++++++++++++++++-- src/cli/run.rs | 14 +++++++- src/task/mod.rs | 4 +-- tests/common/mod.rs | 5 +-- tests/task_tests.rs | 40 +++++++++++++++++++++ 5 files changed, 141 insertions(+), 7 deletions(-) diff --git a/src/activation.rs b/src/activation.rs index b1e16bd29..30238c0cb 100644 --- a/src/activation.rs +++ b/src/activation.rs @@ -216,9 +216,62 @@ pub fn get_environment_variables<'p>(environment: &'p Environment<'p>) -> HashMa .collect() } +/// Get the environment variables that are set by default on Linux. +pub fn get_linux_clean_environment_variables() -> HashMap { + let env = std::env::vars().collect::>(); + let default_keys = [ + "DISPLAY", + "LC_ALL", + "LC_TIME", + "LC_NUMERIC", + "LC_MEASUREMENT", + "SHELL", + "USER", + "USERNAME", + "LOGNAME", + "HOME", + "HOSTNAME", + ]; + + let env = env + .into_iter() + .filter(|(key, _)| default_keys.contains(&key.as_str())) + .collect(); + env +} + +/// Get the environment variables that are set by default on macOS. +pub fn get_macos_clean_environment_variables() -> HashMap { + let env = std::env::vars().collect::>(); + let default_keys = [ + "DISPLAY", + "LC_ALL", + "LC_TIME", + "LC_NUMERIC", + "LC_MEASUREMENT", + "USER", + "USERNAME", + "LOGNAME", + "HOME", + "HOSTNAME", + "PATH", + "SHELL", + "TMPDIR", + "XPC_SERVICE_NAME", + "XPC_FLAGS", + ]; + + let env = env + .into_iter() + .filter(|(key, _)| default_keys.contains(&key.as_str())) + .collect(); + env +} + +/// Get the environment variables that are set by default on Windows. pub fn get_windows_clean_environment_variables() -> HashMap { let env = std::env::vars().collect::>(); - let default_keys = vec![ + let default_keys = [ "APPDATA", "COMPUTERNAME", "COMSPEC", @@ -358,8 +411,36 @@ mod tests { } #[test] + #[cfg(target_os = "linux")] + fn test_get_linux_clean_environment_variables() { + let env = get_linux_clean_environment_variables(); + // Make sure that the environment variables are set. + assert_eq!( + env.get("USER").unwrap(), + std::env::var("USER").as_ref().unwrap() + ); + } + + #[test] + #[cfg(target_os = "macos")] + fn test_get_macos_clean_environment_variables() { + let env = get_macos_clean_environment_variables(); + // Make sure that the environment variables are set. + assert_eq!( + env.get("USER").unwrap(), + std::env::var("USER").as_ref().unwrap() + ); + } + + #[test] + #[cfg(target_os = "windows")] fn test_get_windows_clean_environment_variables() { let env = get_windows_clean_environment_variables(); - dbg!(env); + // Make sure that the environment variables are set. + assert_eq!( + env.get("USERNAME").unwrap(), + std::env::var("USERNAME").as_ref().unwrap() + ); + assert!(env.get("Path").is_some()); } } diff --git a/src/cli/run.rs b/src/cli/run.rs index 4183e6c17..0036764b8 100644 --- a/src/cli/run.rs +++ b/src/cli/run.rs @@ -19,7 +19,10 @@ use crate::task::{ }; use crate::Project; -use crate::activation::get_windows_clean_environment_variables; +use crate::activation::{ + get_linux_clean_environment_variables, get_macos_clean_environment_variables, + get_windows_clean_environment_variables, +}; use crate::lock_file::LockFileDerivedData; use crate::lock_file::UpdateLockFileOptions; use crate::progress::await_in_progress; @@ -267,7 +270,16 @@ pub async fn get_task_env<'p>( let mut win_env = get_windows_clean_environment_variables(); win_env.extend(activation_env); return Ok(win_env); + } else if cfg!(unix) { + let mut unix_env = get_linux_clean_environment_variables(); + unix_env.extend(activation_env); + return Ok(unix_env); + } else if cfg!(macos) { + let mut macos_env = get_macos_clean_environment_variables(); + macos_env.extend(activation_env); + return Ok(macos_env); } + // If none of the os' are detected, use the activation environment without defaults. return Ok(activation_env); } diff --git a/src/task/mod.rs b/src/task/mod.rs index c9f5bf209..3b0a684d4 100644 --- a/src/task/mod.rs +++ b/src/task/mod.rs @@ -182,8 +182,8 @@ pub struct Execute { pub outputs: Option>, /// A list of commands that should be run before this one - // BREAK: Make the alias a renamed field to force kebab-case - #[serde(default, alias = "depends-on")] + // BREAK: Make the remove the alias and force kebab-case + #[serde(default, alias = "depends_on")] #[serde_as(deserialize_as = "OneOrMany<_, PreferMany>")] pub depends_on: Vec, diff --git a/tests/common/mod.rs b/tests/common/mod.rs index edd0b55c0..4dee6091a 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -306,7 +306,7 @@ impl PixiControl { .map(|e| e.best_platform()) .or(Some(Platform::current())), ); - let task_graph = TaskGraph::from_cmd_args(&project, &search_env, args.task) + let task_graph = TaskGraph::from_cmd_args(&project, &search_env, args.task, false) .map_err(RunError::TaskGraphError)?; // Iterate over all tasks in the graph and execute them. @@ -318,7 +318,7 @@ impl PixiControl { // Construct the task environment if not already created. let task_env = match task_env.as_ref() { None => { - let env = get_task_env(&mut lock_file, &task.run_environment).await?; + let env = get_task_env(&mut lock_file, &task.run_environment, false).await?; task_env.insert(env) as &_ } Some(task_env) => task_env, @@ -398,6 +398,7 @@ impl TasksControl<'_> { feature, cwd: None, env: Default::default(), + clean_env: false, }, } } diff --git a/tests/task_tests.rs b/tests/task_tests.rs index 1748ea331..26ee593aa 100644 --- a/tests/task_tests.rs +++ b/tests/task_tests.rs @@ -239,3 +239,43 @@ async fn test_task_with_env() { assert_eq!(result.exit_code, 0); assert_eq!(result.stdout, "From a world with spaces\n"); } + +#[tokio::test] +async fn test_clean_env() { + let pixi = PixiControl::new().unwrap(); + pixi.init().without_channels().await.unwrap(); + + std::env::set_var("HELLO", "world from env"); + + pixi.tasks() + .add("env-test".into(), None, FeatureName::Default) + .with_commands(["echo Hello is: $HELLO"]) + .execute() + .unwrap(); + + let result = pixi + .run(Args { + task: vec!["env-test".to_string()], + manifest_path: None, + clean_env: true, + ..Default::default() + }) + .await + .unwrap(); + + assert_eq!(result.exit_code, 0); + assert_eq!(result.stdout, "Hello is: \n"); + + let result = pixi + .run(Args { + task: vec!["env-test".to_string()], + manifest_path: None, + clean_env: true, + ..Default::default() + }) + .await + .unwrap(); + + assert_eq!(result.exit_code, 0); + assert_eq!(result.stdout, "Hello is: world from env\n"); +} From c406959144adc9cd93ea106172ad765379ab7331 Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Fri, 24 May 2024 15:21:36 +0200 Subject: [PATCH 08/20] misc: simplify clean env --- src/activation.rs | 185 ++++++++++++++++++----------------------- src/cli/run.rs | 26 ++---- src/task/mod.rs | 6 +- src/task/task_graph.rs | 3 - tests/common/mod.rs | 2 +- 5 files changed, 89 insertions(+), 133 deletions(-) diff --git a/src/activation.rs b/src/activation.rs index 30238c0cb..795deb200 100644 --- a/src/activation.rs +++ b/src/activation.rs @@ -140,7 +140,7 @@ pub async fn run_activation( )) })?; - let path_modification_behavior = if clean_env { + let path_modification_behavior = if clean_env && !cfg!(target_os = "windows") { PathModificationBehavior::Replace } else { PathModificationBehavior::Prepend @@ -216,99 +216,76 @@ pub fn get_environment_variables<'p>(environment: &'p Environment<'p>) -> HashMa .collect() } -/// Get the environment variables that are set by default on Linux. -pub fn get_linux_clean_environment_variables() -> HashMap { +pub fn get_clean_environment_variables() -> HashMap { let env = std::env::vars().collect::>(); - let default_keys = [ - "DISPLAY", - "LC_ALL", - "LC_TIME", - "LC_NUMERIC", - "LC_MEASUREMENT", - "SHELL", - "USER", - "USERNAME", - "LOGNAME", - "HOME", - "HOSTNAME", - ]; - let env = env - .into_iter() - .filter(|(key, _)| default_keys.contains(&key.as_str())) - .collect(); - env -} - -/// Get the environment variables that are set by default on macOS. -pub fn get_macos_clean_environment_variables() -> HashMap { - let env = std::env::vars().collect::>(); - let default_keys = [ - "DISPLAY", - "LC_ALL", - "LC_TIME", - "LC_NUMERIC", - "LC_MEASUREMENT", - "USER", - "USERNAME", - "LOGNAME", - "HOME", - "HOSTNAME", - "PATH", - "SHELL", - "TMPDIR", - "XPC_SERVICE_NAME", - "XPC_FLAGS", - ]; + let unix_keys = if cfg!(target_os = "unix") { + vec![ + "DISPLAY", + "LC_ALL", + "LC_TIME", + "LC_NUMERIC", + "LC_MEASUREMENT", + "SHELL", + "USER", + "USERNAME", + "LOGNAME", + "HOME", + "HOSTNAME", + ] + } else { + vec![] + }; - let env = env - .into_iter() - .filter(|(key, _)| default_keys.contains(&key.as_str())) - .collect(); - env -} + let macos_keys = if cfg!(target_os = "macos") { + vec!["TMPDIR", "XPC_SERVICE_NAME", "XPC_FLAGS"] + } else { + vec![] + }; -/// Get the environment variables that are set by default on Windows. -pub fn get_windows_clean_environment_variables() -> HashMap { - let env = std::env::vars().collect::>(); - let default_keys = [ - "APPDATA", - "COMPUTERNAME", - "COMSPEC", - "COMMONPROGRAMFILES", - "COMMONPROGRAMFILES(X86)", - "COMMONPROGRAMW6432", - "DRIVERDATA", - "HOMEDRIVE", - "HOMEPATH", - "LOGONSERVER", - "NUMBER_OF_PROCESSORS", - "OS", - "PATHEXT", - "PROCESSOR_ARCHITECTURE", - "PROCESSOR_IDENTIFIER", - "PROCESSOR_LEVEL", - "PROCESSOR_REVISION", - "PROMPT_COMMAND", - "PROMPT_COMMAND_RIGHT", - "PROMPT_INDICATOR", - "PROMPT_INDICATOR_VI_INSERT", - "PROMPT_INDICATOR_VI_NORMAL", - "PROMPT_MULTILINE_INDICATOR", - "PWD", - "SESSIONNAME", - "SYSTEMDRIVE", - "SYSTEMROOT", - "TEMP", - "TMP", - "TERMINAL_EMULATOR", - "USERNAME", - "USERPROFILE", - "USERDOMAIN_ROAMINGPROFILE", - "USERDOMAIN", - "windir", - ]; + let windows_keys = if cfg!(target_os = "windows") { + vec![ + "APPDATA", + "COMPUTERNAME", + "COMSPEC", + "COMMONPROGRAMFILES", + "COMMONPROGRAMFILES(X86)", + "COMMONPROGRAMW6432", + "DRIVERDATA", + "HOMEDRIVE", + "HOMEPATH", + "LOGONSERVER", + "NUMBER_OF_PROCESSORS", + "OS", + "PATHEXT", + "PROCESSOR_ARCHITECTURE", + "PROCESSOR_IDENTIFIER", + "PROCESSOR_LEVEL", + "PROCESSOR_REVISION", + "PROMPT_COMMAND", + "PROMPT_COMMAND_RIGHT", + "PROMPT_INDICATOR", + "PROMPT_INDICATOR_VI_INSERT", + "PROMPT_INDICATOR_VI_NORMAL", + "PROMPT_MULTILINE_INDICATOR", + "PWD", + "SESSIONNAME", + "SYSTEMDRIVE", + "SYSTEMROOT", + "TEMP", + "TMP", + "TERMINAL_EMULATOR", + "USERNAME", + "USERPROFILE", + "USERDOMAIN_ROAMINGPROFILE", + "USERDOMAIN", + "windir", + ] + } else { + vec![] + }; + #[cfg(target_os = "windows")] let path = env .get("Path") .map(|path| { @@ -321,9 +298,20 @@ pub fn get_windows_clean_environment_variables() -> HashMap { }) .expect("Could not find PATH in environment variables"); + let keys = unix_keys + .into_iter() + .chain(macos_keys) + .chain(windows_keys) + .collect_vec(); + + let env = env + .into_iter() + .filter(|(key, _)| keys.contains(&key.as_str())) + .collect(); + + #[cfg(target_os = "windows")] let env = env .into_iter() - .filter(|(key, _)| default_keys.contains(&key.as_str())) .chain(vec![("PATH".to_string(), path)]) .collect(); @@ -411,20 +399,9 @@ mod tests { } #[test] - #[cfg(target_os = "linux")] + #[cfg(target_os = "unix")] fn test_get_linux_clean_environment_variables() { - let env = get_linux_clean_environment_variables(); - // Make sure that the environment variables are set. - assert_eq!( - env.get("USER").unwrap(), - std::env::var("USER").as_ref().unwrap() - ); - } - - #[test] - #[cfg(target_os = "macos")] - fn test_get_macos_clean_environment_variables() { - let env = get_macos_clean_environment_variables(); + let env = get_clean_environment_variables(); // Make sure that the environment variables are set. assert_eq!( env.get("USER").unwrap(), @@ -435,7 +412,7 @@ mod tests { #[test] #[cfg(target_os = "windows")] fn test_get_windows_clean_environment_variables() { - let env = get_windows_clean_environment_variables(); + let env = get_clean_environment_variables(); // Make sure that the environment variables are set. assert_eq!( env.get("USERNAME").unwrap(), diff --git a/src/cli/run.rs b/src/cli/run.rs index 0036764b8..7b36d327b 100644 --- a/src/cli/run.rs +++ b/src/cli/run.rs @@ -19,10 +19,7 @@ use crate::task::{ }; use crate::Project; -use crate::activation::{ - get_linux_clean_environment_variables, get_macos_clean_environment_variables, - get_windows_clean_environment_variables, -}; +use crate::activation::get_clean_environment_variables; use crate::lock_file::LockFileDerivedData; use crate::lock_file::UpdateLockFileOptions; use crate::progress::await_in_progress; @@ -120,8 +117,7 @@ pub async fn execute(args: Args) -> miette::Result<()> { ) .with_disambiguate_fn(disambiguate_task_interactive); - let task_graph = - TaskGraph::from_cmd_args(&project, &search_environment, task_args, args.clean_env)?; + let task_graph = TaskGraph::from_cmd_args(&project, &search_environment, task_args)?; tracing::info!("Task graph: {}", task_graph); @@ -266,21 +262,9 @@ pub async fn get_task_env<'p>( .wrap_err("failed to activate environment")?; if clean_env { - if cfg!(windows) { - let mut win_env = get_windows_clean_environment_variables(); - win_env.extend(activation_env); - return Ok(win_env); - } else if cfg!(unix) { - let mut unix_env = get_linux_clean_environment_variables(); - unix_env.extend(activation_env); - return Ok(unix_env); - } else if cfg!(macos) { - let mut macos_env = get_macos_clean_environment_variables(); - macos_env.extend(activation_env); - return Ok(macos_env); - } - // If none of the os' are detected, use the activation environment without defaults. - return Ok(activation_env); + let mut env = get_clean_environment_variables(); + env.extend(activation_env); + return Ok(env); } // Concatenate with the system environment variables diff --git a/src/task/mod.rs b/src/task/mod.rs index 3b0a684d4..27fb8b941 100644 --- a/src/task/mod.rs +++ b/src/task/mod.rs @@ -159,7 +159,7 @@ impl Task { pub fn clean_env(&self) -> bool { match self { Task::Plain(_) => false, - Task::Custom(custom) => custom.clean_env, + Task::Custom(_) => false, Task::Execute(execute) => execute.clean_env, Task::Alias(_) => false, } @@ -213,10 +213,8 @@ pub struct Custom { /// The working directory for the command relative to the root of the project. pub cwd: Option, - - /// Isolate the task from the running machine - pub clean_env: bool, } + impl From for Task { fn from(value: Custom) -> Self { Task::Custom(value) diff --git a/src/task/task_graph.rs b/src/task/task_graph.rs index b1432ce84..38b9fa53b 100644 --- a/src/task/task_graph.rs +++ b/src/task/task_graph.rs @@ -118,7 +118,6 @@ impl<'p> TaskGraph<'p> { project: &'p Project, search_envs: &SearchEnvironments<'p, D>, args: Vec, - clean_env: bool, ) -> Result { let mut args = args; @@ -165,7 +164,6 @@ impl<'p> TaskGraph<'p> { Custom { cmd: CmdArgs::from(args), cwd: env::current_dir().ok(), - clean_env, } .into(), ), @@ -320,7 +318,6 @@ mod test { &project, &search_envs, run_args.iter().map(|arg| arg.to_string()).collect(), - false, ) .unwrap(); diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 4dee6091a..68e22132c 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -306,7 +306,7 @@ impl PixiControl { .map(|e| e.best_platform()) .or(Some(Platform::current())), ); - let task_graph = TaskGraph::from_cmd_args(&project, &search_env, args.task, false) + let task_graph = TaskGraph::from_cmd_args(&project, &search_env, args.task) .map_err(RunError::TaskGraphError)?; // Iterate over all tasks in the graph and execute them. From 3be9ffb5dbfb4c3f735b68cf10a2d6859ae873b1 Mon Sep 17 00:00:00 2001 From: "Ruben Arts(win)" Date: Sat, 25 May 2024 11:36:30 +0200 Subject: [PATCH 09/20] fix: python running on windows --- src/activation.rs | 97 +++++++++++++++++++++++++++++++++++------------ src/cli/run.rs | 26 +++++++++++++ 2 files changed, 98 insertions(+), 25 deletions(-) diff --git a/src/activation.rs b/src/activation.rs index 795deb200..cefffa20e 100644 --- a/src/activation.rs +++ b/src/activation.rs @@ -140,7 +140,7 @@ pub async fn run_activation( )) })?; - let path_modification_behavior = if clean_env && !cfg!(target_os = "windows") { + let path_modification_behavior = if clean_env { PathModificationBehavior::Replace } else { PathModificationBehavior::Prepend @@ -279,43 +279,90 @@ pub fn get_clean_environment_variables() -> HashMap { "USERPROFILE", "USERDOMAIN_ROAMINGPROFILE", "USERDOMAIN", - "windir", + "WINDIR", ] + // vec![ + // "!C:", + // "!D:", + // "=::", + // "ALLUSERSPROFILE", + // "APPDATA", + // "CMD_DURATION_MS", + // "COMMONPROGRAMFILES", + // "COMMONPROGRAMFILES(\"X86\")", + // "COMMONPROGRAMW6432", + // "COMPUTERNAME", + // "COMSPEC", + // "CONDA_PREFIX", + // "CURRENT_FILE", + // "DIRS_POSITION", + // "DriverData", + // "EFC_5504", + // "FILE_PWD", + // "HOMEDRIVE", + // "HOMEPATH", + // "IDEA_INITIAL_DIRECTORY", + // "LAST_EXIT_CODE", + // "LOCALAPPDATA", + // "LOGONSERVER", + // "NUMBER_OF_PROCESSORS", + // "NU_LOG_DATE_FORMAT", + // "NU_LOG_FORMAT", + // "NU_VERSION", + // "OLDPWD", + // "OneDrive", + // "OneDriveConsumer", + // "OS", + // "PATH", + // "PATHEXT", + // "PROCESSOR_ARCHITECTURE", + // "PROCESSOR_IDENTIFIER", + // "PROCESSOR_LEVEL", + // "PROCESSOR_REVISION", + // "PROGRAMDATA", + // "PROGRAMFILES", + // "PROGRAMFILES(\"X86\")", + // "PROGRAMW6432", + // "PROMPT", + // "PROMPT_INDICATOR", + // "PROMPT_MULTILINE_INDICATOR", + // "PSMODULEPATH", + // "PUBLIC", + // "PWD", + // "SESSIONNAME", + // "STARSHIP_SESSION_KEY", + // "STARSHIP_SHELL", + // "SYSTEMDRIVE", + // "SYSTEMROOT", + // "TEMP", + // "TERMINAL_EMULATOR", + // "TERM_SESSION_ID", + // "TMP", + // "USERDOMAIN", + // "USERDOMAIN_ROAMINGPROFILE", + // "USERNAME", + // "USERPROFILE", + // "WINDIR", + // "WIX", + // "TERM", + // "HOME", + // ] } else { vec![] }; - #[cfg(target_os = "windows")] - let path = env - .get("Path") - .map(|path| { - let path = path.split(';').collect::>(); - let path = path - .iter() - .filter(|p| p.to_lowercase().contains(":\\windows")) - .join(";"); - path - }) - .expect("Could not find PATH in environment variables"); - let keys = unix_keys .into_iter() .chain(macos_keys) .chain(windows_keys) + .map(|s| s.to_string().to_uppercase()) .collect_vec(); - let env = env - .into_iter() - .filter(|(key, _)| keys.contains(&key.as_str())) - .collect(); - - #[cfg(target_os = "windows")] - let env = env + env .into_iter() - .chain(vec![("PATH".to_string(), path)]) - .collect(); + .filter(|(key, _)| keys.contains(&key.to_string().to_uppercase())) + .collect::>() - env } /// Determine the environment variables that need to be set in an interactive shell to make it diff --git a/src/cli/run.rs b/src/cli/run.rs index 7b36d327b..2e3312a03 100644 --- a/src/cli/run.rs +++ b/src/cli/run.rs @@ -263,7 +263,33 @@ pub async fn get_task_env<'p>( if clean_env { let mut env = get_clean_environment_variables(); + + // Extend with the activation environment env.extend(activation_env); + + // On Windows we need to keep part of the old path and insert the newly generate path from activation script + if cfg!(target_os = "windows") { + let pixi_path = env + .get("Path") + .into_iter() + .flat_map(|p| std::env::split_paths(p)); + // dbg!(&pixi_path); + let path = std::env::var_os("Path") + .map(|path| { + let path = std::env::split_paths(&path) + .filter(|p| p.to_string_lossy().contains(":\\Windows")) + .chain(pixi_path.into_iter()); + std::env::join_paths(path).expect("Could not join paths") + }) + .expect("Could not find PATH in environment variables"); + env.insert( + "PATH".to_string(), + path.to_str() + .expect("Path contains non-utf8 paths") + .to_string(), + ); + } + return Ok(env); } From 1c48d8c17190f385b96f881c4dfc899614c34153 Mon Sep 17 00:00:00 2001 From: "Ruben Arts(win)" Date: Fri, 7 Jun 2024 10:26:19 +0200 Subject: [PATCH 10/20] fix: fmt and cleanup --- examples/cpp-sdl/pixi.lock | 168 +++++++++++++++++++++++++++++++++++-- examples/cpp-sdl/pixi.toml | 1 + pixi.toml | 3 +- src/activation.rs | 4 +- 4 files changed, 165 insertions(+), 11 deletions(-) diff --git a/examples/cpp-sdl/pixi.lock b/examples/cpp-sdl/pixi.lock index 2f6aa1c1c..4a15466ec 100644 --- a/examples/cpp-sdl/pixi.lock +++ b/examples/cpp-sdl/pixi.lock @@ -1,4 +1,4 @@ -version: 4 +version: 5 environments: build: channels: @@ -26,6 +26,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx-11.4.0-h7baecda_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_impl_linux-64-11.4.0-h7aa1c59_4.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_linux-64-11.4.0-hfc1ae95_2.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/kernel-headers_linux-64-2.6.32-he073ed8_16.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/keyutils-1.6.1-h166bdaf_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/krb5-1.21.2-h659d440_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/lame-3.100-h166bdaf_1003.tar.bz2 @@ -37,6 +38,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.5.0-hcb278e6_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/libflac-1.4.3-h59595ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/libgcc-devel_linux-64-11.4.0-h922705a_104.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-13.2.0-h807b86a_4.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcrypt-1.10.3-hd590300_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libglib-2.78.3-h783c2da_0.conda @@ -49,6 +51,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/libsanitizer-11.4.0-h4dcbe23_4.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libsndfile-1.2.2-hc60ed4a_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.11.0-h0841786_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/libstdcxx-devel_linux-64-11.4.0-h922705a_104.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-13.2.0-h7e041cc_4.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libsystemd0-255-h3516f8a_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libuv-1.46.0-hd590300_0.conda @@ -56,6 +59,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/libxcb-1.15-h0b41bf4_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-hd590300_5.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/lz4-c-1.9.4-hcb278e6_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/make-4.3-hd18ef5c_1.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/mpg123-1.32.4-h59595ed_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.4-h59595ed_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/ninja-1.11.1-h924138e_0.conda @@ -65,6 +69,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/pulseaudio-client-16.1-hb77b528_5.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/rhash-1.4.3-hd590300_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/sdl2-2.26.5-h949db6a_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sysroot_linux-64-2.12-he073ed8_16.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-kbproto-1.0.7-h7f98852_1002.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libx11-1.8.7-h8ee46fc_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxau-1.0.11-hd590300_0.conda @@ -75,12 +80,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/zlib-1.2.13-hd590300_5.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.5-hfc55251_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/kernel-headers_linux-64-2.6.32-he073ed8_16.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/libgcc-devel_linux-64-11.4.0-h922705a_104.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/libstdcxx-devel_linux-64-11.4.0-h922705a_104.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/sysroot_linux-64-2.12-he073ed8_16.conda osx-64: - - conda: https://conda.anaconda.org/conda-forge/noarch/compiler-rt_osx-64-14.0.6-hab78ec2_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-h10d778d_5.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/c-ares-1.26.0-h10d778d_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/c-compiler-1.5.2-hbf74d83_0.conda @@ -94,6 +94,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/clangxx_osx-64-14.0.6-h6f97653_6.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/cmake-3.26.4-hf40c264_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/compiler-rt-14.0.6-h613da45_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/compiler-rt_osx-64-14.0.6-hab78ec2_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/osx-64/cxx-compiler-1.5.2-hb8565cd_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/expat-2.5.0-hf0c8a7f_1.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/krb5-1.21.2-hb884880_0.conda @@ -112,6 +113,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.2.13-h8a1eda9_5.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/llvm-openmp-17.0.6-hb6ac08f_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/llvm-tools-14.0.6-hc8e404f_4.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/make-4.3-h22f3db7_1.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.4-h93d8f39_2.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/ninja-1.11.1-hb8565cd_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/openssl-3.2.0-hd75f5a5_1.conda @@ -123,7 +125,6 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/zlib-1.2.13-h8a1eda9_5.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.5-h829000d_0.conda osx-arm64: - - conda: https://conda.anaconda.org/conda-forge/noarch/compiler-rt_osx-arm64-14.0.6-h48302dc_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/osx-arm64/bzip2-1.0.8-h93a5062_5.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/c-ares-1.26.0-h93a5062_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/c-compiler-1.5.2-h5008568_0.conda @@ -137,6 +138,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/clangxx_osx-arm64-14.0.6-he29aa18_6.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/cmake-3.26.4-hc0af03a_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/compiler-rt-14.0.6-h30b49de_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/compiler-rt_osx-arm64-14.0.6-h48302dc_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/osx-arm64/cxx-compiler-1.5.2-hffc8910_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/expat-2.5.0-hb7217d7_1.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/krb5-1.21.2-h92f50d5_0.conda @@ -155,6 +157,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libzlib-1.2.13-h53f4e23_5.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/llvm-openmp-17.0.6-hcd81f8e_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/llvm-tools-14.0.6-hd1a9a77_4.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/make-4.3-he57ea6c_1.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/osx-arm64/ncurses-6.4-h463b476_2.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/ninja-1.11.1-hffc8910_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/openssl-3.2.0-h0d3ecfb_1.conda @@ -168,6 +171,13 @@ environments: win-64: - conda: https://conda.anaconda.org/conda-forge/win-64/cmake-3.26.4-h1537add_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/cxx-compiler-1.5.2-h91493d7_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/m2w64-gcc-libgfortran-5.3.0-6.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/m2w64-gcc-libs-5.3.0-7.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/m2w64-gcc-libs-core-5.3.0-7.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/m2w64-gmp-6.1.0-2.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/m2w64-libwinpthread-git-5.0.0.4634.697f757-2.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/make-4.3-h3d2af85_1.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/msys2-conda-epoch-20160418-1.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/ninja-1.11.1-h91493d7_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/sdl2-2.26.5-h63175ca_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_0.tar.bz2 @@ -2208,6 +2218,139 @@ packages: license_family: BSD size: 143402 timestamp: 1674727076728 +- kind: conda + name: m2w64-gcc-libgfortran + version: 5.3.0 + build: '6' + build_number: 6 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/m2w64-gcc-libgfortran-5.3.0-6.tar.bz2 + sha256: 9de95a7996d5366ae0808eef2acbc63f9b11b874aa42375f55379e6715845dc6 + md5: 066552ac6b907ec6d72c0ddab29050dc + depends: + - m2w64-gcc-libs-core + - msys2-conda-epoch ==20160418 + license: GPL, LGPL, FDL, custom + size: 350687 + timestamp: 1608163451316 +- kind: conda + name: m2w64-gcc-libs + version: 5.3.0 + build: '7' + build_number: 7 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/m2w64-gcc-libs-5.3.0-7.tar.bz2 + sha256: 3bd1ab02b7c89a5b153a17be03b36d833f1517ff2a6a77ead7c4a808b88196aa + md5: fe759119b8b3bfa720b8762c6fdc35de + depends: + - m2w64-gcc-libgfortran + - m2w64-gcc-libs-core + - m2w64-gmp + - m2w64-libwinpthread-git + - msys2-conda-epoch ==20160418 + license: GPL3+, partial:GCCRLE, partial:LGPL2+ + size: 532390 + timestamp: 1608163512830 +- kind: conda + name: m2w64-gcc-libs-core + version: 5.3.0 + build: '7' + build_number: 7 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/m2w64-gcc-libs-core-5.3.0-7.tar.bz2 + sha256: 58afdfe859ed2e9a9b1cc06bc408720cb2c3a6a132e59d4805b090d7574f4ee0 + md5: 4289d80fb4d272f1f3b56cfe87ac90bd + depends: + - m2w64-gmp + - m2w64-libwinpthread-git + - msys2-conda-epoch ==20160418 + license: GPL3+, partial:GCCRLE, partial:LGPL2+ + size: 219240 + timestamp: 1608163481341 +- kind: conda + name: m2w64-gmp + version: 6.1.0 + build: '2' + build_number: 2 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/m2w64-gmp-6.1.0-2.tar.bz2 + sha256: 7e3cd95f554660de45f8323fca359e904e8d203efaf07a4d311e46d611481ed1 + md5: 53a1c73e1e3d185516d7e3af177596d9 + depends: + - msys2-conda-epoch ==20160418 + license: LGPL3 + size: 743501 + timestamp: 1608163782057 +- kind: conda + name: m2w64-libwinpthread-git + version: 5.0.0.4634.697f757 + build: '2' + build_number: 2 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/m2w64-libwinpthread-git-5.0.0.4634.697f757-2.tar.bz2 + sha256: f63a09b2cae7defae0480f1740015d6235f1861afa6fe2e2d3e10bd0d1314ee0 + md5: 774130a326dee16f1ceb05cc687ee4f0 + depends: + - msys2-conda-epoch ==20160418 + license: MIT, BSD + size: 31928 + timestamp: 1608166099896 +- kind: conda + name: make + version: '4.3' + build: h22f3db7_1 + build_number: 1 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/make-4.3-h22f3db7_1.tar.bz2 + sha256: adef15126b518548b69ecaef24e22f88fa0a6358bd3c11e791af214f7344983b + md5: ac4a1dd58e6d821c518ae0011e8592b7 + license: GPL-3.0-or-later + license_family: GPL + size: 255465 + timestamp: 1602706542653 +- kind: conda + name: make + version: '4.3' + build: h3d2af85_1 + build_number: 1 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/make-4.3-h3d2af85_1.tar.bz2 + sha256: f31b00c710df71f2f75c641272ecb1f9bd1e15a5a77510055120641215487fbb + md5: c3be283d3d278c379b50137a2a17f869 + depends: + - m2w64-gcc-libs + license: GPL-3.0-or-later + license_family: GPL + size: 6245358 + timestamp: 1602706995515 +- kind: conda + name: make + version: '4.3' + build: hd18ef5c_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/make-4.3-hd18ef5c_1.tar.bz2 + sha256: 4a5fe7c80bb0de0015328e2d3fc8db1736f528cb1fd53cd0d5527e24269a4f7c + md5: 4049ebfd3190b580dffe76daed26155a + depends: + - libgcc-ng >=7.5.0 + license: GPL-3.0-or-later + license_family: GPL + size: 518896 + timestamp: 1602706451788 +- kind: conda + name: make + version: '4.3' + build: he57ea6c_1 + build_number: 1 + subdir: osx-arm64 + url: https://conda.anaconda.org/conda-forge/osx-arm64/make-4.3-he57ea6c_1.tar.bz2 + sha256: a011e3e1c4caec821eb4213d0a0154d39e5f81a44d2e8bafe6f84e7840c3909e + md5: 1939d04ef89e38fde652ee8c669e092f + license: GPL-3.0-or-later + license_family: GPL + size: 253227 + timestamp: 1602706492919 - kind: conda name: mpg123 version: 1.32.4 @@ -2223,6 +2366,17 @@ packages: license_family: LGPL size: 491061 timestamp: 1704980200966 +- kind: conda + name: msys2-conda-epoch + version: '20160418' + build: '1' + build_number: 1 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/msys2-conda-epoch-20160418-1.tar.bz2 + sha256: 99358d58d778abee4dca82ad29fb58058571f19b0f86138363c260049d4ac7f1 + md5: b0309b72560df66f71a9d5e34a5efdfa + size: 3227 + timestamp: 1608166968312 - kind: conda name: ncurses version: '6.4' diff --git a/examples/cpp-sdl/pixi.toml b/examples/cpp-sdl/pixi.toml index 642089f86..82353b989 100644 --- a/examples/cpp-sdl/pixi.toml +++ b/examples/cpp-sdl/pixi.toml @@ -18,6 +18,7 @@ sdl2 = "2.26.5.*" cmake = "3.26.4.*" cxx-compiler = "1.5.2.*" ninja = "1.11.1.*" +make = ">=4.3,<5" [feature.build.tasks.configure] # Configures CMake diff --git a/pixi.toml b/pixi.toml index a14e922ca..762027ba2 100644 --- a/pixi.toml +++ b/pixi.toml @@ -41,7 +41,7 @@ compilers = ">=1.6.0" platforms = ["linux-64"] [feature.clean-env.tasks] -##install = { cmd = "cargo install --path . --locked", clean-env = true} +clean-install = { cmd = "cargo install --path . --locked", clean-env = true} [feature.clean-env.dependencies] cmake = ">=3.29.3,<3.30" @@ -85,3 +85,4 @@ taplo = ">=0.9.1,<0.10" clean = { features = ["clean-env"] } docs = { features = ["docs"], no-default-feature = true } schema = { features = ["schema"], no-default-feature = true } + diff --git a/src/activation.rs b/src/activation.rs index cefffa20e..8ab057582 100644 --- a/src/activation.rs +++ b/src/activation.rs @@ -358,11 +358,9 @@ pub fn get_clean_environment_variables() -> HashMap { .map(|s| s.to_string().to_uppercase()) .collect_vec(); - env - .into_iter() + env.into_iter() .filter(|(key, _)| keys.contains(&key.to_string().to_uppercase())) .collect::>() - } /// Determine the environment variables that need to be set in an interactive shell to make it From 07f34b88ee35c7cecd7a09f40de1870846bff83c Mon Sep 17 00:00:00 2001 From: "Ruben Arts(win)" Date: Fri, 7 Jun 2024 10:28:39 +0200 Subject: [PATCH 11/20] fix: cargo lock --- Cargo.lock | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index c80ab3052..ab988d7fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6807,3 +6807,13 @@ dependencies = [ "quote", "syn 1.0.109", ] + +[[patch.unused]] +name = "rattler" +version = "0.26.4" +source = "git+https://github.com/mamba-org/rattler?branch=main#3569b59f8d4553f7159a32c7bb0a412a2e0d4fe6" + +[[patch.unused]] +name = "rattler_solve" +version = "0.24.2" +source = "git+https://github.com/mamba-org/rattler?branch=main#3569b59f8d4553f7159a32c7bb0a412a2e0d4fe6" From 0224dd278dc2093c917c9961987b6ceef41df601 Mon Sep 17 00:00:00 2001 From: "Ruben Arts(win)" Date: Fri, 7 Jun 2024 10:28:47 +0200 Subject: [PATCH 12/20] fix: cargo lock --- Cargo.lock | 415 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 252 insertions(+), 163 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ab988d7fd..ba8861d16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -224,9 +224,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" +checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" dependencies = [ "async-task", "concurrent-queue", @@ -337,7 +337,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -372,7 +372,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -552,12 +552,11 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "blocking" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ "async-channel", - "async-lock 3.3.0", "async-task", "futures-io", "futures-lite 2.3.0", @@ -577,9 +576,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -839,7 +838,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -1002,7 +1001,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -1013,7 +1012,7 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ "darling_core", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -1081,7 +1080,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -1146,7 +1145,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -1154,7 +1153,7 @@ name = "distribution-filename" version = "0.0.1" source = "git+https://github.com/astral-sh/uv?tag=0.1.38#0b23caa18d7eb2f874d73e57b7b4bdf35e881a46" dependencies = [ - "pep440_rs", + "pep440_rs 0.5.0", "platform-tags", "rkyv", "serde", @@ -1175,8 +1174,8 @@ dependencies = [ "git2", "itertools 0.12.1", "once_cell", - "pep440_rs", - "pep508_rs", + "pep440_rs 0.5.0", + "pep508_rs 0.4.2", "platform-tags", "pypi-types", "rkyv", @@ -1246,7 +1245,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -1258,7 +1257,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -1279,7 +1278,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -1385,10 +1384,23 @@ checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "file_url" version = "0.1.1" -source = "git+https://github.com/mamba-org/rattler?branch=main#ed561f34c117bfb7dab912fc8bc2f47ed0f38d9c" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd0e1a8a0c7a1829090615ebce07ebf31911031a08915ca869f1085f0e39032" +dependencies = [ + "itertools 0.12.1", + "percent-encoding", + "typed-path", + "url", +] + +[[package]] +name = "file_url" +version = "0.1.2" +source = "git+https://github.com/mamba-org/rattler?branch=main#3569b59f8d4553f7159a32c7bb0a412a2e0d4fe6" dependencies = [ "itertools 0.12.1", "percent-encoding", + "thiserror", "typed-path", "url", ] @@ -1571,7 +1583,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -2098,9 +2110,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "3d8d52be92d09acc2e01dddb7fde3ad983fc6489c7db4837e605bc3fca4cb63e" dependencies = [ "bytes", "futures-channel", @@ -2240,7 +2252,7 @@ dependencies = [ "mailparse", "once_cell", "pathdiff", - "pep440_rs", + "pep440_rs 0.5.0", "platform-info", "platform-tags", "pypi-types", @@ -2256,7 +2268,7 @@ dependencies = [ "uv-fs", "uv-normalize", "walkdir", - "zip 1.3.1", + "zip 1.1.4", ] [[package]] @@ -2421,7 +2433,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -2492,9 +2504,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.16" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" +checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" dependencies = [ "cc", "libc", @@ -2546,12 +2558,6 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "lockfree-object-pool" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" - [[package]] name = "log" version = "0.4.21" @@ -2670,7 +2676,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -2681,7 +2687,7 @@ checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -2915,6 +2921,27 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "number_prefix" version = "0.4.0" @@ -2974,7 +3001,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -3033,9 +3060,9 @@ dependencies = [ [[package]] name = "ouroboros" -version = "0.18.3" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b7be5a8a3462b752f4be3ff2b2bf2f7f1d00834902e46be2a4d68b87b0573c" +checksum = "944fa20996a25aded6b4795c6d63f10014a7a83f8be9828a11860b08c5fc4a67" dependencies = [ "aliasable", "ouroboros_macro", @@ -3044,16 +3071,16 @@ dependencies = [ [[package]] name = "ouroboros_macro" -version = "0.18.3" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b645dcde5f119c2c454a92d0dfa271a2a3b205da92e4292a68ead4bdbfde1f33" +checksum = "39b0deead1528fd0e5947a8546a9642a9777c25f6e1e26f34c97b204bbb465bd" dependencies = [ "heck 0.4.1", "itertools 0.12.1", "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -3087,9 +3114,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core 0.9.10", @@ -3174,6 +3201,18 @@ dependencies = [ "unscanny", ] +[[package]] +name = "pep440_rs" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca0a570e7ec9171250cac57614e901f62408094b54b3798bb920d3cf0d4a0e09" +dependencies = [ + "once_cell", + "serde", + "unicode-width", + "unscanny", +] + [[package]] name = "pep508_rs" version = "0.4.2" @@ -3181,7 +3220,7 @@ source = "git+https://github.com/astral-sh/uv?tag=0.1.38#0b23caa18d7eb2f874d73e5 dependencies = [ "derivative", "once_cell", - "pep440_rs", + "pep440_rs 0.5.0", "regex", "serde", "thiserror", @@ -3191,6 +3230,23 @@ dependencies = [ "uv-normalize", ] +[[package]] +name = "pep508_rs" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581c27e97a3f38c5d691962af7da93c2672b5227d59cf165b87a9b1fd53dd724" +dependencies = [ + "derivative", + "once_cell", + "pep440_rs 0.6.0", + "regex", + "serde", + "thiserror", + "unicode-width", + "url", + "urlencoding", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -3237,7 +3293,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", "unicase", ] @@ -3268,7 +3324,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -3333,14 +3389,14 @@ dependencies = [ "minijinja", "nix 0.28.0", "once_cell", - "parking_lot 0.12.2", - "pep440_rs", - "pep508_rs", + "parking_lot 0.12.3", + "pep440_rs 0.5.0", + "pep508_rs 0.4.2", "platform-tags", "pypi-types", "pyproject-toml", "rattler", - "rattler_conda_types", + "rattler_conda_types 0.23.1", "rattler_digest", "rattler_lock", "rattler_networking", @@ -3390,7 +3446,7 @@ dependencies = [ "uv-types", "winapi", "xxhash-rust", - "zip 1.3.1", + "zip 1.1.4", ] [[package]] @@ -3484,9 +3540,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "priority-queue" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "509354d8a769e8d0b567d6821b84495c60213162761a732d68ce87c964bd347f" +checksum = "70c501afe3a2e25c9bd219aa56ec1e04cdb3fcdd763055be268778c13fa82c1f" dependencies = [ "autocfg", "equivalent", @@ -3505,9 +3561,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.83" +version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" +checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" dependencies = [ "unicode-ident", ] @@ -3520,7 +3576,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", "version_check", "yansi", ] @@ -3581,8 +3637,8 @@ dependencies = [ "indexmap 2.2.6", "mailparse", "once_cell", - "pep440_rs", - "pep508_rs", + "pep440_rs 0.5.0", + "pep508_rs 0.4.2", "regex", "rkyv", "serde", @@ -3600,8 +3656,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b80f889b6d413c3f8963a2c7db03f95dd6e1d85e1074137cb2013ea2faa8898" dependencies = [ "indexmap 2.2.6", - "pep440_rs", - "pep508_rs", + "pep440_rs 0.5.0", + "pep508_rs 0.4.2", "serde", "toml", ] @@ -3669,7 +3725,8 @@ dependencies = [ [[package]] name = "rattler" version = "0.25.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#ed561f34c117bfb7dab912fc8bc2f47ed0f38d9c" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dd3466c926bb2be12b6b490707ba8697e213fead038471b6f294e51fa5d651e" dependencies = [ "anyhow", "bytes", @@ -3685,7 +3742,7 @@ dependencies = [ "memchr", "memmap2 0.9.4", "once_cell", - "rattler_conda_types", + "rattler_conda_types 0.23.1", "rattler_digest", "rattler_networking", "rattler_package_streaming", @@ -3707,10 +3764,40 @@ dependencies = [ [[package]] name = "rattler_conda_types" version = "0.23.1" -source = "git+https://github.com/mamba-org/rattler?branch=main#ed561f34c117bfb7dab912fc8bc2f47ed0f38d9c" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "710bd78894e121340be092497bc04df739e6e4c7e2db33afc2053f2285fd98f7" +dependencies = [ + "chrono", + "file_url 0.1.1", + "fxhash", + "glob", + "hex", + "itertools 0.12.1", + "lazy-regex", + "nom", + "purl", + "rattler_digest", + "rattler_macros 0.19.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex", + "serde", + "serde_json", + "serde_repr", + "serde_with", + "smallvec", + "strum", + "thiserror", + "tracing", + "typed-path", + "url", +] + +[[package]] +name = "rattler_conda_types" +version = "0.25.2" +source = "git+https://github.com/mamba-org/rattler?branch=main#3569b59f8d4553f7159a32c7bb0a412a2e0d4fe6" dependencies = [ "chrono", - "file_url", + "file_url 0.1.2", "fxhash", "glob", "hex", @@ -3719,7 +3806,7 @@ dependencies = [ "nom", "purl", "rattler_digest", - "rattler_macros", + "rattler_macros 0.19.3 (git+https://github.com/mamba-org/rattler?branch=main)", "regex", "serde", "serde_json", @@ -3736,7 +3823,7 @@ dependencies = [ [[package]] name = "rattler_digest" version = "0.19.4" -source = "git+https://github.com/mamba-org/rattler?branch=main#ed561f34c117bfb7dab912fc8bc2f47ed0f38d9c" +source = "git+https://github.com/mamba-org/rattler?branch=main#3569b59f8d4553f7159a32c7bb0a412a2e0d4fe6" dependencies = [ "blake2", "digest", @@ -3751,18 +3838,18 @@ dependencies = [ [[package]] name = "rattler_lock" -version = "0.22.7" -source = "git+https://github.com/mamba-org/rattler?branch=main#ed561f34c117bfb7dab912fc8bc2f47ed0f38d9c" +version = "0.22.12" +source = "git+https://github.com/mamba-org/rattler?branch=main#3569b59f8d4553f7159a32c7bb0a412a2e0d4fe6" dependencies = [ "chrono", - "file_url", + "file_url 0.1.2", "fxhash", "indexmap 2.2.6", "itertools 0.12.1", - "pep440_rs", - "pep508_rs", + "pep440_rs 0.6.0", + "pep508_rs 0.6.0", "purl", - "rattler_conda_types", + "rattler_conda_types 0.25.2", "rattler_digest", "serde", "serde_json", @@ -3776,29 +3863,42 @@ dependencies = [ [[package]] name = "rattler_macros" version = "0.19.3" -source = "git+https://github.com/mamba-org/rattler?branch=main#ed561f34c117bfb7dab912fc8bc2f47ed0f38d9c" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cef20e8356ea6840294e5754c6a8663b0eb1b97f29d517642f0f99215a2483" +dependencies = [ + "quote", + "syn 2.0.66", +] + +[[package]] +name = "rattler_macros" +version = "0.19.3" +source = "git+https://github.com/mamba-org/rattler?branch=main#3569b59f8d4553f7159a32c7bb0a412a2e0d4fe6" dependencies = [ "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] name = "rattler_networking" -version = "0.20.7" -source = "git+https://github.com/mamba-org/rattler?branch=main#ed561f34c117bfb7dab912fc8bc2f47ed0f38d9c" +version = "0.20.8" +source = "git+https://github.com/mamba-org/rattler?branch=main#3569b59f8d4553f7159a32c7bb0a412a2e0d4fe6" dependencies = [ "anyhow", "async-trait", "base64 0.22.1", + "bytes", "chrono", "dirs", "fslock", + "futures", "getrandom", "google-cloud-auth", "http 1.1.0", "itertools 0.12.1", "keyring", "netrc-rs", + "pin-project-lite", "reqwest 0.12.4", "reqwest-middleware", "retry-policies", @@ -3812,13 +3912,14 @@ dependencies = [ [[package]] name = "rattler_package_streaming" version = "0.20.10" -source = "git+https://github.com/mamba-org/rattler?branch=main#ed561f34c117bfb7dab912fc8bc2f47ed0f38d9c" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9c3dec9d831f11c0d768f1ec06cd086dca71522326ef2a922541e6dce7a26e7" dependencies = [ "bzip2", "chrono", "futures-util", "num_cpus", - "rattler_conda_types", + "rattler_conda_types 0.23.1", "rattler_digest", "rattler_networking", "reqwest 0.12.4", @@ -3836,8 +3937,8 @@ dependencies = [ [[package]] name = "rattler_repodata_gateway" -version = "0.20.1" -source = "git+https://github.com/mamba-org/rattler?branch=main#ed561f34c117bfb7dab912fc8bc2f47ed0f38d9c" +version = "0.20.5" +source = "git+https://github.com/mamba-org/rattler?branch=main#3569b59f8d4553f7159a32c7bb0a412a2e0d4fe6" dependencies = [ "anyhow", "async-compression", @@ -3848,7 +3949,7 @@ dependencies = [ "chrono", "dashmap", "dirs", - "file_url", + "file_url 0.1.2", "futures", "hex", "http 1.1.0", @@ -3861,10 +3962,10 @@ dependencies = [ "md-5", "memmap2 0.9.4", "ouroboros", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "percent-encoding", "pin-project-lite", - "rattler_conda_types", + "rattler_conda_types 0.25.2", "rattler_digest", "rattler_networking", "reqwest 0.12.4", @@ -3873,6 +3974,7 @@ dependencies = [ "serde", "serde_json", "serde_with", + "simple_spawn_blocking", "superslice", "tempfile", "thiserror", @@ -3886,13 +3988,13 @@ dependencies = [ [[package]] name = "rattler_shell" -version = "0.20.4" -source = "git+https://github.com/mamba-org/rattler?branch=main#ed561f34c117bfb7dab912fc8bc2f47ed0f38d9c" +version = "0.20.9" +source = "git+https://github.com/mamba-org/rattler?branch=main#3569b59f8d4553f7159a32c7bb0a412a2e0d4fe6" dependencies = [ "enum_dispatch", "indexmap 2.2.6", "itertools 0.12.1", - "rattler_conda_types", + "rattler_conda_types 0.25.2", "serde_json", "shlex", "sysinfo", @@ -3904,12 +4006,13 @@ dependencies = [ [[package]] name = "rattler_solve" version = "0.22.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#ed561f34c117bfb7dab912fc8bc2f47ed0f38d9c" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0b59c35fc267367537679c047e945a08f25458219212acd6335805fde8280bb" dependencies = [ "chrono", "futures", "itertools 0.12.1", - "rattler_conda_types", + "rattler_conda_types 0.23.1", "rattler_digest", "resolvo", "tempfile", @@ -3920,15 +4023,15 @@ dependencies = [ [[package]] name = "rattler_virtual_packages" -version = "0.19.11" -source = "git+https://github.com/mamba-org/rattler?branch=main#ed561f34c117bfb7dab912fc8bc2f47ed0f38d9c" +version = "0.19.15" +source = "git+https://github.com/mamba-org/rattler?branch=main#3569b59f8d4553f7159a32c7bb0a412a2e0d4fe6" dependencies = [ "archspec", "libloading", "nom", "once_cell", "plist", - "rattler_conda_types", + "rattler_conda_types 0.25.2", "regex", "serde", "thiserror", @@ -4078,7 +4181,7 @@ version = "0.0.1" source = "git+https://github.com/astral-sh/uv?tag=0.1.38#0b23caa18d7eb2f874d73e57b7b4bdf35e881a46" dependencies = [ "fs-err", - "pep508_rs", + "pep508_rs 0.4.2", "regex", "serde", "tracing", @@ -4340,7 +4443,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.65", + "syn 2.0.66", "unicode-ident", ] @@ -4614,9 +4717,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.202" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] @@ -4634,13 +4737,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.202" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -4663,7 +4766,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -4714,7 +4817,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -4739,7 +4842,7 @@ dependencies = [ "futures", "log", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "scc", "serial_test_derive", ] @@ -4752,7 +4855,7 @@ checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -4834,12 +4937,6 @@ dependencies = [ "libc", ] -[[package]] -name = "simd-adler32" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" - [[package]] name = "simdutf8" version = "0.1.4" @@ -4864,6 +4961,14 @@ dependencies = [ "time", ] +[[package]] +name = "simple_spawn_blocking" +version = "1.0.0" +source = "git+https://github.com/mamba-org/rattler?branch=main#3569b59f8d4553f7159a32c7bb0a412a2e0d4fe6" +dependencies = [ + "tokio", +] + [[package]] name = "siphasher" version = "0.3.11" @@ -4994,7 +5099,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -5043,9 +5148,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.65" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", @@ -5194,7 +5299,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -5270,7 +5375,7 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", "socket2 0.5.7", @@ -5286,7 +5391,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -5419,7 +5524,6 @@ dependencies = [ "tokio", "tower-layer", "tower-service", - "tracing", ] [[package]] @@ -5440,7 +5544,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -5454,7 +5557,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -5663,8 +5766,8 @@ dependencies = [ "indoc", "itertools 0.12.1", "once_cell", - "pep440_rs", - "pep508_rs", + "pep440_rs 0.5.0", + "pep508_rs 0.4.2", "regex", "rustc-hash", "serde", @@ -5722,8 +5825,8 @@ dependencies = [ "html-escape", "http 1.1.0", "install-wheel-rs", - "pep440_rs", - "pep508_rs", + "pep440_rs 0.5.0", + "pep508_rs 0.4.2", "platform-tags", "pypi-types", "reqwest 0.12.4", @@ -5758,7 +5861,7 @@ source = "git+https://github.com/astral-sh/uv?tag=0.1.38#0b23caa18d7eb2f874d73e5 dependencies = [ "anyhow", "itertools 0.12.1", - "pep508_rs", + "pep508_rs 0.4.2", "platform-tags", "rustc-hash", "serde", @@ -5777,7 +5880,7 @@ dependencies = [ "futures", "install-wheel-rs", "itertools 0.12.1", - "pep508_rs", + "pep508_rs 0.4.2", "rustc-hash", "tracing", "uv-build", @@ -5804,8 +5907,8 @@ dependencies = [ "install-wheel-rs", "nanoid", "once_cell", - "pep440_rs", - "pep508_rs", + "pep440_rs 0.5.0", + "pep508_rs 0.4.2", "platform-tags", "pypi-types", "reqwest 0.12.4", @@ -5827,7 +5930,7 @@ dependencies = [ "uv-git", "uv-normalize", "uv-types", - "zip 1.3.1", + "zip 1.1.4", ] [[package]] @@ -5849,7 +5952,7 @@ dependencies = [ "tokio-tar", "tokio-util", "tracing", - "zip 1.3.1", + "zip 1.1.4", ] [[package]] @@ -5906,8 +6009,8 @@ dependencies = [ "fs-err", "futures", "install-wheel-rs", - "pep440_rs", - "pep508_rs", + "pep440_rs 0.5.0", + "pep508_rs 0.4.2", "platform-tags", "pypi-types", "rayon", @@ -5943,8 +6046,8 @@ dependencies = [ "fs-err", "install-wheel-rs", "once_cell", - "pep440_rs", - "pep508_rs", + "pep440_rs 0.5.0", + "pep508_rs 0.4.2", "platform-tags", "pypi-types", "regex", @@ -5993,8 +6096,8 @@ dependencies = [ "once-map", "once_cell", "owo-colors", - "pep440_rs", - "pep508_rs", + "pep440_rs 0.5.0", + "pep508_rs 0.4.2", "petgraph", "platform-tags", "pubgrub", @@ -6027,8 +6130,8 @@ dependencies = [ "fs-err", "futures", "once_cell", - "pep440_rs", - "pep508_rs", + "pep440_rs 0.5.0", + "pep508_rs 0.4.2", "reqwest 0.12.4", "reqwest-middleware", "tempfile", @@ -6049,8 +6152,8 @@ dependencies = [ "anyhow", "distribution-types", "once-map", - "pep440_rs", - "pep508_rs", + "pep440_rs 0.5.0", + "pep508_rs 0.4.2", "pypi-types", "requirements-txt", "rustc-hash", @@ -6168,7 +6271,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", "wasm-bindgen-shared", ] @@ -6202,7 +6305,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6358,7 +6461,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -6369,7 +6472,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] @@ -6689,14 +6792,14 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.66", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zip" @@ -6713,9 +6816,9 @@ dependencies = [ [[package]] name = "zip" -version = "1.3.1" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b7a5a9285bd4ee13bdeb3f8a4917eb46557e53f270c783849db8bef37b0ad00" +checksum = "9cc23c04387f4da0374be4533ad1208cbb091d5c11d070dfef13676ad6497164" dependencies = [ "arbitrary", "crc32fast", @@ -6723,23 +6826,9 @@ dependencies = [ "displaydoc", "flate2", "indexmap 2.2.6", + "num_enum", "thiserror", "time", - "zopfli", -] - -[[package]] -name = "zopfli" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" -dependencies = [ - "bumpalo", - "crc32fast", - "lockfree-object-pool", - "log", - "once_cell", - "simd-adler32", ] [[package]] From 434bc44f404f157ad11a3195ef0679392195fd8d Mon Sep 17 00:00:00 2001 From: "Ruben Arts(win)" Date: Fri, 7 Jun 2024 10:45:42 +0200 Subject: [PATCH 13/20] fix: remove unsupported work from toml --- pixi.lock | 169 ------------------------------------------------------ pixi.toml | 14 ----- 2 files changed, 183 deletions(-) diff --git a/pixi.lock b/pixi.lock index fd006fb54..2320b724c 100644 --- a/pixi.lock +++ b/pixi.lock @@ -1,45 +1,5 @@ version: 5 environments: - clean: - channels: - - url: https://fast.prefix.dev/conda-forge/ - packages: - linux-64: - - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-hd590300_5.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.28.1-hd590300_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.6.2-hbcca054_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/cmake-3.29.4-h91dbaaa_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/coreutils-9.5-hd590300_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/findutils-4.6.0-h166bdaf_1001.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/gettext-0.22.5-h59595ed_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/gettext-tools-0.22.5-h59595ed_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/grep-3.11-he2e7a12_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/keyutils-1.6.1-h166bdaf_0.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/krb5-1.21.2-h659d440_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libasprintf-0.22.5-h661eb56_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libasprintf-devel-0.22.5-h661eb56_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libcurl-8.8.0-hca28451_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20191231-he28a2e2_2.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-hd590300_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.6.2-h59595ed_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-13.2.0-h77fa898_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgettextpo-0.22.5-h59595ed_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgettextpo-devel-0.22.5-h59595ed_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-13.2.0-h77fa898_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.58.0-h47da74e_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.11.0-h0841786_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-13.2.0-hc0a3c3a_7.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libuv-1.48.0-hd590300_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.1-h4ab18f5_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/make-4.3-hd18ef5c_1.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h59595ed_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.1-h4ab18f5_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.43-hcad00b1_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/rhash-1.4.4-hd590300_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.6-ha6fb4c9_0.conda default: channels: - url: https://fast.prefix.dev/conda-forge/ @@ -1983,30 +1943,6 @@ packages: license_family: BSD size: 85051 timestamp: 1692312207348 -- kind: conda - name: cmake - version: 3.29.4 - build: h91dbaaa_0 - subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/cmake-3.29.4-h91dbaaa_0.conda - sha256: 80c39e10ace7733829220bb382acddd42cf0d698dc7541bfaf9c5fb325cab6b0 - md5: d07b4431d37186cf69ef63a2aba6f47a - depends: - - bzip2 >=1.0.8,<2.0a0 - - libcurl >=8.8.0,<9.0a0 - - libexpat >=2.6.2,<3.0a0 - - libgcc-ng >=12 - - libstdcxx-ng >=12 - - libuv >=1.48.0,<2.0a0 - - libzlib >=1.2.13,<2.0a0 - - ncurses >=6.5,<7.0a0 - - rhash >=1.4.4,<2.0a0 - - xz >=5.2.6,<6.0a0 - - zstd >=1.5.6,<1.6.0a0 - license: BSD-3-Clause - license_family: BSD - size: 19024763 - timestamp: 1717457328163 - kind: conda name: colorama version: 0.4.6 @@ -2054,20 +1990,6 @@ packages: license_family: PSF size: 16367 timestamp: 1624848715744 -- kind: conda - name: coreutils - version: '9.5' - build: hd590300_0 - subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/coreutils-9.5-hd590300_0.conda - sha256: 7cd3b0f55aa55bb27b045c30f32b3f6b874ecc006f3abcb274c71a3bcbacb358 - md5: 126d457e0e7a535278e808a7d8960015 - depends: - - libgcc-ng >=12 - license: GPL-3.0-or-later - license_family: GPL - size: 3014238 - timestamp: 1711655132451 - kind: conda name: cssselect2 version: 0.2.1 @@ -2294,22 +2216,6 @@ packages: license: Unlicense size: 15902 timestamp: 1714422911808 -- kind: conda - name: findutils - version: 4.6.0 - build: h166bdaf_1001 - build_number: 1001 - subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/findutils-4.6.0-h166bdaf_1001.tar.bz2 - sha256: 30aca48b587e51d51f148d9b450a07fb21475585375e5c54c0048b13a31a437a - md5: 0045534ae3fc1682e8096b0c70b2570b - depends: - - gettext - - libgcc-ng >=12 - license: GPL-3.0 - license_family: GPL - size: 570573 - timestamp: 1666198102478 - kind: conda name: font-ttf-dejavu-sans-mono version: '2.37' @@ -2859,22 +2765,6 @@ packages: license: GPL-2.0-or-later and LGPL-2.1-or-later size: 7744105 timestamp: 1701087084155 -- kind: conda - name: grep - version: '3.11' - build: he2e7a12_1 - build_number: 1 - subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/grep-3.11-he2e7a12_1.conda - sha256: 237c9ab3918afd80d80098d838ecf75e954a067ceeae0c6fcdcc9fcf01fe40c3 - md5: 0805d6f17b16177aef83dd97dbd494f6 - depends: - - libgcc-ng >=12 - - pcre2 >=10.43,<10.44.0a0 - license: GPL-3.0-or-later - license_family: GPL - size: 290061 - timestamp: 1710897913223 - kind: conda name: gxx version: 12.3.0 @@ -4565,20 +4455,6 @@ packages: license_family: BSD size: 33601 timestamp: 1680112270483 -- kind: conda - name: libuv - version: 1.48.0 - build: hd590300_0 - subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/libuv-1.48.0-hd590300_0.conda - sha256: b7c0e8a0c93c2621be7645b37123d4e8d27e8a974da26a3fba47a9c37711aa7f - md5: 7e8b914b1062dd4386e3de4d82a3ead6 - depends: - - libgcc-ng >=12 - license: MIT - license_family: MIT - size: 899979 - timestamp: 1709913354710 - kind: conda name: libwebp-base version: 1.4.0 @@ -4869,21 +4745,6 @@ packages: license: MIT, BSD size: 31928 timestamp: 1608166099896 -- kind: conda - name: make - version: '4.3' - build: hd18ef5c_1 - build_number: 1 - subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/make-4.3-hd18ef5c_1.tar.bz2 - sha256: 4a5fe7c80bb0de0015328e2d3fc8db1736f528cb1fd53cd0d5527e24269a4f7c - md5: 4049ebfd3190b580dffe76daed26155a - depends: - - libgcc-ng >=7.5.0 - license: GPL-3.0-or-later - license_family: GPL - size: 518896 - timestamp: 1602706451788 - kind: conda name: markdown version: '3.6' @@ -5429,22 +5290,6 @@ packages: license_family: BSD size: 818317 timestamp: 1708118868321 -- kind: conda - name: pcre2 - version: '10.43' - build: hcad00b1_0 - subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.43-hcad00b1_0.conda - sha256: 766dd986a7ed6197676c14699000bba2625fd26c8a890fcb7a810e5cf56155bc - md5: 8292dea9e022d9610a11fce5e0896ed8 - depends: - - bzip2 >=1.0.8,<2.0a0 - - libgcc-ng >=12 - - libzlib >=1.2.13,<2.0.0a0 - license: BSD-3-Clause - license_family: BSD - size: 950847 - timestamp: 1708118050286 - kind: conda name: perl version: 5.32.1 @@ -6540,20 +6385,6 @@ packages: license_family: APACHE size: 58810 timestamp: 1717057174842 -- kind: conda - name: rhash - version: 1.4.4 - build: hd590300_0 - subdir: linux-64 - url: https://conda.anaconda.org/conda-forge/linux-64/rhash-1.4.4-hd590300_0.conda - sha256: 12711d2d4a808a503c2e49b25d26ecb351435521e814c154e682dd2be71c2611 - md5: ec972a9a2925ac8d7a19eb9606561fff - depends: - - libgcc-ng >=12 - license: MIT - license_family: MIT - size: 185144 - timestamp: 1693455923632 - kind: conda name: ruamel.yaml version: 0.18.6 diff --git a/pixi.toml b/pixi.toml index 491bb22c8..5053f3d0b 100644 --- a/pixi.toml +++ b/pixi.toml @@ -35,19 +35,6 @@ git = "2.42.0.*" [feature.build.target.linux-64.dependencies] compilers = ">=1.6.0" -[feature.clean-env] -platforms = ["linux-64"] - -[feature.clean-env.tasks] -clean-install = { cmd = "cargo install --path . --locked", clean-env = true} - -[feature.clean-env.dependencies] -cmake = ">=3.29.3,<3.30" -make = ">=4.3,<5" -coreutils = ">=9.5,<10" -grep = ">=3.11,<4" -findutils = ">=4.6.0,<4.7" - [feature.docs.dependencies] mkdocs = "1.5.3.*" mkdocs-material = ">=9.5.16" @@ -82,4 +69,3 @@ taplo = ">=0.9.1,<0.10" default = { features = ["build", "dev", "docs", "schema"], solve-group = "one"} docs = { features = ["docs"], no-default-feature = true, solve-group = "one"} schema = { features = ["schema"], no-default-feature = true , solve-group = "one"} -clean = { features = ["clean-env"] } From 5df9a6c9bf584ea41b5e23e5446725e0a8293f6e Mon Sep 17 00:00:00 2001 From: "Ruben Arts(win)" Date: Fri, 7 Jun 2024 15:02:30 +0200 Subject: [PATCH 14/20] break: remove windows from the clean-env feature --- src/activation.rs | 165 ++++++++++++---------------------------------- src/cli/run.rs | 35 +--------- 2 files changed, 44 insertions(+), 156 deletions(-) diff --git a/src/activation.rs b/src/activation.rs index d127b2875..6a8f6f22f 100644 --- a/src/activation.rs +++ b/src/activation.rs @@ -147,6 +147,7 @@ pub async fn run_activation( } else { PathModificationBehavior::Prepend }; + let activator_result = match tokio::task::spawn_blocking(move || { // Run and cache the activation script activator.run_activation(ActivationVariables { @@ -191,7 +192,47 @@ pub async fn run_activation( } } }; - Ok(activator_result) + + if clean_env && cfg!(windows){ + return Err(miette::miette!(format!("It's not possible to run a `clean-env` on windows as it will create to much issues for the running programs which makes it practically useless"))) + } + else if clean_env { + let mut cleaned_environment_variables = get_clean_environment_variables(); + + // Extend with the original activation environment + cleaned_environment_variables.extend(activator_result); + + // Enable this when we found a better way to support windows. + // On Windows the path is not completly replace but we need to strip some paths to keep it as clean as possible. + // if cfg!(target_os = "windows") { + // let path = env + // .get("Path") + // .map(|path| { + // // Keep some of the paths + // let win_path = std::env::split_paths(&path).filter(|p| { + // // Required for base functionalities + // p.to_string_lossy().contains(":\\Windows") + // // Required for compilers + // || p.to_string_lossy().contains("\\Program Files") + // // Required for pixi environments + // || p.starts_with(environment.dir()) + // }); + // // Join back up the paths + // std::env::join_paths(win_path).expect("Could not join paths") + // }) + // .expect("Could not find PATH in environment variables"); + // // Insert the path back into the env. + // env.insert( + // "Path".to_string(), + // path.to_str() + // .expect("Path contains non-utf8 paths") + // .to_string(), + // ); + // } + + return Ok(cleaned_environment_variables); + } + Ok(std::env::vars().chain(activator_result)) } /// Get the environment variables that are statically generated from the project and the environment. @@ -245,118 +286,10 @@ pub fn get_clean_environment_variables() -> HashMap { vec![] }; - let windows_keys = if cfg!(target_os = "windows") { - vec![ - "APPDATA", - "COMPUTERNAME", - "COMSPEC", - "COMMONPROGRAMFILES", - "COMMONPROGRAMFILES(X86)", - "COMMONPROGRAMW6432", - "DRIVERDATA", - "HOMEDRIVE", - "HOMEPATH", - "LOGONSERVER", - "NUMBER_OF_PROCESSORS", - "OS", - "PATHEXT", - "PROCESSOR_ARCHITECTURE", - "PROCESSOR_IDENTIFIER", - "PROCESSOR_LEVEL", - "PROCESSOR_REVISION", - "PROMPT_COMMAND", - "PROMPT_COMMAND_RIGHT", - "PROMPT_INDICATOR", - "PROMPT_INDICATOR_VI_INSERT", - "PROMPT_INDICATOR_VI_NORMAL", - "PROMPT_MULTILINE_INDICATOR", - "PWD", - "SESSIONNAME", - "SYSTEMDRIVE", - "SYSTEMROOT", - "TEMP", - "TMP", - "TERMINAL_EMULATOR", - "USERNAME", - "USERPROFILE", - "USERDOMAIN_ROAMINGPROFILE", - "USERDOMAIN", - "WINDIR", - ] - // vec![ - // "!C:", - // "!D:", - // "=::", - // "ALLUSERSPROFILE", - // "APPDATA", - // "CMD_DURATION_MS", - // "COMMONPROGRAMFILES", - // "COMMONPROGRAMFILES(\"X86\")", - // "COMMONPROGRAMW6432", - // "COMPUTERNAME", - // "COMSPEC", - // "CONDA_PREFIX", - // "CURRENT_FILE", - // "DIRS_POSITION", - // "DriverData", - // "EFC_5504", - // "FILE_PWD", - // "HOMEDRIVE", - // "HOMEPATH", - // "IDEA_INITIAL_DIRECTORY", - // "LAST_EXIT_CODE", - // "LOCALAPPDATA", - // "LOGONSERVER", - // "NUMBER_OF_PROCESSORS", - // "NU_LOG_DATE_FORMAT", - // "NU_LOG_FORMAT", - // "NU_VERSION", - // "OLDPWD", - // "OneDrive", - // "OneDriveConsumer", - // "OS", - // "PATH", - // "PATHEXT", - // "PROCESSOR_ARCHITECTURE", - // "PROCESSOR_IDENTIFIER", - // "PROCESSOR_LEVEL", - // "PROCESSOR_REVISION", - // "PROGRAMDATA", - // "PROGRAMFILES", - // "PROGRAMFILES(\"X86\")", - // "PROGRAMW6432", - // "PROMPT", - // "PROMPT_INDICATOR", - // "PROMPT_MULTILINE_INDICATOR", - // "PSMODULEPATH", - // "PUBLIC", - // "PWD", - // "SESSIONNAME", - // "STARSHIP_SESSION_KEY", - // "STARSHIP_SHELL", - // "SYSTEMDRIVE", - // "SYSTEMROOT", - // "TEMP", - // "TERMINAL_EMULATOR", - // "TERM_SESSION_ID", - // "TMP", - // "USERDOMAIN", - // "USERDOMAIN_ROAMINGPROFILE", - // "USERNAME", - // "USERPROFILE", - // "WINDIR", - // "WIX", - // "TERM", - // "HOME", - // ] - } else { - vec![] - }; - let keys = unix_keys .into_iter() .chain(macos_keys) - .chain(windows_keys) + // .chain(windows_keys) .map(|s| s.to_string().to_uppercase()) .collect_vec(); @@ -459,16 +392,4 @@ mod tests { std::env::var("USER").as_ref().unwrap() ); } - - #[test] - #[cfg(target_os = "windows")] - fn test_get_windows_clean_environment_variables() { - let env = get_clean_environment_variables(); - // Make sure that the environment variables are set. - assert_eq!( - env.get("USERNAME").unwrap(), - std::env::var("USERNAME").as_ref().unwrap() - ); - assert!(env.get("Path").is_some()); - } } diff --git a/src/cli/run.rs b/src/cli/run.rs index 991b3b2df..e6373ffa2 100644 --- a/src/cli/run.rs +++ b/src/cli/run.rs @@ -17,7 +17,6 @@ use crate::task::{ }; use crate::Project; -use crate::activation::get_clean_environment_variables; use crate::lock_file::LockFileDerivedData; use crate::lock_file::UpdateLockFileOptions; use crate::progress::await_in_progress; @@ -255,40 +254,8 @@ pub async fn get_task_env<'p>( .await .wrap_err("failed to activate environment")?; - if clean_env { - let mut env = get_clean_environment_variables(); - - // Extend with the activation environment - env.extend(activation_env); - - // On Windows we need to keep part of the old path and insert the newly generate path from activation script - if cfg!(target_os = "windows") { - let pixi_path = env - .get("Path") - .into_iter() - .flat_map(|p| std::env::split_paths(p)); - // dbg!(&pixi_path); - let path = std::env::var_os("Path") - .map(|path| { - let path = std::env::split_paths(&path) - .filter(|p| p.to_string_lossy().contains(":\\Windows")) - .chain(pixi_path.into_iter()); - std::env::join_paths(path).expect("Could not join paths") - }) - .expect("Could not find PATH in environment variables"); - env.insert( - "PATH".to_string(), - path.to_str() - .expect("Path contains non-utf8 paths") - .to_string(), - ); - } - - return Ok(env); - } - // Concatenate with the system environment variables - Ok(std::env::vars().chain(activation_env).collect()) + Ok(activation_env) } #[derive(Debug, Error, Diagnostic)] From 152ad2fd93be32099b4b9c7107af4a6aa13999c0 Mon Sep 17 00:00:00 2001 From: "Ruben Arts(win)" Date: Fri, 7 Jun 2024 15:21:22 +0200 Subject: [PATCH 15/20] docs: update documentation --- docs/features/advanced_tasks.md | 17 +++++++++++++++++ docs/reference/cli.md | 3 ++- docs/reference/project_configuration.md | 1 + src/activation.rs | 11 ++++++----- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/docs/features/advanced_tasks.md b/docs/features/advanced_tasks.md index 9dd0030de..ebc799f03 100644 --- a/docs/features/advanced_tasks.md +++ b/docs/features/advanced_tasks.md @@ -195,6 +195,23 @@ These variables are not shared over tasks, so you need to define these for every ``` This will output `/tmp/path:/usr/bin:/bin` instead of the original `/usr/bin:/bin`. +## Clean environment +You can make sure the environment of a task is "pixi only". +Here pixi will only include the minimal required environment variables for your platform to run the command in. +The enviroment will contain all variables set by the conda environment like `"CONDA_PREFIX"`. +It will however include some default values from the shell, like: +`"DISPLAY"`, `"LC_ALL"`, `"LC_TIME"`, `"LC_NUMERIC"`, `"LC_MEASUREMENT"`, `"SHELL"`, `"USER"`, `"USERNAME"`, `"LOGNAME"`, `"HOME"`, `"HOSTNAME"`,`"TMPDIR"`, `"XPC_SERVICE_NAME"`, `"XPC_FLAGS"` + +```toml +[tasks] +clean_command = { cmd = "python run_in_isolated_env.py", clean-env = true} +``` +This setting can also be set from the command line with `pixi run --clean-env TASK_NAME`. + +!!! "`clean-env` not supported on Windows" + On Windows it's hard to create a "clean environment" as `conda-forge` doesn't ship Windows compilers and Windows needs a lot of base variables. + Making this feature not worthy of implementing as the amount of edge cases will make it unusable. + ## Our task runner: deno_task_shell To support the different OS's (Windows, OSX and Linux), pixi integrates a shell that can run on all of them. diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 10ce66fbc..f62a22d90 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -178,7 +178,7 @@ You cannot run `pixi run source setup.bash` as `source` is not available in the - `--frozen`: install the environment as defined in the lock file, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](project_configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](project_configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--environment (-e)`: The environment to run the task in, if none are provided the default environment will be used or a selector will be given to select the right environment. -- `--clean-env`: Run the task in a clean environment, this will remove all environment variables of the shell environment except for the ones pixi sets. +- `--clean-env`: Run the task in a clean environment, this will remove all environment variables of the shell environment except for the ones pixi sets. THIS DOESN't WORK ON `Windows`. ```shell pixi run python pixi run cowpy "Hey pixi user" @@ -193,6 +193,7 @@ pixi run task argument1 argument2 # If you have multiple environments you can select the right one with the --environment flag. pixi run --environment cuda python +# THIS DOESN'T WORK ON WINDOWS # If you want to run a command in a clean environment you can use the --clean-env flag. # The PATH should only contain the pixi environment here. pixi run --clean-env "echo \$PATH" diff --git a/docs/reference/project_configuration.md b/docs/reference/project_configuration.md index 33c141fd1..58df3477c 100644 --- a/docs/reference/project_configuration.md +++ b/docs/reference/project_configuration.md @@ -176,6 +176,7 @@ alias = { depends-on=["depending"]} download = { cmd="curl -o file.txt https://example.com/file.txt" , outputs=["file.txt"]} build = { cmd="npm build", cwd="frontend", inputs=["frontend/package.json", "frontend/*.js"]} run = { cmd="python run.py $ARGUMENT", env={ ARGUMENT="value" }} +clean-env = { cmd = "python isolated.py", clean-env = true} # Only on Unix! ``` You can modify this table using [`pixi task`](cli.md#task). diff --git a/src/activation.rs b/src/activation.rs index 6a8f6f22f..b3e27d20d 100644 --- a/src/activation.rs +++ b/src/activation.rs @@ -193,10 +193,11 @@ pub async fn run_activation( } }; - if clean_env && cfg!(windows){ - return Err(miette::miette!(format!("It's not possible to run a `clean-env` on windows as it will create to much issues for the running programs which makes it practically useless"))) - } - else if clean_env { + if clean_env && cfg!(windows) { + return Err(miette::miette!( + format!("It's not possible to run a `clean-env` on Windows as it requires so many non conda specific files that it is basically useless to use. \ + So pixi currently doesn't support this feature."))); + } else if clean_env { let mut cleaned_environment_variables = get_clean_environment_variables(); // Extend with the original activation environment @@ -232,7 +233,7 @@ pub async fn run_activation( return Ok(cleaned_environment_variables); } - Ok(std::env::vars().chain(activator_result)) + Ok(std::env::vars().chain(activator_result).collect()) } /// Get the environment variables that are statically generated from the project and the environment. From bdf0d61e4c35c3bf94d73a597f8ed6697ee63347 Mon Sep 17 00:00:00 2001 From: "Ruben Arts(win)" Date: Fri, 7 Jun 2024 15:26:01 +0200 Subject: [PATCH 16/20] fix: build including url --- src/project/manifest/document.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/project/manifest/document.rs b/src/project/manifest/document.rs index b3dceb11f..a808970ef 100644 --- a/src/project/manifest/document.rs +++ b/src/project/manifest/document.rs @@ -380,6 +380,7 @@ fn nameless_match_spec_to_toml(spec: &NamelessMatchSpec) -> Value { namespace: None, md5: None, sha256: None, + url: None } => { // No other fields besides the version was specified, so we can just return the // version as a string. @@ -398,6 +399,7 @@ fn nameless_match_spec_to_toml(spec: &NamelessMatchSpec) -> Value { namespace, md5, sha256, + url, } => { let mut table = InlineTable::new(); table.insert( @@ -437,6 +439,9 @@ fn nameless_match_spec_to_toml(spec: &NamelessMatchSpec) -> Value { if let Some(sha256) = sha256 { table.insert("sha256", format!("{:x}", sha256).into()); } + if let Some(url) = url { + table.insert("url", url.to_string().into()); + } table.into() } } From cd3f3bb8e545d791fb83b3e43eb864ed25a059ab Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Fri, 7 Jun 2024 15:49:18 +0200 Subject: [PATCH 17/20] fix: clean env on linux --- docs/features/advanced_tasks.md | 6 +++--- src/activation.rs | 4 ++-- src/project/manifest/document.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/features/advanced_tasks.md b/docs/features/advanced_tasks.md index ebc799f03..75829daa5 100644 --- a/docs/features/advanced_tasks.md +++ b/docs/features/advanced_tasks.md @@ -196,9 +196,9 @@ These variables are not shared over tasks, so you need to define these for every This will output `/tmp/path:/usr/bin:/bin` instead of the original `/usr/bin:/bin`. ## Clean environment -You can make sure the environment of a task is "pixi only". +You can make sure the environment of a task is "pixi only". Here pixi will only include the minimal required environment variables for your platform to run the command in. -The enviroment will contain all variables set by the conda environment like `"CONDA_PREFIX"`. +The environment will contain all variables set by the conda environment like `"CONDA_PREFIX"`. It will however include some default values from the shell, like: `"DISPLAY"`, `"LC_ALL"`, `"LC_TIME"`, `"LC_NUMERIC"`, `"LC_MEASUREMENT"`, `"SHELL"`, `"USER"`, `"USERNAME"`, `"LOGNAME"`, `"HOME"`, `"HOSTNAME"`,`"TMPDIR"`, `"XPC_SERVICE_NAME"`, `"XPC_FLAGS"` @@ -208,7 +208,7 @@ clean_command = { cmd = "python run_in_isolated_env.py", clean-env = true} ``` This setting can also be set from the command line with `pixi run --clean-env TASK_NAME`. -!!! "`clean-env` not supported on Windows" +!!! warning "`clean-env` not supported on Windows" On Windows it's hard to create a "clean environment" as `conda-forge` doesn't ship Windows compilers and Windows needs a lot of base variables. Making this feature not worthy of implementing as the amount of edge cases will make it unusable. diff --git a/src/activation.rs b/src/activation.rs index b3e27d20d..429d7fd9d 100644 --- a/src/activation.rs +++ b/src/activation.rs @@ -204,7 +204,7 @@ pub async fn run_activation( cleaned_environment_variables.extend(activator_result); // Enable this when we found a better way to support windows. - // On Windows the path is not completly replace but we need to strip some paths to keep it as clean as possible. + // On Windows the path is not completely replace, but we need to strip some paths to keep it as clean as possible. // if cfg!(target_os = "windows") { // let path = env // .get("Path") @@ -263,7 +263,7 @@ pub fn get_environment_variables<'p>(environment: &'p Environment<'p>) -> HashMa pub fn get_clean_environment_variables() -> HashMap { let env = std::env::vars().collect::>(); - let unix_keys = if cfg!(target_os = "unix") { + let unix_keys = if cfg!(unix) { vec![ "DISPLAY", "LC_ALL", diff --git a/src/project/manifest/document.rs b/src/project/manifest/document.rs index a808970ef..dafc18dc8 100644 --- a/src/project/manifest/document.rs +++ b/src/project/manifest/document.rs @@ -380,7 +380,7 @@ fn nameless_match_spec_to_toml(spec: &NamelessMatchSpec) -> Value { namespace: None, md5: None, sha256: None, - url: None + url: None, } => { // No other fields besides the version was specified, so we can just return the // version as a string. From 1ba3e801c516082b021e7f3ff3cf6e01d8c5d096 Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Fri, 7 Jun 2024 15:54:34 +0200 Subject: [PATCH 18/20] fix: test --- ...onment_file__tests__test_import_from_env_yaml.conda.yml.snap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.conda.yml.snap b/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.conda.yml.snap index 06442e412..3eb66f3be 100644 --- a/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.conda.yml.snap +++ b/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.conda.yml.snap @@ -31,6 +31,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -58,6 +59,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, ], [], From a8024a9112bbccdad95c2d52713cdd3cfc9a49c9 Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Mon, 10 Jun 2024 10:02:38 +0200 Subject: [PATCH 19/20] fix: tests --- ...test_import_from_env_yaml.cockpit.yml.snap | 21 +++++++++++++++++++ ..._test_import_from_env_yaml.crnnft.yml.snap | 4 ++++ ...est_import_from_env_yaml.let-plot.yml.snap | 8 +++++++ ...est_import_from_env_yaml.test_env.yml.snap | 3 +++ tests/common/mod.rs | 3 ++- tests/task_tests.rs | 4 ++-- 6 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.cockpit.yml.snap b/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.cockpit.yml.snap index ae83b0e74..70853f092 100644 --- a/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.cockpit.yml.snap +++ b/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.cockpit.yml.snap @@ -21,6 +21,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -38,6 +39,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -77,6 +79,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -116,6 +119,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -155,6 +159,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -194,6 +199,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -233,6 +239,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -272,6 +279,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -311,6 +319,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -350,6 +359,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -389,6 +399,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -428,6 +439,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -467,6 +479,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -506,6 +519,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -545,6 +559,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -584,6 +599,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -623,6 +639,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -662,6 +679,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -701,6 +719,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -750,6 +769,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -789,6 +809,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, ], [ diff --git a/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.crnnft.yml.snap b/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.crnnft.yml.snap index 7840064a4..d4f11fd6a 100644 --- a/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.crnnft.yml.snap +++ b/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.crnnft.yml.snap @@ -31,6 +31,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -58,6 +59,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -85,6 +87,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -112,6 +115,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, ], [ diff --git a/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.let-plot.yml.snap b/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.let-plot.yml.snap index 167b8c800..370386c0b 100644 --- a/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.let-plot.yml.snap +++ b/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.let-plot.yml.snap @@ -31,6 +31,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -56,6 +57,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -83,6 +85,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -108,6 +111,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -133,6 +137,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -158,6 +163,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -183,6 +189,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -200,6 +207,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, ], [ diff --git a/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.test_env.yml.snap b/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.test_env.yml.snap index f27375587..783e175d4 100644 --- a/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.test_env.yml.snap +++ b/src/utils/snapshots/pixi__utils__conda_environment_file__tests__test_import_from_env_yaml.test_env.yml.snap @@ -31,6 +31,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -56,6 +57,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, MatchSpec { name: Some( @@ -81,6 +83,7 @@ expression: "(parse_dependencies(env_info.dependencies().clone()).unwrap(),\n namespace: None, md5: None, sha256: None, + url: None, }, ], [ diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 81b058694..45a840efe 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -331,7 +331,8 @@ impl PixiControl { // Construct the task environment if not already created. let task_env = match task_env.as_ref() { None => { - let env = get_task_env(&mut lock_file, &task.run_environment, false).await?; + let env = + get_task_env(&mut lock_file, &task.run_environment, args.clean_env).await?; task_env.insert(env) as &_ } Some(task_env) => task_env, diff --git a/tests/task_tests.rs b/tests/task_tests.rs index 26ee593aa..7b6c4a9d9 100644 --- a/tests/task_tests.rs +++ b/tests/task_tests.rs @@ -264,13 +264,13 @@ async fn test_clean_env() { .unwrap(); assert_eq!(result.exit_code, 0); - assert_eq!(result.stdout, "Hello is: \n"); + assert_eq!(result.stdout, "Hello is:\n"); let result = pixi .run(Args { task: vec!["env-test".to_string()], manifest_path: None, - clean_env: true, + clean_env: false, ..Default::default() }) .await From 5dd3f828a48c8c6b8410091c045012c14c988f25 Mon Sep 17 00:00:00 2001 From: "Ruben Arts(win)" Date: Tue, 11 Jun 2024 10:03:41 +0200 Subject: [PATCH 20/20] fix: disable test on windows --- tests/task_tests.rs | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/tests/task_tests.rs b/tests/task_tests.rs index 7b6c4a9d9..4e977ceb1 100644 --- a/tests/task_tests.rs +++ b/tests/task_tests.rs @@ -253,18 +253,21 @@ async fn test_clean_env() { .execute() .unwrap(); - let result = pixi - .run(Args { - task: vec!["env-test".to_string()], - manifest_path: None, - clean_env: true, - ..Default::default() - }) - .await - .unwrap(); - - assert_eq!(result.exit_code, 0); - assert_eq!(result.stdout, "Hello is:\n"); + let run = pixi.run(Args { + task: vec!["env-test".to_string()], + manifest_path: None, + clean_env: true, + ..Default::default() + }); + + if cfg!(windows) { + // Clean env running not supported on windows. + run.await.unwrap_err(); + } else { + let result = run.await.unwrap(); + assert_eq!(result.exit_code, 0); + assert_eq!(result.stdout, "Hello is:\n"); + } let result = pixi .run(Args {