Implement options scope name deprecation.

Review Request #3884 — Created May 12, 2016 and submitted

jsirois, stuhood, zundel

Allows an Optionable to specify that its current scope is
a new name for an older, deprecated scope.

Takes option values from both scopes, with the usual ranked value
logic (the deprecated scope wins on rank ties), but issues a warning
if any values were explicitly specified on the old scope.

Note: Removes an update() method on OptionValueContainer that is not
used afaict. Adds instead an augment() method with ~similar semantics,
but that takes an OptionValueContainer instead of an attr dict.

I might rename augment -> update once I have a clean CI that proves
that the old update() was indeed not used.

CI passes:

  1. Looks like the CI dropped off the map, but otherwise: looks good.

    1. Huh... Yesterday there were two runs there, #2 was successful.

  2. src/python/pants/option/ (Diff revision 1)

    I wonder if giving ScopeInfo a list of scope names and then allowing some subset of those to be deprecated might be cleaner?

    1. That would require a lot more plumbing, and is a much bigger change in general. I'm not even sure it's a desirable change. What does it mean to have multiple non-deprecated scope names? How do you resolve among them?

      Since this is a rare thing, it seemed much easier to have it be an optional property of the Optionable class.

  1. Thanks for doing this.
    CI shows the doc-gen step failing though right now.
    1. Right comment, wrong review.
  2. Kill this commented out code.
    1. Done, and I renamed 'augment' to 'update', now that a green CI has proven that there were no uses of the old update().

Review request changed

Status: Closed (submitted)

Change Summary: