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

Use jinja2 templates for editable layouts #4424

Closed
danimtb opened this issue Jan 30, 2019 · 1 comment

Comments

4 participants
@danimtb
Copy link
Member

commented Jan 30, 2019

Syntax in editable layouts are currently using placeholders like {settings.build_type} to make some conditional logic regarding folder paths.

We knew it has some limitations specially with placeholder like {options.shared}, that will replace the value with a True/False instead of a useful value.

We evaluated the following:

  • Inline evaluation of python code
  • Evaluation of field headers like [includedirs#settings.build_type==True]
  • Python syntax in layout.py implementing a package_info()
  • Jinja2 templating

And decided that jinja2 is a fairly common orthogonal language used in a lot of tools, syntax is well documented and contemplates many conditional scenarios. Also this should be quite easy to implement.

The information available in this jinja2 templates should be options and settings.

@danimtb danimtb added this to the 1.13 milestone Jan 30, 2019

@danimtb danimtb added this to To do in Packages in editable mode via automation Jan 30, 2019

@memsharded

This comment has been minimized.

Copy link
Contributor

commented Feb 4, 2019

Changed complexity, I think using jinja template engine for this should be relatively easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.