Re: [BuildStream] Allowing duplicate junctions [Was: Be explicit when overriding junction configuration, or else warn/error]
- From: Jürg Billeter <j bitron ch>
- To: Tristan Van Berkom <tristan vanberkom codethink co uk>, Benjamin Schubert <contact benschubert me>
- Cc: Chandan Singh <chandan chandansingh net>, "buildstream-list gnome org" <buildstream-list gnome org>
- Subject: Re: [BuildStream] Allowing duplicate junctions [Was: Be explicit when overriding junction configuration, or else warn/error]
- Date: Sat, 06 Jun 2020 12:51:58 +0200
Hi,
On Fri, 2020-06-05 at 18:18 +0900, Tristan Van Berkom wrote:
[...]
You are touching upon a flaw I've been thinking of since last night.
It should not be possible for a project to mark *both* conflicting
projects as "duplicate", but only the ability to mark one project as a
duplicate of the other (or possibly multiple projects as a duplicate of
a single one).
Perhaps this can be addressed by causing an error to occur if ever
duplicates are listed for all instances of a project, another approach
might be to change this semantic to use a dictionary instead of a list
(denoting which subproject junction is a duplicate of which, allowing a
bit more validation to catch this before hand).
We also need to cover the (presumably rare) case where there are more
than two junctions to the same project. If we want to be explicit and
list both/all conflicting junctions, what about something like this?
duplicate:
project-foo:
- local-foo-junction.bst
- subproject.bst:sub-subproject-foo.bst
project-bar:
- local-bar-junction.bst
- ...
I.e., have a list for each project where duplicate instances are
allowed (except `internal`) and then require listing all these
junctions.
When inheriting duplicate declarations from a subproject we would merge
duplicate lists per project (prefixing the declarations from the
subproject with the subproject's junction name, of course). This should
allow declaring an extra duplicate in the top-level project without
having to know about deeply nested junctions that have already been
marked as duplicate by a subproject.
Cheers,
Jürg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]