Fixup the options bootstrapper to support boolean flags.

Review Request #1660 - Created Jan. 25, 2015 and submitted

John Sirois
benjyw, lahosken
Previously --no-* flags were ignored during options bootsrapping and,
for example, --no-pantsrc would thus be ignored. This fix lifts some
shared structure for flag classification and adds a (previosly failing)
test to confirm boolean no-arg bootstrap options can be inverted via
command line flag. The change does not address value defaulting through
env and config but probably makes it cleaner to address this hole in
uniform option handling should we decide to.

 src/python/pants/option/             |  9 ++++++++-
 src/python/pants/option/                           | 44 ++++++++++++++++++++++++++++++++------------
 tests/python/pants_test/option/ | 22 +++++++++++++++-------
 3 files changed, 55 insertions(+), 20 deletions(-)

I came across this problem working on another branch. It led to
mysterious integration test errors since the integration test baseclass
passes --no-pantsrc to the pants subprocess and I had a ~/.pants.rc
fouling test expectations.

CI went green here:

Larry Hosken
John Sirois
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Benjy Weinberger

Thanks for fixing! See minor comment below.

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

This comment now seems confusing in this location. Either move, rephrase or just remove entirely.

  1. Agreed - killing it here: