Skip to content

explicit lockfiles no longer sorted #183

Closed
@minrk

Description

@minrk

Running the same test as #170, but with --kind explicit results in a different hash on every run:

env_file=/tmp/environment.yml
lock_file=/tmp/conda-explicit.lock

cat << EOF > $env_file
channels:
  - conda-forge

dependencies:
  - scikit-learn
EOF

function conda_lock_multiple_times() {
    rm -rf $lock_file
    for i in $(seq 1 4); do
        conda-lock lock -k explicit --mamba -p linux-64 -f $env_file --filename-template $lock_file > /dev/null 2>&1
        echo "lock file md5sum: $(md5 $lock_file)"
    done
}

echo "first run"
conda_lock_multiple_times

echo "second run"
conda_lock_multiple_times

0.13.2 produces consistent output everytime, while 1.0.1 and 1.0.4 produce different hashes on every run. I presume the fix is similar to #181, but on a different code path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions