Open maksim-petukhov opened 2 months ago
Have you seen conan lock update
? It's available from Conan 2.5.0, and is meant to solve cases like this where it's a bit confusing as to how to update a specific reference :)
Have you seen
conan lock update
? It's available from Conan 2.5.0, and is meant to solve cases like this where it's a bit confusing as to how to update a specific reference :)
I've seen it. From the docs The command will replace existing locked references that matches the same package name with the provided argument values
. I do not want to provide anything by hand. I want conan to get latest revision of qt
from a remote (in my case it is 64e483ec8cfebb74e03da891c848e5a4
), to put it cache and then update the lockfile with the new reference
@memsharded could you please comment on this issue?
I've seen it. From the docs The command will replace existing locked references that matches the same package name with the provided argument values. I do not want to provide anything by hand. I want conan to get latest revision of qt from a remote (in my case it is 64e483ec8cfebb74e03da891c848e5a4), to put it cache and then update the lockfile with the new reference
The lockfiles
are actually locking things, this is its main purpose. Trying to have both packages locked and updated are contradictory goals.
If you want to get some specific package version "unlocked", then you can remove it from the lockfile with conan lock remove
. Then, the next conan lock create
will resolve to the latest one, or if using other command like conan install
, then you can provide --lockfile-partial
argument to let it resolve even if it is not in the lockfile.
Any further question here @maksim-petukhov?
What is your question?
Hi. I started to use lockfiles and I have my libraries locked inside conan.lock (I used
conan install ... -lockfile-out=conan.lock
to create it and didn't edit it or usedconan lock ...
commands on it). Among them -qt/5.15.10#3c0bbf763b778e7b7fc6663eea043447
which I want to update. I've added some patches, built the package and now I have a new revision of it (qt/5.15.10#64e483ec8cfebb74e03da891c848e5a4
) in our Artifactory. I also have a new requirement in my conanfile which I want to lock (let's saycpython
). What I've tried so far:conan install . --profile:host ... --profile:build ... -o=&:my_option=my_value --lockfile-partial --lockfile-out=conan.lock --update
returnsERROR: Requirement 'cpython/...' not in lockfile
. But the documentation clearly states--lockfile-partial Do not raise an error if some dependency is not found in lockfile
. Why do I have an error then?On the other hand this doesn't return an error (I moved
--lockfile-partial
to the beginning) and it addscpython
to the lockfile, though it doesn't update a reference of aqt
in a lockfile:conan install . --lockfile-partial --profile:host ... --profile:build ... -o=&:my_option=my_value --lockfile-out=conan.lock --update
. Again, according documentation--update Will install newer versions and/or revisions in the local cache for the given reference, or all in case no argument is supplied.
and I believe that's what I want.In the logs I have:
If I specify that I want to update
qt
it also doesn't update a reference of aqt
in a lockfile:conan install . --lockfile-partial --profile:host ... --profile:build ... -o=&:my_option=my_value --lockfile-out=conan.lock --update=qt
.Same logs.
So, how do I update the reference of
qt
in the lockfile to the latest available in the remote revision ofqt
?conan 2.5.0
Have you read the CONTRIBUTING guide?