Re: [BuildStream] How to synchronize nested junctions



Hi,

On Thu, 2019-04-11 at 00:28 +0900, Tristan Van Berkom via buildstream-
list wrote:
Hi Chandan,

On Apr 10, 2019, at 11:56 PM, Chandan Singh <
chandan chandansingh net> wrote:

I agree that we should try the existing solutions before considering
further enhancements, but I am not sure if we have any existing
solutions for the use-case that I mentioned. Having a junction
matching to the sub-sub-project is what we have now, but it requires
them to be kept in sync. Is there a trick I am missing here? Because I
don't see a way around keeping the two junctions in sync, without
enforcing that as an external process.


I see what you mean, I think the current behavior is to error out if
the refs do not match ?

The current behavior is to use the ref (and subproject options) from
the junction in the top-level project. If two subprojects have possibly
conflicting junctions of the same name and the top-level project
doesn't have a junction of the same name, BuildStream reports an error.

(To be precise, the junction used for conflict resolution doesn't have
to be in the top-level project, a common ancestor of the conflicting
projects is sufficient.)

refs / subproject options of possibly conflicting junctions are not
compared. I.e., even identical junctions in different subprojects are
reported as error if the top-level project doesn't have a corresponding
junction as well.

It would be allowed to leave out the ref in the [base-sdk] junction in
the [core-libs] project. However, that might not be useful if you have
multiple [user-land apps] projects and you want to mandate the same
[base-sdk] for all of them (as long as they use the same version of
[core-libs]). And it would make it impossible to build [core-libs] on
its own.

Maybe a good solution is to have a way to declare the junction such
that I should inherit the ref from the matching junctions in
subprojects ?

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.

Cheers,
Jürg



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