diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-02-26 02:12:29 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-03-01 23:37:55 -0500 |
commit | a3f4f6c88f14ba9f176721bace861d705a11189c (patch) | |
tree | b1f9f532a952ab9bd4b0f2937c42ba329762bebe /test cases/common/33 run program | |
parent | 314382d6ff06d1fb59118492cbd5a65fd3c58e5c (diff) | |
download | meson-a3f4f6c88f14ba9f176721bace861d705a11189c.zip meson-a3f4f6c88f14ba9f176721bace861d705a11189c.tar.gz meson-a3f4f6c88f14ba9f176721bace861d705a11189c.tar.bz2 |
interpreter: report FeatureNew for kwargs to project()
We need to know the project minimum version before evaluating the rest
of the function. There's three basic approaches:
- try to set it inside KwargInfo
- just run a minimal version of func_project for this, then load
everything after
- drop down to the AST and set it before anything else
In order to handle FeatureNew emitted by a FunctionNode evaluated
before project() due to being inlined, such as `version: run_command()`,
only option 3 suffices, the rest all happen way too late. Since we have
just added AST handling support for erroring out, we can do that to set
the version as well.
Diffstat (limited to 'test cases/common/33 run program')
-rw-r--r-- | test cases/common/33 run program/meson.build | 2 | ||||
-rw-r--r-- | test cases/common/33 run program/test.json | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/test cases/common/33 run program/meson.build b/test cases/common/33 run program/meson.build index aa0a1d6..2257d93 100644 --- a/test cases/common/33 run program/meson.build +++ b/test cases/common/33 run program/meson.build @@ -1,4 +1,4 @@ -project('run command', version : run_command('get-version.py', check : true).stdout().strip()) +project('run command', version : run_command('get-version.py', check : true).stdout().strip(), meson_version: '>=0.1.0') if build_machine.system() == 'windows' c = run_command('cmd', '/c', 'echo', 'hello', check: false) diff --git a/test cases/common/33 run program/test.json b/test cases/common/33 run program/test.json new file mode 100644 index 0000000..da8f128 --- /dev/null +++ b/test cases/common/33 run program/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/common/33 run program/meson.build:1: WARNING: Project targets '>=0.1.0' but uses feature introduced in '0.47.0': check arg in run_command.", + "comment": "This triggers on line 1 -- the line with the project() function" + } + ] +} |