#17748 How to merge user configuration files with Pants configuration files
New discussion created by
sureshjoshi
From Slack:
https://pantsbuild.slack.com/archives/C0D7TNJHL/p1669737065712459
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)
Josh
Do what works and makes the most sense to the user? In that order?
Benjy
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
pantsbuild/pants