diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2022-07-14 13:12:25 -0700 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-08-17 16:25:36 -0400 |
| commit | a78992dd81b4bd1673e4815ff26acd694ff77f68 (patch) | |
| tree | 80c6dfddc3a1c8cfa45903d23c3ff01b3862051a /test cases | |
| parent | c32f83a829b6b10a0cbc191c1368b563d4582c28 (diff) | |
| download | meson-a78992dd81b4bd1673e4815ff26acd694ff77f68.tar.gz | |
interpreter: move handling of module stability to interpreter
Thanks to `ModuleInfo`, all modules are just named `foo.py` instead of
`unstable_foo.py`, which simplifies the import method a bit. This also
allows for accurate FeatureNew/FeatureDeprecated use, as we know when
the module was added and if/when it was stabilized.
Diffstat (limited to 'test cases')
| -rw-r--r-- | test cases/common/253 module warnings/meson.build | 4 | ||||
| -rw-r--r-- | test cases/common/253 module warnings/test.json | 3 | ||||
| -rw-r--r-- | test cases/keyval/1 basic/meson.build | 2 | ||||
| -rw-r--r-- | test cases/keyval/1 basic/test.json | 2 | ||||
| -rw-r--r-- | test cases/warning/7 module without unstable/meson.build | 3 | ||||
| -rw-r--r-- | test cases/warning/7 module without unstable/test.json | 7 |
6 files changed, 19 insertions, 2 deletions
diff --git a/test cases/common/253 module warnings/meson.build b/test cases/common/253 module warnings/meson.build index 543a700dc..8397930ae 100644 --- a/test cases/common/253 module warnings/meson.build +++ b/test cases/common/253 module warnings/meson.build @@ -2,3 +2,7 @@ project('module warnings', meson_version : '>= 0.56') import('python3') # deprecated module import('java') # new module +import('unstable-keyval') # module that has been stabilized, import with unstable- + +ice = import('icestorm', required : false) +assert(not ice.found(), 'unstable-icestorm module should not be importable as `simd`') diff --git a/test cases/common/253 module warnings/test.json b/test cases/common/253 module warnings/test.json index 8833da2dc..ec861ccc6 100644 --- a/test cases/common/253 module warnings/test.json +++ b/test cases/common/253 module warnings/test.json @@ -5,6 +5,9 @@ }, { "line": "test cases/common/253 module warnings/meson.build:4: WARNING: Project targets '>= 0.56' but uses feature introduced in '0.60.0': module java." + }, + { + "line": "test cases/common/253 module warnings/meson.build:5: WARNING: Project targets '>= 0.56' but uses feature deprecated since '0.56.0': module keyval has been stabilized. drop \"unstable-\" prefix from the module name" } ] } diff --git a/test cases/keyval/1 basic/meson.build b/test cases/keyval/1 basic/meson.build index 4207b8e2d..a6e023ed4 100644 --- a/test cases/keyval/1 basic/meson.build +++ b/test cases/keyval/1 basic/meson.build @@ -1,4 +1,4 @@ -project('keyval basic test') +project('keyval basic test', meson_version : '>= 0.55') k = import('keyval') conf = k.load('.config') diff --git a/test cases/keyval/1 basic/test.json b/test cases/keyval/1 basic/test.json index dbdc5af41..1f8fd9b06 100644 --- a/test cases/keyval/1 basic/test.json +++ b/test cases/keyval/1 basic/test.json @@ -1,7 +1,7 @@ { "stdout": [ { - "line": "WARNING: Module unstable-keyval is now stable, please use the keyval module instead." + "line": "test cases/keyval/1 basic/meson.build:3: WARNING: Project targets '>= 0.55' but uses feature introduced in '0.56.0': module keyval as stable module. Consider either adding \"unstable-\" to the module name, or updating the meson required version to \">= 0.56.0\"" } ] } diff --git a/test cases/warning/7 module without unstable/meson.build b/test cases/warning/7 module without unstable/meson.build new file mode 100644 index 000000000..409a23618 --- /dev/null +++ b/test cases/warning/7 module without unstable/meson.build @@ -0,0 +1,3 @@ +project('module import without unstable', meson_version : '>= 0.55') + +import('keyval') diff --git a/test cases/warning/7 module without unstable/test.json b/test cases/warning/7 module without unstable/test.json new file mode 100644 index 000000000..62b8aa1c6 --- /dev/null +++ b/test cases/warning/7 module without unstable/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/warning/7 module without unstable/meson.build:3: WARNING: Project targets '>= 0.55' but uses feature introduced in '0.56.0': module keyval as stable module. Consider either adding \"unstable-\" to the module name, or updating the meson required version to \">= 0.56.0\"" + } + ] +} |
