config: add support for ini option aliases#13831
Conversation
testing/test_config.py
Outdated
There was a problem hiding this comment.
Perhaps worth adding a test where the ini file uses the new name, and the cmdline override uses the old name.
There was a problem hiding this comment.
Great suggestion -- this case is actually broken. It worked in my version before #13830 but broke after it.
I pushed the broken test now, will work on the fix later.
One option is to revert #13830, but the version before was pretty unruly, I still think #13830 is a good idea.
My thinking is to track the origin of ini values in inicfg (change it from dict[str, str] to dict[str, IniValue] where IniValue contains the value and origin -- configuration file or cli override). Then we give priority to overrides even if they're alias and the canonical is defined. Maybe the origin can be used for better error messages as well.
There was a problem hiding this comment.
Implemented this, pushed as a separate commit (will squash before merging).
|
Btw your |
|
We want an alias -> canonical mapping, because it's used by the cached |
Fix #13829.
Currently based on #13830 -- please skip that commit.