From aa0d75deaee925b9ceb3d98ef8f5de0167587c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 13 Jul 2020 12:52:39 +0400 Subject: [PATCH] Stabilize keyval module We have experimented with the module for about a year in a qemu branch (https://wiki.qemu.org/Features/Meson), and we would like to start moving the build system to meson. For that, keyval should have the stability guarantees. Cc: Paolo Bonzini --- docs/markdown/Keyval-module.md | 4 ++-- docs/markdown/snippets/keyval.md | 7 +++++++ mesonbuild/modules/{unstable_keyval.py => keyval.py} | 0 .../common/222 source set realistic example/meson.build | 2 +- test cases/keyval/1 basic/meson.build | 2 +- test cases/keyval/2 subdir/dir/meson.build | 2 +- test cases/keyval/3 load_config files/dir/meson.build | 2 +- test cases/keyval/4 load_config builddir/meson.build | 2 +- 8 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 docs/markdown/snippets/keyval.md rename mesonbuild/modules/{unstable_keyval.py => keyval.py} (100%) diff --git a/docs/markdown/Keyval-module.md b/docs/markdown/Keyval-module.md index 643265e3b..afc48fa27 100644 --- a/docs/markdown/Keyval-module.md +++ b/docs/markdown/Keyval-module.md @@ -1,5 +1,5 @@ --- -short-description: Unstable keyval module +short-description: Keyval module authors: - name: Mark Schulte, Paolo Bonzini years: [2017, 2019] @@ -23,7 +23,7 @@ chosen the configuration options), output a ".config" file. The module may be imported as follows: ``` meson -keyval = import('unstable-keyval') +keyval = import('keyval') ``` The following functions will then be available as methods on the object diff --git a/docs/markdown/snippets/keyval.md b/docs/markdown/snippets/keyval.md new file mode 100644 index 000000000..895de9bcf --- /dev/null +++ b/docs/markdown/snippets/keyval.md @@ -0,0 +1,7 @@ +## `unstable-keyval` is now stable `keyval` + +The `unstable-keyval` has been renamed to `keyval` and now promises stability +guarantees. + +Meson will print a warning when you load an `unstable-` module that has been +stabilised (so `unstable-keyval` is still accepted for example). diff --git a/mesonbuild/modules/unstable_keyval.py b/mesonbuild/modules/keyval.py similarity index 100% rename from mesonbuild/modules/unstable_keyval.py rename to mesonbuild/modules/keyval.py diff --git a/test cases/common/222 source set realistic example/meson.build b/test cases/common/222 source set realistic example/meson.build index 106b81d93..d986b991a 100644 --- a/test cases/common/222 source set realistic example/meson.build +++ b/test cases/common/222 source set realistic example/meson.build @@ -9,7 +9,7 @@ if cppid == 'pgi' endif ss = import('sourceset') -keyval = import('unstable-keyval') +keyval = import('keyval') zlib = declare_dependency(compile_args: '-DZLIB=1') another = declare_dependency(compile_args: '-DANOTHER=1') diff --git a/test cases/keyval/1 basic/meson.build b/test cases/keyval/1 basic/meson.build index fc7ddb3fd..c3e44664c 100644 --- a/test cases/keyval/1 basic/meson.build +++ b/test cases/keyval/1 basic/meson.build @@ -1,6 +1,6 @@ project('keyval basic test') -k = import('unstable-keyval') +k = import('keyval') conf = k.load('.config') if not conf.has_key('CONFIG_VAL1') diff --git a/test cases/keyval/2 subdir/dir/meson.build b/test cases/keyval/2 subdir/dir/meson.build index dc1b478b3..291ad93a2 100644 --- a/test cases/keyval/2 subdir/dir/meson.build +++ b/test cases/keyval/2 subdir/dir/meson.build @@ -1,5 +1,5 @@ -k = import('unstable-keyval') +k = import('keyval') conf = k.load(meson.source_root() / '.config') diff --git a/test cases/keyval/3 load_config files/dir/meson.build b/test cases/keyval/3 load_config files/dir/meson.build index 43fba13a8..adc52892a 100644 --- a/test cases/keyval/3 load_config files/dir/meson.build +++ b/test cases/keyval/3 load_config files/dir/meson.build @@ -1,5 +1,5 @@ -k = import('unstable-keyval') +k = import('keyval') conf = k.load(files('config')) diff --git a/test cases/keyval/4 load_config builddir/meson.build b/test cases/keyval/4 load_config builddir/meson.build index 1bb028564..6bd83db54 100644 --- a/test cases/keyval/4 load_config builddir/meson.build +++ b/test cases/keyval/4 load_config builddir/meson.build @@ -1,6 +1,6 @@ project('keyval builddir test') -k = import('unstable-keyval') +k = import('keyval') out_conf = configure_file(input: 'config', output: 'out-config', copy: true) conf = k.load(out_conf)