-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support loading config from multiple files.
This subsumes two disparate pieces of functionality: A) PANTS_CONFIG_OVERRIDES. B) rcfiles. A) This env variable has been retconned int a --config-overrides bootstrap option. B) Rcfiles used to contain extra command-line flags for various commands, which was weird. Since all flags are now options, and so can be set from config, the new rcfiles are just regular pants.ini-style config files. After deploying pants with this commit, existing rcfiles will need to be converted to pants.ini style. However currently rcfiles are broken anyway, so this isn't an onerous requirement. This commit also includes various changes needed to get things to work under this new config scheme. Some of these are temporary hacks that will go away when we get rid of Command, or when we get rid of all direct accesses to config. One prominent change is a modification to config caching. Previously configs were keyed by the file they were read from. But in practice code always calls Config.from_cache() with no argument, which defaults to the regular pants.ini. This leads to dangerous confusion when config can be read from other files. So now there's just a single global cached config, which must be set explicitly. Again, this will go away once we convert all direct config accesses to options accesses, and plumb options through to all the necessary places. Testing Done: CI passes. Reviewed at https://rbcommons.com/s/twitter/r/1442/
- Loading branch information
Showing
27 changed files
with
251 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.