Closed realbogart closed 4 months ago
Hi @realbogart
Thanks for your question.
If the existing binary has:
existing: my_python_requires/3.3.1@internal/stable#3361cb4779f74091834b3dec2b3f52002361059e
It means that the binary was created using revision_mode
instead, not minor_mode
. Maybe the mode was temporarily changed?
It doesn't really matter that it matches down to the channel, the correspondence must be identical, as the package_id
is the hash of it, it is not symbolical, it takes all the information in conaninfo.txt
and hashes it. It is not doing any compatibility or analysis, either the resulting package_id
is the same or not.
Hi @memsharded,
I understand. Thank you for your answer.
Is it possible to manipulate conaninfo.txt
after a package has been created? We ended up in a situation where we had to rebuild all packages just to update conaninfo.txt
with the new minor_mode
string.
Is it possible to manipulate conaninfo.txt after a package has been created?
I am afraid it is not possible. Packages are immutable. The conaninfo.txt
contents is also hashed in the conanmanifest.txt
, and changing it would break the integrity of the package. Also, changing it a posteriori wouldn't change the package_id
that was computed from it, as that was already stored in metadata, it is not computed all the time from conaninfo.txt
. Maybe with a high expertise in server-side file and folders manipulation it might be possible to do a big hack, but sounds complicated and risky.
That all makes sense. Even though I understand the technical reasons for why we had to rebuild the packages, I feel that it shouldn't be necessary. But that would then require a fancier comparison of the parts of conaninfo.txt
, instead of just a hash.
Thank you for your help!
That all makes sense. Even though I understand the technical reasons for why we had to rebuild the packages, I feel that it shouldn't be necessary.
I understand that. In general, the way package_id
is managed tends to be "safer", in the sense that it is better to have to rebuild something because a package_id
changed for some reason, than skipping a necessary build from source that will inevitably happen if the computation logic of the package_id
from conaninfo.txt
gets more complicated (as a reminder, we had a bit more complex computation in Conan 1, and it was not just hashing the conaninfo.txt
, and it had some issues and challenges for very little value). Having a 1:1 correspondence between the package_id
<-> conaninfo.txt
and a very easy way to compute them, just hashing the file is overall and advantage, but yes, as always in computers, it is a trade-off.
I think the behavior is clarified, I am closing the ticket as resolved, but don't hesitate to re-open or create new tickets if you have any other question. Thanks for the feedback!
Thanks again!
We are getting errors due to missing binaries for some dependencies and we don't understand why. Here is the result of running
conan graph explain
:We are using the following
default_python_mode
setting inglobal.conf
:core.package_id:default_python_mode=minor_mode
Shouldn't it then find the binary since both the major and the minor version matches?
Thank you!