Re: [BuildStream] Specifying default dependencies for element kinds



Hi,

TL;DR let's try to minimize the syntactic sugar required in .bst files for list composition.

On Thu, Jun 13, 2019 at 10:31 AM Tristan Van Berkom via buildstream-list <buildstream-list gnome org> wrote:
[...]
On Thu, 2019-06-13 at 08:17 +0200, Jürg Billeter wrote:
[...]
> I agree that the default composition behavior for lists is not ideal in
> this case.
[...] 
Indeed, it's not ideal in this specific case that the overlaying
dictionary need to be aware of whether or not the underlying exists or
not, if they want to append/prepend.

Perhaps we could introduce an error-free prepend/append semantic:

  foo:
    (->):
    - append or create list
    - if doesn't already exist

But I admit this would look a bit like voodoo if it was used in every
dependency list declaration in build elements in the project.

That would be something that we should avoid.  Just like trying to avoid includes in every build element, it should be possible for the build elements themselves to be clean/minimal.
 
Any better ideas ?

Make error free append the default operation (even when it is not specified).  Which means that in the common case you don't need any syntactic sugar.  And use overwrites in your elements for the cases where you need to be very explicit, ignoring project.conf.

[...]
So, this would have to be declared in project.conf like so:

  elements:

    # Autotools build element overrides...
    autotools:

      # Specify automatic build dependencies
      build-depends:
      - components/buildsystem-autotools.bst

+1.

[...] 
Cheers,
    -Tristan

Cheers,

Sander


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