pixi
pixi copied to clipboard
bug(pypi): lock file always outdated with dependency-overrides
Checks
-
[x] I have checked that this issue has not already been reported.
-
[x] I have confirmed this bug exists on the latest version of pixi, using
pixi --version.
Reproducible example
Pixi 0.55.0
pixi.toml:
[workspace]
name = "test"
channels = ["conda-forge"]
platforms = ["osx-arm64"]
version = "0.1.0"
[pypi-options.dependency-overrides]
mock = "<=5.2.0"
[dependencies]
mock = "==5.2.0"
[pypi-dependencies]
dsub = "==0.5.1"
pixi lock
pixi install --locked -v
pixi lock -v
dsub==0.5.1 requires mock<=5.1.0, but the example installs mock==5.2.0 from conda-forge and uses pypi-options.dependency-overrides to force it. Pixi always tries to update the lockfile but the lockfile isn't actually changed:
$ pixi install --locked -v
INFO pixi_core::lock_file::outdated: the dependencies of environment 'default' for platform osx-arm64 are out of date because the conda package does not satisfy the pypi requirement 'mock<=5.1.0' (required by 'dsub')
Error: × lock-file not up-to-date with the workspace
$ pixi lock -v
INFO pixi_core::lock_file::outdated: the dependencies of environment 'default' for platform osx-arm64 are out of date because the conda package does not satisfy the pypi requirement 'mock<=5.1.0' (required by 'dsub')
INFO pixi_core::lock_file::update: resolved conda environment for environment 'default' 'osx-arm64' in 519ms 855us 250ns
INFO resolve_pypi{group=default platform=osx-arm64}: pixi_core::lock_file::resolve::pypi: the following python packages are assumed to be installed by conda: mock 5.2.0
INFO pixi_core::lock_file::update: resolved pypi packages for environment 'default' 'osx-arm64' in 8ms 618us 958ns
✔ Updated lock-file
Issue description
Similar to #4237, but the conflict is between conda and pypi packages instead of just pypi packages.
Expected behavior
Pixi should not invalidate the lockfile.
Yeah I can reproduce for sure, I'll add it to our cycles to be fixed.