https://pantsbuild.org/ logo
w

wide-midnight-78598

11/29/2022, 3:51 PM
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

bitter-ability-32190

11/29/2022, 3:55 PM
Do what works and makes the most sense to the user? In that order?
w

wide-midnight-78598

11/29/2022, 4:12 PM
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

happy-kitchen-89482

11/29/2022, 7:34 PM
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

wide-midnight-78598

12/08/2022, 3:19 PM