What's the pattern for when we want to merge user ...
# development
w
What's the pattern for when we want to merge user configuration with Pants configuration? I can imagine a few styles: • Allow for a "template"-style configuration with keywords (ala PyOxidizer config, where we just inject some parameters) • Accept a config and overwrite parts as we see fit (e.g. venv paths) • Accept a config and only add parts that aren't there (non-destructive, but possibly confusing to a user unless they know to leave certain configs empty to let Pants fill) • Some combination/permutation of above • Probably something else involving options/targets I'm going to work on `pyright`'s config, and for some paths/venvs, I'll want to put Pants-generated locations, and ignore everything else. BUT, I can see a use case where a user may want to specify a local development venv for testing (for example)
b
Do what works and makes the most sense to the user? In that order?
w
Yeah, but this is a bit of an API (of sorts), so I'd like to stay theoretically consistent as much as possible
especially when 2-3 options are fundamentally the same/equal effort
h
IIRC there is some precedent, in some of the linters, I forget which ones, where we override user config by reading JSON/TOML, adding to it, and writing it back out
w