Skip to content

[question] Unrelated changes in conandata.yml affect RREV #2400

Open
@db4

Description

@db4
  • 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?

Activity

self-assigned this
on Feb 6, 2022
memsharded

memsharded commented on Feb 6, 2022

@memsharded
Member

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.

db4

db4 commented on Feb 7, 2022

@db4
Author

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?

memsharded

memsharded commented on Feb 7, 2022

@memsharded
Member

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"

memsharded

memsharded commented on Feb 16, 2022

@memsharded
Member

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)

transferred this issue fromconan-io/conanon Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @db4@memsharded

      Issue actions

        [question] Unrelated changes in conandata.yml affect RREV · Issue #2400 · conan-io/docs