You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're experimenting with using the local-recipes-index. For a meta-package we have, we have historically just had it located in <repo>/recipes/package-foo/conanfile.py. We use the set_version() method to use dynamic git-based versioning of the version. We're wanting to move it into <repo>/recipes/package-foo/all/conanfile.py but configuring it in a static config.yml without pattern matching then becomes problematic.
This may be a chicken and egg request however, since the config.yml seems to serve as an index of available versions?
Is there a way to "properly" index this in the layout, or do we still need to resort to just directly conan exporting the recipe, and have the version obtained in that way? IOW, not usable directly from local-recipes-index.
The problem is that we'd like to ship it alongside other recipes in the repo, even if it needs to be directly exported. However, when trying to do simple things like conan list "*" -r=local-index I get an error of "Corrupted repo, folder package-foo without 'config.yml'. For now I've just put a dummy version of 0.0.0in theconfig.yml`, but it'd be nice to have a better option.
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
forrinrecipes:
ifr.startswith("."):
# Skip hidden folders, no recipes should start with a dotcontinueifnotfnmatch(r, name_pattern):
continuefolder=self._get_base_folder(r)
config_yml=self._load_config_yml(folder)
ifconfig_ymlisNone:
raiseConanException(f"Corrupted repo, folder {r} without 'config.yml'")
versions=config_yml["versions"]
forvinversions:
So yes, it leverages the config.yml versions to resolve all the versions. It is the only way it is tractable, if every recipe had to be loaded to process the versions, it will be very slow.
For a meta-package we have, we have historically just had it located in /recipes/package-foo/conanfile.py. We use the set_version() method to use dynamic git-based versioning of the version.
It is designed for third-party packages, where recipes in one repository are creating packages with sources located elsewhere. To package your own code, the standard practice of adding conanfile.py recipes along with the source code and using the standard conan create flow is recommended.
Your meta-package is not a third-party, but a first party. Trying to make it fit in the local-recipe-index structure doesn't fit naturally.
So I am afraid that this will not be possible, chicken-and-egg, versions need to be read from the config.yml for this to work. Thanks for the suggestion anyway!
What is your suggestion?
We're experimenting with using the local-recipes-index. For a meta-package we have, we have historically just had it located in
<repo>/recipes/package-foo/conanfile.py
. We use theset_version()
method to use dynamic git-based versioning of the version. We're wanting to move it into<repo>/recipes/package-foo/all/conanfile.py
but configuring it in a staticconfig.yml
without pattern matching then becomes problematic.This may be a chicken and egg request however, since the
config.yml
seems to serve as an index of available versions?Is there a way to "properly" index this in the layout, or do we still need to resort to just directly
conan export
ing the recipe, and have the version obtained in that way? IOW, not usable directly from local-recipes-index.The problem is that we'd like to ship it alongside other recipes in the repo, even if it needs to be directly exported. However, when trying to do simple things like
conan list "*" -r=local-index
I get an error of "Corrupted repo, folder package-foo without 'config.yml'. For now I've just put a dummy version of
0.0.0in the
config.yml`, but it'd be nice to have a better option.Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: