Re: Project options and other format enhancements (and dropping "variants")



On 15/09/17 13:40, Paul Sherwood wrote:
On 2017-09-15 13:11, Sander Striker wrote:
My biggest concerns with the S expressions proposal is that it has the
potential of being too flexible.  And that it can become too hard to
quickly grasp what a .bst describes.  I liked the clear declarative
syntax of variants and archs.  They are easy to understand.  Seeing
'??' blocks does affect legibility.  I understand this is a trade-off
to become more flexible, but am wondering if we are overshooting.
I agree about legibility, but I think the proposed approach is actually 
the simplest way to achieve the requirement of allowing multiple 
independent variants.
Once we go down the route of adding a generic expression language and 
arbitrary config modifications then yes, users can go nuts with that and 
make stuff that's totally overcomplicated and unreadable. But the same 
is true of pretty much any useful tool out there.
The saving grace for me is that the options will need to be predefined 
in the project.conf file, so we are still a long long way from the 
"arbitrary variables which can be modified anywhere and have an effect 
anywhere else" mess that is BitBake. All the config inputs to the 
pipeline are defined up front, and ideally the range of values they can 
take will be defined up front in the same place, so you can at least be 
sure that your project is either in one state or the other. It may be 
that some element does broken stuff in one of the states, but we won't 
have the issue of not even knowing what state we're in because something 
overrode the variable at some point during execution.
I have a similar view. Previously in the Baserock discussions I was against conditionals and in general over the years I've tried to simplify the definitions format as much as possible.
I'm worried that this could be starting down the slippery slope that 
ends up with yet another too-complex-to-grok way to specify builds. Are 
there any counter-proposals?
Multiple independent variants are a requirement, so I don't think 
there's any way to avoid conditionals. We got away with it in Baserock 
so far by manually writing out both sides of the variant, such as when 
we duplicated the entire graphics stack into X and Wayland strata. This 
really doesn't scale, in fact it was awful to work with even for that 
fairly trivial case.
Sam




--
Sam Thursfield, Codethink Ltd.
Office telephone: +44 161 236 5575


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