From 9c7ddf59fee75148153c0a05de727108b74b5ee7 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 6 Jan 2022 15:45:18 -0800 Subject: interpreterobjects: deprecated passing a number to configuration_data.set10 This is currently allowed, and is used in at least a few projects. It was not intended to work or documented, but it does and since it is in use a full deprecation period must be used. A warning has also been added for values < 0, which have surprising behavior. --- docs/yaml/objects/cfg_data.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'docs/yaml/objects/cfg_data.yaml') diff --git a/docs/yaml/objects/cfg_data.yaml b/docs/yaml/objects/cfg_data.yaml index 9a66b73a2..5cc4b8412 100644 --- a/docs/yaml/objects/cfg_data.yaml +++ b/docs/yaml/objects/cfg_data.yaml @@ -41,8 +41,17 @@ methods: type: str description: The name of the variable to set value: - type: bool - description: The value to set as either `1` or `0` + type: bool | int + description: | + The value to set as either `1` or `0` + + Passing numbers was never intended to work, and since 0.62 it has been + deprecated. It will be removed in a future version of Meson. If you + need to pass numbers use the `.set` method. + warnings: + - numeric values < 0 have the surprising behavior of being converted to + [[true]], values > 1 have the more expected but unintentional behavior of + being interpretered as [[true]]. kwargs_inherit: cfg_data.set -- cgit v1.2.3