Re: [BuildStream] Specifying default dependencies for element kinds



Hi,

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. Whatever we come up with to improve this situation will
likely also help includes with dependencies, which are still
interesting, in my opinion, as they provide more flexibility (you can
support multiple sets of default dependencies for a single plugin).

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.

Any better ideas ?

Unless I have missed some detail I don't see why such composition
couldn't support this behavior, as other fields already support this.
So, we should be coverted here.

It might not be trivial as dependencies are already needed in the
loader, before plugins are even instantiated. However, we can hopefully
find a reasonable way to implement this.

I don't think this is an issue.

As I mentioned in the previous reply... it is incorrect anyway for
plugins themselves to declare dependencies... or I suppose that it
could be correct if that plugin was only ever going to be used for a
single project (how can the autotools plugin itself know what project
element provides the dependencies it requires ?).

From what I understood, Chandan also recognized this where he agrees
this has to be something that the project can declare.

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


I think this can work very nicely, I tried to envision some chicken/egg
cases with this... but as far as I can see it makes sense that you will
anyway have to use a `manual` or `make` element to build the
buildsystem element `components/buildsystem-autotools.bst`, so
depending on the buildsystem that you require to build the buildsystem
itself should not really be an issue.

Cheers,
    -Tristan



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