Currently Meson allow the following (Muon does not): ```meson option('foo', type : 'boolean', value : 'true') option('bar', type : 'integer', value : '42') ``` This is possibly a holdover from very old code, but it's a bad idea and we should stop doing it. This deprecation is the first stop on that journey.pull/11277/head
parent
f5eaebb4b4
commit
43a2404707
6 changed files with 28 additions and 3 deletions
@ -0,0 +1,9 @@ |
|||||||
|
## coercing values in the option() function is deprecated |
||||||
|
|
||||||
|
Currently code such as: |
||||||
|
```meson |
||||||
|
option('foo', type : 'boolean', value : 'false') |
||||||
|
``` |
||||||
|
works, because Meson coerces `'false'` to `false`. |
||||||
|
|
||||||
|
This should be avoided, and will now result in a deprecation warning. |
@ -0,0 +1,7 @@ |
|||||||
|
{ |
||||||
|
"stdout": [ |
||||||
|
{ |
||||||
|
"line": " * 1.1.0: {'\"boolean option\" keyword argument \"value\" value \"false\"', '\"boolean option\" keyword argument \"value\" value \"true\"', 'number values as strings'}" |
||||||
|
} |
||||||
|
] |
||||||
|
} |
Loading…
Reference in new issue