docs
docs copied to clipboard
[question] Unrelated changes in conandata.yml affect RREV
- [x] I've read the CONTRIBUTING guide.
When I add a new version to conandata.yml
it changes RREVs of all other versions listed there (because RREV depends on the hash of the whole file) and so all existing binary packages become obsolete. This is very inconvenient. Maybe Conan could use only the current version subtree in conandata.yml
when calculating RREV?
Hi @db4
This is expected. The current solution is using a hook (check the one we are using in conan-center: https://github.com/conan-io/hooks/blob/a52cef5ffed0ff11bed757c42e66a95f792572b8/hooks/conan-center.py#L762) that implement exactly that.
Hi @memsharded
This is expected. The current solution is using a hook (check the one we are using in conan-center: https://github.com/conan-io/hooks/blob/a52cef5ffed0ff11bed757c42e66a95f792572b8/hooks/conan-center.py#L762) that implement exactly that.
Didn't know that, thanks. Maybe this should be the core functionality in Conan 2.0?
Didn't know that, thanks. Maybe this should be the core functionality in Conan 2.0?
Yes, totally, this is why I assigned it as "look into" for next 2.0.0-alpha4, that basically means "having a look and consider something else from Conan side"
We have been discussing and thinking about it:
- It seems the conadata.yml structure is quite arbitrary, having multiple "version" keys (one under "sources", another under "patches").
- There is no Conan convention anywhere in the codebase about this, other users can be using other approaches (like making the versions a first level thing).
Then, having a built-in solution seems unpractical, a bit magic and ad-hoc, and probably can be unexpected in some cases, where the second level entries are not versions (and that is impossible to know, because the versions are not identified by a version
explicit tag, but used directly as keys.)
We have considered a conandata_xxxx()
tool helper (to be used explicitly in recipes in the export()
method), which would make the recipes independent and achieve the same without relying on hooks. As this helper can be done anyway already with around 4-5 lines of python not a priority atm. So we will document this, and present the hook (an isolated one from the whole ConanCenter hooks) as the possible approach.
I am moving this to docs atm, no immediate action in the code (the possible conandata_xxx()
can come later, but not planned right now)