Skip to content

bug(build): lock file always invalidated by pixi-build-python git dep #5226

@crusaderky

Description

@crusaderky

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Follow-up from #5175

The below used to be broken in pixi 0.62.1, and is confirmed to be fixed in 0.62.2 thanks to #5178:

[workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64", "linux-aarch64", "osx-64", "osx-arm64"]
preview = ["pixi-build"]

[dependencies]
python.git = "https://github.com/python/cpython"
python.subdirectory = "Tools/pixi-packages/asan"
$ pixi update
$ pixi s --locked  # OK in 0.62.2

However, numpy is still broken:

[workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64", "linux-aarch64", "osx-64", "osx-arm64"]
preview = ["pixi-build"]

[dependencies]
python = "*"
numpy.git = "https://github.com/numpy/numpy"
numpy.subdirectory = "pixi-packages/default"
$ pixi update
$ pixi s --locked  -v

INFO pixi_core::lock_file::outdated: the dependencies of environment 'default' for platform osx-arm64 are out of date because the source location 'numpy' changed from 'https://github.com/numpy/numpy@917b5f530d8636151a707005d5552cdbddda068b' to 'https://github.com/numpy/numpy@917b5f530d8636151a707005d5552cdbddda068b'
[...]

I think that the main difference between python and numpy is that the former uses a rattler-build recipe, whereas the latter just uses pixi.toml and [package] blocks?

The end goal is to have both at the same time:

[workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64", "linux-aarch64", "osx-64", "osx-arm64"]
preview = ["pixi-build"]

[dependencies]
python.git = "https://github.com/python/cpython"
python.subdirectory = "Tools/pixi-packages/asan"
numpy.git = "https://github.com/numpy/numpy"
numpy.subdirectory = "pixi-packages/asan"

Note the difference between numpy/pixi-packages/default:

[package.host-dependencies]
python = "*"

and numpy/pixi-packages/asan:

[package.host-dependencies]
python.git = "https://github.com/python/cpython"
python.subdirectory = "Tools/pixi-packages/asan"
python.rev = "8bb5b6e8ce61da41b5affd5eb12d9cc46b5af448"

CC @baszalmstra

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:buildRelated to pixi buildbugSomething isn't workinggit

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions