fix: passed arguments should take precedence over values in config#2100
fix: passed arguments should take precedence over values in config#2100bcoe merged 12 commits intoyargs:mainfrom jly36963:fix-config-and-variadic-args
Conversation
bcoe
left a comment
There was a problem hiding this comment.
What's the specific breaking change this will expose ... if it's behavior that people would never want, and no tests caught it, then I could imagine us not taking this as a major change -- worst case perhaps we could put this behavior behind a flag, to help people bumping into issues, and then swap the default value in the next major.
|
@bcoe I'm not sure I understand you correctly. Does your comment states this change will not be included until next major release unless it is hidden behid a flag or the other way around - it is for such an uncommon (rare) case that the author should not worry about any breakage? |
bcoe
left a comment
There was a problem hiding this comment.
Thinking on this one a bit, a couple things jump out at me:
- Rather than implicitly deciding whether to concat values, based on whether a default value has been configured for a key, better that we figure out a way to track (during parsing) whether a default value has been used -- we've talked in the past about adding an
isDefaultedmethod, this would be a great feature for users, and would also allow us to simplify this logic. - Providing config feels different than default values, and I could imagine 50% of people wishing that values would be combined, and the other 50% wishing for the opposite behavior. This makes me think that rather than taking this as a breaking change, we'd do better to introduce a parser flag, to allow folks to configure which approach is taken.
|
Questions:
|
|
@jly36963 thank you for this great work 👏, I will make an effort to review soon. |
Relates to:
issue: #2096
PR: #1992
PR: #2006
Problem
There were a few problems with pull 1992:
Questions
BEGIN_COMMIT_OVERRIDE
fix: veriadic arguments override array provided in config (the same as multiple dash arguments).
END_COMMIT_OVERRIDE