Coder Social home page Coder Social logo

Comments (5)

baszalmstra avatar baszalmstra commented on June 4, 2024

That is strange, could you run the command with -v? That will tell us why the lockfile is out of date.

from pixi.

fpaniagua avatar fpaniagua commented on June 4, 2024

Interesting.

So going back to prior version of pyproject.toml, and re-generating lock via v0.20.1

$ ~/.pixi/bin/pixi --version
pixi 0.20.1
$ rm pixi.lock
$ ~/.pixi/bin/pixi install
✔ Project in <abc> is ready to use!

Now validating lock file via a task run

$ ~/.pixi/bin/pixi --version
pixi 0.20.1
$ ~/.pixi/bin/pixi run --locked --environment <abc> some-task
$ echo $?
0

Now trying pixi v0.21.1

$ pixi --version
pixi 0.21.1
$ pixi run --locked --environment <abc> some-task
  × lock-file not up-to-date with the project
$ pixi run -v --locked --environment <abc> some-task
...
 INFO pixi::lock_file::outdated: environment '<xyz>' is out of date because the channels in the lock-file do not match the environments channels
  × lock-file not up-to-date with the project

is an entirely different environment than .

I will see if I can get to a minimally reproducable pixi.toml or pyproject.toml.

from pixi.

fpaniagua avatar fpaniagua commented on June 4, 2024

This seems to reproduce:

# pyproject.toml
[project]
name = "pixi-example"
requires-python = ">=3.11"

[tool.pixi.project]
name = "pixi-example"
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64"]

[tool.pixi.tasks]

[tool.pixi.feature.prod]
channels = ["conda-forge", "pytorch"]

[tool.pixi.feature.prod.dependencies]
python = "3.11.*"

[tool.pixi.feature.empty.dependencies]

[tool.pixi.environments]
default = {features = ["prod"], solve-group = "default"}
prod = {features = ["prod"], solve-group = "default"}
empty = {features = ["empty"], solve-group = "default"}
$ ~/.pixi/bin/pixi --version
pixi 0.20.1
$ ~/.pixi/bin/pixi install       
✔ Project in /<abc>/pixi-example is ready to use!
$ ~/.pixi/bin/pixi install --locked
✔ Project in /<abc>/pixi-example is ready to use!
$ pixi --version
pixi 0.21.1
$ pixi install --locked --verbose
 INFO pixi::config: Global config not found at /etc/pixi/config.toml
 INFO pixi::config: Global config not found at /<abc>/.config/pixi/config.toml
 INFO pixi::config: Global config not found at /<abc>/Library/Application Support/pixi/config.toml
 INFO pixi::config: Global config not found at /<abc>/.pixi/config.toml
 INFO pixi::environment: verifying prefix location is unchanged, with prefix file: /<abc>/pixi-example/.pixi/envs/default/conda-meta/pixi_env_prefix
 INFO pixi::lock_file::outdated: environment 'empty' is out of date because the channels in the lock-file do not match the environments channels
  × lock-file not up-to-date with the project

from pixi.

fpaniagua avatar fpaniagua commented on June 4, 2024

So i re-generated lock file via v0.21.1, and saw the empty environment has the same channels as the prod/default:

environments:
  default:
    channels:
    - url: https://conda.anaconda.org/conda-forge/
    - url: https://conda.anaconda.org/pytorch/
...
  empty:
    channels:
    - url: https://conda.anaconda.org/conda-forge/
    - url: https://conda.anaconda.org/pytorch/
...
  prod:
    channels:
    - url: https://conda.anaconda.org/conda-forge/
    - url: https://conda.anaconda.org/pytorch/

I noticed I had them share the same solve group. So attempted a version with that modified:

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

Now --locked validation works with v0.21.1 on a v0.20.1 generated lock file.

from pixi.

baszalmstra avatar baszalmstra commented on June 4, 2024

Ah right! There was indeed a bug in older versions where the channels were not properly recorded for an environment in the presence of solve groups.

from pixi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.