aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-01-11 11:23:52 -0800
committerEli Schwartz <eschwartz93@gmail.com>2023-01-20 00:18:42 -0500
commit43a24047076f24f371f2cb8f334da43f8ae6059f (patch)
tree8a1f3ca0146276e0f86c5e4831c2dc0789483e1b /docs/markdown
parentf5eaebb4b46a7e87e6c91a81da93ec28d4362546 (diff)
downloadmeson-43a24047076f24f371f2cb8f334da43f8ae6059f.zip
meson-43a24047076f24f371f2cb8f334da43f8ae6059f.tar.gz
meson-43a24047076f24f371f2cb8f334da43f8ae6059f.tar.bz2
Deprecate passing strings to non-string options
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.
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/snippets/coercing_option_values_deprecated.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/markdown/snippets/coercing_option_values_deprecated.md b/docs/markdown/snippets/coercing_option_values_deprecated.md
new file mode 100644
index 0000000..3621387
--- /dev/null
+++ b/docs/markdown/snippets/coercing_option_values_deprecated.md
@@ -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.