conda / conda-lock

Lightweight lockfile for conda environments
https://conda.github.io/conda-lock/
Other
456 stars 101 forks source link

Fix documentation regarding relocking #645

Closed maresb closed 2 weeks ago

maresb commented 3 weeks ago

It seems that part of #632 doesn't accurately reflect the current behavior of how existing lockfiles are used when relocking.

https://github.com/conda/conda-lock/pull/632#issuecomment-2156733823

sfinkens commented 2 weeks ago

As far as I can tell, there's currently no direct way to add a new package while keeping the rest fixed. Right? So I would just remove that section.

maresb commented 2 weeks ago

I think it's possible by adding the new package to environment.yml and then run conda-lock --update newpackage, though I haven't tested it.

Unfortunately --update is pretty broken at the moment due to https://github.com/conda/conda-lock/issues/639. :see_no_evil:

sfinkens commented 2 weeks ago

I think it's possible by adding the new package to environment.yml and then run conda-lock --update newpackage, though I haven't tested it.

That works, but also updates all the existing packages. Same without --update

maresb commented 2 weeks ago

Is it actually updating the existing packages or is it merely clobbering the extensions?

sfinkens commented 2 weeks ago

I'm not sure I understand what you mean by clobbering extensions. But I think it's updating. For example, I have numpy=1.25 in the lockfile, then add pandas to the environment file and run conda-lock again. After that I have numpy=1.26 in the lockfile.

maresb commented 2 weeks ago

Ah, thanks for the clarification, I guess it is updating the existing packages. (By "clobbering extensions" I meant replacing all .conda builds with .tar.bz2.)