Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jinja profiles folder added to search path #17432

Merged

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Dec 9, 2024

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
33 checks passed
@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
3 participants