[BuildStream] Renaming junction `target` option name



Hi all,

   This is a simple renaming discussion, a difficult task, but not a
complex mind bender like other threads floating around :)


Some Context
~~~~~~~~~~~~
The `target` configuration on a junction[0] defines a junction in a
subproject from which to derive configuration, or "link this junction
to" in such a way that the local junction becomes the targetted one.

I have been finding this to be counter intuitive, my instinct tells me
that the target is something that this junction replaces, and not the
inverse.

It has been expressed multiple times that "target" makes people think
of an arrow pointing at something, however lacking any further context,
it is IMO completely ambiguous as to what that arrow means (is it the
arrow pointing to the destination file to be replace in a `cp`
statement ? or the link being created in an `ln` statement ?).

This is all mostly documented in !1937[1] which refers to the initial
IRC conversation[2].

There is consensus enough that it is worth renaming the option, but
it's not perfectly clear which alternative to choose.


Alternative names
~~~~~~~~~~~~~~~~~

* "inherit"

  This word has the upsides of being a common term in software
  (OO code, CSS, etc) and being more explicit that:

     "This junction is inheriting the configuration of the
      specified junction"

  The downside I can see with "inherit" is that it might imply
  that a merge might be possible, however documentation and errors can
  be used to ensure users get the picture when trying to use the
  option.

  I think the bottom line here is when you see it in someone's project
  for the first time, it is very obvious what is going on.

* "link"

  This word has the upside of being a common term in filesystem
  terminology which is pattern we generally like.

  This word also has the upside of clearly expressing that a link
  between two junction points is being made, such that there is only
  one real junction (which is what is really happening).

  It does appear to lack some context though, it would be nice to
  use something like a verb, to express what is being done to the
  specified junction.

* "use"

  This was also proposed as an alternative, to mean "use this
  junction".

  This does well to use a verb, but still doesn't seem to be as clear,
  and doesn't have much parallels in software terminology ("using"
  statements in C# for instance have pretty much no baring here).

Despite shortcomings of other words, I really think any of these are
better alternatives to "target" and that it is worthwhile changing.

Any other ideas ?


Decision time
~~~~~~~~~~~~~
The MR is up and currently does the "link" thing, I'll be happy to
change it again, my favorite is still of course "inherit".

Cheers,
    -Tristan


[0]: https://docs.buildstream.build/master/elements/junction.html
[1]: https://gitlab.com/BuildStream/buildstream/-/merge_requests/1937
[2]: https://irclogs.baserock.org/buildstream/%23buildstream.2020-05-05.log.html#t2020-05-05T06:42:26




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