Skip to content

lockfile reported as out of date with --locked even after running pixi lock #5256

@cpcloud

Description

@cpcloud

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

Commands I ran and their output:

$ pixi lock && pixi install --locked
Error:   × lock-file not up-to-date with the workspace

pixi.toml/pyproject.toml file that reproduces my issue:

# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause
[workspace]
channels = ["conda-forge"]
platforms = ["linux-64", "linux-aarch64", "win-64"]
preview = ["pixi-build"]

[workspace.build-variants]
python = ["3.10.*", "3.11.*", "3.12.*", "3.13.*", "3.14.*"]

[dependencies]
# source
numba-cuda = { path = "." }

[feature.cu.dependencies]
cuda-nvcc = "*"
cuda-nvcc-impl = "*"
cuda-cuobjdump = "*"
cuda-nvrtc = "*"
libnvjitlink = "*"
cuda-cccl = "*"
libcurand = "*"

[feature.cu-12.system-requirements]
cuda = "12"

[feature.cu-12.dependencies]
cuda-version = "12.*"

[feature.cu-12-0.dependencies]
cuda-version = "12.0.*"

[feature.nvvm.dependencies]
# supported by cuda >=12.2
cuda-nvvm = "*"

[feature.cu-12-2.dependencies]
cuda-version = "12.2.*"

[feature.cu-rt.dependencies]
# supported by cuda >=12.8
cuda-runtime = "*"

[feature.cu-12-8.dependencies]
cuda-version = "12.8.*"

[feature.cu-12-9.dependencies]
cuda-version = "12.9.*"

[feature.cu-13.system-requirements]
cuda = "13"

[feature.cu-13.dependencies]
cuda-version = "13.*"

[feature.cu-13-0.dependencies]
cuda-version = "13.0.*"

[feature.cu-13-1.dependencies]
cuda-version = "13.1.*"

[feature.bench.dependencies]
pytorch = ">=2.8"
pytorch-gpu = ">=2.8"
libtorch = ">=2.8"
cupy = "*"

[feature.test.dependencies]
# for building cuda artifacts for testing
make = "*"
pre-commit = ">=4.3"
psutil = ">=6"
cffi = ">=1"
pytest = ">=8,<9"
pytest-xdist = ">=3.8"
pytest-benchmark = ">=5.1"

[feature.test.pypi-dependencies]
ml_dtypes = "*"
filecheck = "*"

[feature.py310.dependencies]
python = "3.10.*"

[feature.py311.dependencies]
python = "3.11.*"

[feature.py312.dependencies]
python = "3.12.*"

[feature.py313.dependencies]
python = "3.13.*"

[feature.py314.dependencies]
python = "3.14.*"

[feature.docs.dependencies]
make = "*"
psutil = ">=7.1.3"
sphinx = ">=8.2.3"
sphinx-rtd-theme = ">=3.0.2"
numpydoc = ">=1.9.0"

[feature.docs.pypi-dependencies]
nvidia-sphinx-theme = "*"

[environments]
bench-against = { features = ["test"], no-default-feature = true }
# CUDA 12
cu-12-0-py310 = { features = [
    "cu-12-0",
    "test",
    "cu",
    "cu-12",
    "py310",
], solve-group = "cu-12-0-py310" }
cu-12-0-py311 = { features = [
    "cu-12-0",
    "test",
    "cu",
    "cu-12",
    "py311",
], solve-group = "cu-12-0-py311" }
cu-12-2-py311 = { features = [
    "cu-12-2",
    "test",
    "cu",
    "cu-12",
    "nvvm",
    "py311",
], solve-group = "cu-12-2-py311" }
cu-12-8-py310 = { features = [
    "cu-12-8",
    "test",
    "cu",
    "cu-12",
    "cu-rt",
    "nvvm",
    "py310",
], solve-group = "cu-12-8-py310" }
cu-12-8-py311 = { features = [
    "cu-12-8",
    "test",
    "cu",
    "cu-12",
    "cu-rt",
    "nvvm",
    "py311",
], solve-group = "cu-12-8-py311" }
cu-12-8-py312 = { features = [
    "cu-12-8",
    "test",
    "cu",
    "cu-12",
    "cu-rt",
    "nvvm",
    "py312",
], solve-group = "cu-12-8-py312" }
cu-12-8-py313 = { features = [
    "cu-12-8",
    "test",
    "cu",
    "cu-12",
    "cu-rt",
    "nvvm",
    "py313",
], solve-group = "cu-12-8-py313" }
cu-12-9-py312 = { features = [
    "cu-12-9",
    "test",
    "bench",
    "cu",
    "cu-12",
    "cu-rt",
    "nvvm",
    "py312",
], solve-group = "cu-12-9-py312" }
# CUDA 13
cu-13-0-py312 = { features = [
    "cu-13-0",
    "test",
    "cu",
    "cu-13",
    "cu-rt",
    "nvvm",
    "py312",
], solve-group = "cu-13-0-py312" }
cu-13-0-py313 = { features = [
    "cu-13-0",
    "test",
    "cu",
    "cu-13",
    "cu-rt",
    "nvvm",
    "py313",
], solve-group = "cu-13-0-py313" }
cu-13-0-py314 = { features = [
    "cu-13-0",
    "test",
    "cu",
    "cu-13",
    "cu-rt",
    "nvvm",
    "py314",
], solve-group = "cu-13-0-py314" }
cu-13-1-py314 = { features = [
    "cu-13-1",
    "test",
    "cu",
    "cu-13",
    "cu-rt",
    "nvvm",
    "py314",
], solve-group = "cu-13-1-py314" }

docs = { features = ["docs"], solve-group = "docs" }

[target.linux.tasks]
build-tests = { cmd = [
    "make",
    "-j",
    "$(nproc)",
    "-C",
    "$PIXI_PROJECT_ROOT/testing",
] }
clean-tests = { cmd = [
    "make",
    "-j",
    "$(nproc)",
    "-C",
    "$PIXI_PROJECT_ROOT/testing",
    "clean",
] }
bench = { cmd = [
    "pytest",
    "$PIXI_PROJECT_ROOT/testing",
    "--pyargs",
    "numba.cuda.tests.benchmarks",
    "--benchmark-only",
    "--benchmark-enable",
    "--benchmark-autosave",
    "--benchmark-group-by=func",
] }
benchcmp = { cmd = [
    "pytest",
    "$PIXI_PROJECT_ROOT/testing",
    "--pyargs",
    "numba.cuda.tests.benchmarks",
    "--benchmark-only",
    "--benchmark-enable",
    "--benchmark-group-by=name",
    "--benchmark-compare",
] }

[target.linux.tasks.bench-against]
cmd = ["python", "$PIXI_PROJECT_ROOT/scripts/bench-against.py"]

[target.linux.tasks.build-docs]
cmd = ["make", "-C", "$PIXI_PROJECT_ROOT/docs", "html"]

[target.linux.tasks.test]
cmd = ["pytest", "$PIXI_PROJECT_ROOT/testing"]
env = { NUMBA_CUDA_TEST_BIN_DIR = "$PIXI_PROJECT_ROOT/testing" }
depends-on = [{ task = "build-tests" }]

[target.linux.tasks.simtest]
cmd = ["pytest", "$PIXI_PROJECT_ROOT/testing"]

[target.linux.tasks.simtest.env]
NUMBA_CUDA_TEST_BIN_DIR = "$PIXI_PROJECT_ROOT/testing"
NUMBA_ENABLE_CUDASIM = "1"

[package]
name = "numba-cuda"
version = "0.23.0"

[package.build]
backend = { name = "pixi-build-python", version = "*" }
# makes the package not noarch which is required for build-variants to work and
# because numba-cuda has c(++) extensions
config.compilers = ["cxx"]

[package.build-dependencies]
# this can't be in `config.compilers` otherwise CUDA_HOME isn't defined
cuda-compiler = "*"

[package.host-dependencies]
python = "*"
setuptools = "*"
numpy = ">=2.1"

[package.run-dependencies]
python = "*"
packaging = "*"
numba = ">=0.60"
cuda-core = ">=0.3,<1"
cuda-bindings = ">=12.9,<14"
cuda-python = ">=12.9,<14"

pixi info output:

System
------------
       Pixi version: 0.62.2
        TLS backend: rustls
           Platform: linux-64
   Virtual packages: __unix=0=0
                   : __linux=6.12.61=0
                   : __glibc=2.40=0
                   : __cuda=13.1=0
                   : __archspec=1=zen2
   Config locations: No config files found

Global
------------

Workspace
------------
               Name: numba-cuda

Environments
------------
        Environment: default
           Features: default
           Channels: conda-forge
   Dependency count: 1
       Dependencies: numba-cuda
   Target platforms: linux-aarch64, linux-64, win-64
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: bench-against
           Features: test
           Channels: conda-forge
   Dependency count: 7
       Dependencies: make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: win-64, linux-64, linux-aarch64

        Environment: cu-12-0-py310
           Features: cu-12-0, test, cu, cu-12, py310, default
        Solve group: cu-12-0-py310
           Channels: conda-forge
   Dependency count: 17
       Dependencies: cuda-version, make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark, cuda-nvcc, cuda-nvcc-impl, cuda-cuobjdump, cuda-nvrtc, libnvjitlink, cuda-cccl, libcurand, python, numba-cuda
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: linux-aarch64, win-64, linux-64
System requirements: cuda = "12"
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: cu-12-0-py311
           Features: cu-12-0, test, cu, cu-12, py311, default
        Solve group: cu-12-0-py311
           Channels: conda-forge
   Dependency count: 17
       Dependencies: cuda-version, make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark, cuda-nvcc, cuda-nvcc-impl, cuda-cuobjdump, cuda-nvrtc, libnvjitlink, cuda-cccl, libcurand, python, numba-cuda
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: linux-64, linux-aarch64, win-64
System requirements: cuda = "12"
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: cu-12-2-py311
           Features: cu-12-2, test, cu, cu-12, nvvm, py311, default
        Solve group: cu-12-2-py311
           Channels: conda-forge
   Dependency count: 18
       Dependencies: cuda-version, make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark, cuda-nvcc, cuda-nvcc-impl, cuda-cuobjdump, cuda-nvrtc, libnvjitlink, cuda-cccl, libcurand, cuda-nvvm, python, numba-cuda
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: linux-aarch64, linux-64, win-64
System requirements: cuda = "12"
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: cu-12-8-py310
           Features: cu-12-8, test, cu, cu-12, cu-rt, nvvm, py310, default
        Solve group: cu-12-8-py310
           Channels: conda-forge
   Dependency count: 19
       Dependencies: cuda-version, make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark, cuda-nvcc, cuda-nvcc-impl, cuda-cuobjdump, cuda-nvrtc, libnvjitlink, cuda-cccl, libcurand, cuda-runtime, cuda-nvvm, python, numba-cuda
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: win-64, linux-64, linux-aarch64
System requirements: cuda = "12"
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: cu-12-8-py311
           Features: cu-12-8, test, cu, cu-12, cu-rt, nvvm, py311, default
        Solve group: cu-12-8-py311
           Channels: conda-forge
   Dependency count: 19
       Dependencies: cuda-version, make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark, cuda-nvcc, cuda-nvcc-impl, cuda-cuobjdump, cuda-nvrtc, libnvjitlink, cuda-cccl, libcurand, cuda-runtime, cuda-nvvm, python, numba-cuda
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: win-64, linux-aarch64, linux-64
System requirements: cuda = "12"
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: cu-12-8-py312
           Features: cu-12-8, test, cu, cu-12, cu-rt, nvvm, py312, default
        Solve group: cu-12-8-py312
           Channels: conda-forge
   Dependency count: 19
       Dependencies: cuda-version, make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark, cuda-nvcc, cuda-nvcc-impl, cuda-cuobjdump, cuda-nvrtc, libnvjitlink, cuda-cccl, libcurand, cuda-runtime, cuda-nvvm, python, numba-cuda
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: linux-aarch64, win-64, linux-64
System requirements: cuda = "12"
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: cu-12-8-py313
           Features: cu-12-8, test, cu, cu-12, cu-rt, nvvm, py313, default
        Solve group: cu-12-8-py313
           Channels: conda-forge
   Dependency count: 19
       Dependencies: cuda-version, make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark, cuda-nvcc, cuda-nvcc-impl, cuda-cuobjdump, cuda-nvrtc, libnvjitlink, cuda-cccl, libcurand, cuda-runtime, cuda-nvvm, python, numba-cuda
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: win-64, linux-aarch64, linux-64
System requirements: cuda = "12"
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: cu-12-9-py312
           Features: cu-12-9, test, bench, cu, cu-12, cu-rt, nvvm, py312, default
        Solve group: cu-12-9-py312
           Channels: conda-forge
   Dependency count: 23
       Dependencies: cuda-version, make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark, pytorch, pytorch-gpu, libtorch, cupy, cuda-nvcc, cuda-nvcc-impl, cuda-cuobjdump, cuda-nvrtc, libnvjitlink, cuda-cccl, libcurand, cuda-runtime, cuda-nvvm, python, numba-cuda
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: linux-64, win-64, linux-aarch64
System requirements: cuda = "12"
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: cu-13-0-py312
           Features: cu-13-0, test, cu, cu-13, cu-rt, nvvm, py312, default
        Solve group: cu-13-0-py312
           Channels: conda-forge
   Dependency count: 19
       Dependencies: cuda-version, make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark, cuda-nvcc, cuda-nvcc-impl, cuda-cuobjdump, cuda-nvrtc, libnvjitlink, cuda-cccl, libcurand, cuda-runtime, cuda-nvvm, python, numba-cuda
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: linux-aarch64, linux-64, win-64
System requirements: cuda = "13"
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: cu-13-0-py313
           Features: cu-13-0, test, cu, cu-13, cu-rt, nvvm, py313, default
        Solve group: cu-13-0-py313
           Channels: conda-forge
   Dependency count: 19
       Dependencies: cuda-version, make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark, cuda-nvcc, cuda-nvcc-impl, cuda-cuobjdump, cuda-nvrtc, libnvjitlink, cuda-cccl, libcurand, cuda-runtime, cuda-nvvm, python, numba-cuda
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: linux-aarch64, win-64, linux-64
System requirements: cuda = "13"
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: cu-13-0-py314
           Features: cu-13-0, test, cu, cu-13, cu-rt, nvvm, py314, default
        Solve group: cu-13-0-py314
           Channels: conda-forge
   Dependency count: 19
       Dependencies: cuda-version, make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark, cuda-nvcc, cuda-nvcc-impl, cuda-cuobjdump, cuda-nvrtc, libnvjitlink, cuda-cccl, libcurand, cuda-runtime, cuda-nvvm, python, numba-cuda
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: linux-64, linux-aarch64, win-64
System requirements: cuda = "13"
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: cu-13-1-py314
           Features: cu-13-1, test, cu, cu-13, cu-rt, nvvm, py314, default
        Solve group: cu-13-1-py314
           Channels: conda-forge
   Dependency count: 19
       Dependencies: cuda-version, make, pre-commit, psutil, cffi, pytest, pytest-xdist, pytest-benchmark, cuda-nvcc, cuda-nvcc-impl, cuda-cuobjdump, cuda-nvrtc, libnvjitlink, cuda-cccl, libcurand, cuda-runtime, cuda-nvvm, python, numba-cuda
  PyPI Dependencies: ml_dtypes, filecheck
   Target platforms: win-64, linux-64, linux-aarch64
System requirements: cuda = "13"
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

        Environment: docs
           Features: docs, default
        Solve group: docs
           Channels: conda-forge
   Dependency count: 6
       Dependencies: make, psutil, sphinx, sphinx-rtd-theme, numpydoc, numba-cuda
  PyPI Dependencies: nvidia-sphinx-theme
   Target platforms: win-64, linux-64, linux-aarch64
              Tasks: bench-against, build-docs, simtest, test, clean-tests, bench, benchcmp, build-tests

Other files (e.g. script files, source files, etc.):

Issue description

Running pixi lock && pixi install --locked reports

❯ pixi lock && pixi install --locked
✔ Updated lock-file
Error:   × lock-file not up-to-date with the workspace

This seems to cause our CI to fail.

Expected behavior

I would expect that pixi lock updates the lockfile such that --locked on any subcommand that supports it would succeed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions