Add support for @fromfile option values.

Review Request #2783 - Created Sept. 8, 2015 and submitted

Information
John Sirois
pants
jsirois/issues/2143
2143, 2144, 2152
2a7de85...
Reviewers
pants-reviews
benjyw, molsen, zundel
Options can now be registered as supporting fromfiles by passing
`fromfile=True`.  When so registered, if the option value starts with
the '@' character, the rest of the value is interpreted as a file path
and the option value is read from that file.

This will open up support for large configuration values being stored
outside of `pants.ini` and in dedicated configuration files on disk. This
facility will make most sense for large string messages, long lists, and
big dictionaries.

 src/python/pants/option/parser.py              | 47 +++++++++++++++++++++++++++++++++--------
 tests/python/pants_test/option/test_options.py | 57 ++++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 93 insertions(+), 11 deletions(-)
CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/79360000
Eric Ayers
Benjy Weinberger
John Sirois
Benjy Weinberger
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...