-
Notifications
You must be signed in to change notification settings - Fork 949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] conan lock create --update
doesn't appear to work
#16267
Comments
Hi @rconde01 Thanks for your feedback. I think this is the need of further clarification in the docs. Let me try to clarify: The lockfile fixes the versions and revisions that are used from dependencies. Its purpose is to effectively block the update of those versions and revisions when these new things are published. On the other hand, the Both are kind of opposing forces, but they can also work together without conflicting, and this is the case of partial lockfiles. A lockfile can lock some things, but not others. In this case, it is perfectly valid to have both a lockfile that completely locks what it defines, avoiding them to use new versions or revisions, and at the same time can What is not possible is to update a locked version/revision of a lockfile. That is intended to be fixed and never be modified, no matter what happens in the cache or in the remotes, it is the reason to use a lockfile. It is not possible to both lock and not lock at the same time. If the intention is to create a new lockfile with updated versions, then this is also possible, it is the equivalent of not locking, so using the same |
To clarify, when I say "update a lock file", I mean to use a lock file as input, generating a new lock file and overwriting the original. Putting the meaning of
You may want to update revisions in these cases, while staying on the same version of the library. Additionally, you don't necessarily want to update the revisions of EVERYTHING in the lock file which would potentially require every package to be rebuilt. So, I think having the capability to do that via a conan command would be useful. I need to try it, but I think a workaround is to:
|
The problem is that there are no semantics for this, how to know that you want to update only the revisions, but not the versions? In any case, I think there is a way to achieve this. You can remove the revisions you want to "free" from a lockfile and feed it, and Conan will be able to resolve to the non-locked revisions while keeping the versions locked, maybe you want to give that a try. |
My initial thought was that e.g.
Hmm...I think the problem there is maybe the revisions of any dependencies of the thing you want to update. I guess I would expect to update all those revisions as well, but I admit that seems a bit subjective. |
Upon further reflection, I guess targeting just the specific reference makes sense since theoretically that package shouldn't care about the package revisions of it's dependencies. |
Describe the bug
conan_update_revision.zip
Conan 2.3
The
--update
option says:In the attached test, I have a lock file which references a recipe revision which is not the newest revision in conan center. I call
conan create lock --update ...
and I would have expected the revision to be updated to the latest. However, it does not change.How to reproduce it
python test.py
test.py setups up a virtual environment and then installs conan and sets CONAN_HOME to a relative dir. The test then attempts to update the lock to the latest revision but nothing happens.
The text was updated successfully, but these errors were encountered: