Skip to content

jinja profiles folder added to search path - #17432

Merged
czoido merged 2 commits into
conan-io:develop2from
memsharded:feature/jinja_paths_profiles_folder
Dec 11, 2024
Merged

czoido merged 2 commits into
conan-io:develop2from
memsharded:feature/jinja_paths_profiles_folder

Conversation

@memsharded

@memsharded memsharded commented Dec 9, 2024

Copy link
Copy Markdown
Member

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.

@czoido
czoido merged commit e54f491 into conan-io:develop2 Dec 11, 2024
@memsharded
memsharded deleted the feature/jinja_paths_profiles_folder branch December 11, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Make the jinja2 Templates import/include load path consistent with the normal profile include load path

3 participants