Count me among those who thought the required 'pants.ini' was surprising. This opens up perhaps more intuitive behavior for us, since we maintain a sub-monorepo with lots of inherited config. Thanks Benjy.
Is this test showing that the flag overrides the environmental variable? PANTS_CONFIG isn't registered in the bootstrapper.
An option to set the location of config files.
Review Request #3463 — Created Feb. 15, 2016 and discarded
|kwlzn, mateor, patricklaw, stuhood|
This option is special-cased, to work around the obvious
Why is this useful?
- Previously the default pants.ini location was automagically located
and used, which was potentially surprising to people trying to
override it. Now it's simply the default value of an option, which
- It allows us to generate reference documentation without applying
our pants.ini-based defaults, by setting the flag to an empty list.
- It allows us to remove the configpaths= constructor argument to
OptionsBootstrapper, which was only used in tests anyway.
- In the future it will allow us to deprecate --config-override, and
possibly the pantsrc-related options, and consolidate everything into
the single --pants-config-files option.
CI away here: https://travis-ci.org/pantsbuild/pants/builds/109265229
|def get_buildroot is currently defined in terms of a hardcoded lookup for a 'pants.ini' file, so I think there is ...||ST stuhood|
Thanks a lot for doing this Benjy!
def get_buildrootis currently defined in terms of a hardcoded lookup for a 'pants.ini' file, so I think there is a bit more to do here. As implemented in this review,
--pants-config-fileswill only work if there is some pants.ini file in the search path used by
To get around that, you might want to add the buildroot location as another option? It could continue to default to the path of the pants.ini file as specified by
--pants-config-files(with an error indicating that it needs to be specified explicitly if more than one have been specified?)