jinja profiles folder added to search path #17432
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog: Feature: Adding the Conan cache "profiles" folder to the jinja2 search path, so profiles can be included/imported from jinja syntax even for parent and sibling folders.
Docs: conan-io/docs#3950
Close #17431
I think this shouldn't have a high risk, because it is adding a new search path to the
FileSystemLoader
. That means that Conan will keep looking for the paths for imported/included in exactly the same way, and only after exhausting the search, will start searching in the added path. So the jinja rendered shouldn't change the found files, and only add new files that were not found before (failing with an error, so it cannot break)I have only added the
profiles-folder
in the cache, I don't think for a local folder not in the cache, a clear "base" path doesn't exist, so not possible to define that base search path.