Re: Low level compiler tuning (was: Re: Project options and other format enhancements (and dropping "variants"))



On Wed, 2017-09-20 at 14:03 +0000, Sander Striker wrote:
[...]
The conditional variables look like an interesting approach.

Random thought, might we actually want to limit conditionals to
variables for now?  If we end up wanting to change conditionals it
would be contained.

I think this would be restrictive on how people express their projects,
and not always in a good way.

We do a lot of macro building (like the yaml in all the build element
classes) which is where this would work well, but then we are forced to
write much more macros for the sake of making things conditional; and
we dont end up with the nice balance of custom element specific build
and install commands.


That; and there is a (not insurmountable) technical difficulty with
this: Variables are not something transparent to Element plugins;
Element plugins have configuration, and Element plugins are allowed to
support variable expansion in their configurations.

Supporting variable expansion in configuration amounts to calling
Element.node_subst_member() instead of Plugin.node_get_member().

This means that, unless we force variable expansion on all loaded
configuration yaml and change the above, some configurations would be
impossible to make conditional.

Cheers,
    -Tristan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]