Closed AbrilRBS closed 8 months ago
@RubenRBS Would be possible to name the package reference instead? I looked the yaml first, without reading the description, with no context, I really didn't get the idea. My point is trying to make the yaml clear without needed to search in docs about the format or what is it about.
Could it be:
sources:
...
patches:
...
requirements:
"0.35.0":
- "wasmtime/0.35.1"
So, we could:
def requirements(self):
for requirement in self.conan_data.get("requirements")[self.version]:
self.requires(requirement)
# Now we move all dependencies from conanfile.pys in CCI to conandata.yml #joke
Of course, it could result in users abusing of it, instead of using conanfile.py. But we know it's for a specific case.
This will allow to have an extra fields in the
conandata.yml
file, which is meant to contain things that the recipes use on a per version basis. ie,wasmtime-cpp
(Among many others) contains a version mapping inside the recipe, so every time a new version is added, the revisions of every other version also get modified (https://github.com/conan-io/conan-center-index/pull/23172/files#diff-1a9d4053acc279660d5b2b73ca7f473b969b33b25621bdad9465c9da9f84fd65R47)This allows the
trim_conandata
hook to keep the old revisions for older versions :)Note that we'll be conservative when allowing these fields in PR reviews, so a good reason might need to be provided in order for us to accept these if its usage falls outside the example shown below
The idea is to move those kinds of mappings from
to conandata.yml
conanfile.py
or similar :)