Cleanup OptionStore types#14559
Conversation
9603403 to
e1c4e1f
Compare
|
I've got some work in this direction as well, but I've had no time to look at it recently. I'd really like to put the |
c0cd5cb to
5959a44
Compare
589eedb to
e48802e
Compare
Done. :) There's still a bit of work to do towards cleaning up usage of |
|
PS: I really dislike the augments/pending_options thing. OptionKeys should make having augments useless, and the only thing we really want pending_options for is options that may be valid, but not yet used. Like for a subproject option being set and the subprojects doesn't get trigged, but after a reconfigure is. |
dcbaker
left a comment
There was a problem hiding this comment.
Overall this looks really good to me, just a couple of small nits.
4504065 to
920710c
Compare
920710c to
f8413df
Compare
f8413df to
e42bb21
Compare
Since opt.deprecated is a dictionary with string keys, the lookup must use str() around the user-provided value; with some care because booleans will be the meson-ic 'true' and 'false' instead of Python's 'True' and 'False'. Signed-off-by: Paolo Bonzini <[email protected]>
It is assigned to invoker_method_default_options for clarity, use that name everywhere. Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
e42bb21 to
4bc8c3e
Compare
Make the validators accept any object since that is where the type checking is done. The same is true for listify_array_value, which also performs type checking. Signed-off-by: Paolo Bonzini <[email protected]>
This makes it possible to remove all list cases from first_handle_prefix and callees. Signed-off-by: Paolo Bonzini <[email protected]>
Do not go through string first and OptionKey second. Just pass the OptionKeys down. Signed-off-by: Paolo Bonzini <[email protected]>
Allow OptionStringLikeDict to use non-string data types, and use it as much as possible instead of string-valued dictionaries. Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
A convertor will *accept* something that is definitely a TYPE_var; but the output can be any Python object that the evaluation function desires. Signed-off-by: Paolo Bonzini <[email protected]>
…_options Replace optlist2optdict with a convertor. However, while default_options should use OptionKeys like it did before the option refactoring, override_options keeps using strings. Signed-off-by: Paolo Bonzini <[email protected]>
4bc8c3e to
5c9be51
Compare
Fix cases in which
strwas used for values that could actually be any type valid for an option.Stop going back and forth between lists and dictionaries. Also stop going back and forth between str and OptionKey.