Refactor options bootstrapping.
Review Request #1453 — Created Dec. 9, 2014 and submitted
|jsirois, patricklaw, zundel|
Instead of free-floating functions, the bootstrapping is now
encapsulated in a bootstrapper class. This class exposes both the
bootstrap and full options.
This is necessary to support the startup sequence in pants_exe.py properly:
- To create full options we need the known scopes.
- To get the known scopes we need to load plugins and extensions.
- The plugin and extension registration code may use config.
Therefore we need a way to load the bootstrap config, then do some work,
then load the full options.
Currently we achieve this with a gross manual config-reading hack in pants_exe.py.
This change will allow us to get rid of that hack.
This change also fixes an issue where in tests the buildroot wasn't plumbed in
everywhere it should be.
Unit tests pass. Integration tests pass.
Revision 2 (+157 -125)
This may be coincidental, but our builds have been red since this landed: https://travis-ci.org/pantsbuild/pants/builds
python3.2 has crept back in to the interpreters being selected from raising errors for unicode literals. The --interpreter arguments used by the ci.sh script are global options which are tied up in the bits this RB touched so I'm leaning towards not coincidence.