You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature will be complicated to add. Since a dictionary contains two types, key & value, it does not play well with the existing ArgumentTypeDescriptors which take an IArgument. Some of the descriptors need access to the Arity for the argument for parsing logic. In the case of bool, Arity is used to determine if the bool is a flag. Creating a KeyValueArgumentTypeDescriptor is easy enough but it cannot, in turn, call the other type descriptors to parse the type. I looked at adding ITypeInfo overloads but then Arity is not available for bool. Adding both IArgument and ITypeInfo can create confusion because the argument arity may not apply to the ITypeInfo being passed in.
Possibly we create a ITupleComponentArgumentTypeDescriptor interface and if a type does not implement it, then it can't be used in dictionaries. This does not feel elegant and it's an interface devs have to remember to implement. On the plus side, it's clear why you're adding it and what the inputs are. I don't think it's the right approach and I'm only mentioning it in the spirit of talking through ideas.
Picocli has some good conventions for this: arrays_collections_maps & split_regex
Some additional considerations:
Use the same split properties from #250
For operands, the dictionary has the same rules as a list. There can be only one and it's at the end. List or Dictionary, but not both.
How do we show this in help?
Do we support null values?
key1=value1,key2=,key3=value3
The text was updated successfully, but these errors were encountered: