Re: [BuildStream] How to synchronize nested junctions



Hi,

On Wed, Apr 10, 2019 at 4:58 PM Jürg Billeter <j bitron ch> wrote:

I agree that it makes sense to allow configuring a junction such that
it inherits ref and subproject options from a junction in a subproject.
However, I think we should require explicitly specifying the name/path
of that other junction, as per Chandan's first suggestion.

I.e., I don't think BuildStream should attempt to figure out on its own
which subproject's junction to use for ref and subproject options.

I agree that explicit is better than implicit in this case.

Since we seem to be leaning in the direction of the first option I proposed, I
think it would be good to agree on how we want to introduce this feature as it
can be potentially confusing to users.

I was thinking about adding a configuration option to the `junction` element
that will be called something like `element`. When that is specified,
BuildStream should try to load the sub-sub-project specified by that element
instead of returning the sub-project itself.

To continue our example, I think the junction for [base-sdk] in the
[user-land apps] project would look something like:

    kind: junction

    sources:
    - kind: git              # this kind is irrelevant for this example
      url: url-of-core-libs  # note that this refers to core-libs, not base-sdk
      ref: ...

    config:
      element: junctions/base-sdk.bst    # this is the new magic being proposed


In case it makes it easier to reason about this code in form of code, I have
whipped up a quick patch for this, which can be found in
chandan/symbolic-junction branch on GitLab [1]. This is not quite ready for
review just yet but should give a feel of how it would look like.

Let me know how you feel about this. If the approach seems good to people, I
can tidy up the branch, add tests/docs etc.

Cheers,
Chandan

[1]: https://gitlab.com/BuildStream/buildstream/commit/645e5387c2f81765654ce4543ce1f00092e3381b


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