aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-03-22 21:48:45 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-05-31 17:49:29 -0400
commite3d70d89b1ff17a34dd7e8d3de18647b26d171f0 (patch)
tree78a3bc56ec15dce368dd74e0a7e9a13a0d0ae04a /mesonbuild/modules
parentae0b40945b08482d04b594187f266c77878a32b5 (diff)
downloadmeson-e3d70d89b1ff17a34dd7e8d3de18647b26d171f0.zip
meson-e3d70d89b1ff17a34dd7e8d3de18647b26d171f0.tar.gz
meson-e3d70d89b1ff17a34dd7e8d3de18647b26d171f0.tar.bz2
fix regression that broke type checking of CustomTarget outputs
We validate a few things here, such as the non-presence of '@INPUT' in an output name. These got moved out of the CustomTarget constructor in commit 11f96380351a88059ec55f1070fdebc1b1033117 and into KwargInfo, but only for kwargs that took multiple values. This caused configure_file() and unstable_rust.bindgen() to stop checking for this. Add a shared single-output KW and use it in both places. This now dispatches to _output_validator. configure_file now validates subdirectories in output names the same way we do elsewhere, directly in the typed_kwargs and by specifying the erroring kwarg.
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/unstable_rust.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/modules/unstable_rust.py b/mesonbuild/modules/unstable_rust.py
index 4d6718e..e31a697 100644
--- a/mesonbuild/modules/unstable_rust.py
+++ b/mesonbuild/modules/unstable_rust.py
@@ -19,7 +19,7 @@ from . import ExtensionModule, ModuleReturnValue
from .. import mlog
from ..build import BothLibraries, BuildTarget, CustomTargetIndex, Executable, ExtractedObjects, GeneratedList, IncludeDirs, CustomTarget, StructuredSources
from ..dependencies import Dependency, ExternalLibrary
-from ..interpreter.interpreter import TEST_KWARGS
+from ..interpreter.interpreter import TEST_KWARGS, OUTPUT_KW
from ..interpreterbase import ContainerTypeInfo, InterpreterException, KwargInfo, FeatureNew, typed_kwargs, typed_pos_args, noPosargs
from ..mesonlib import File
@@ -173,7 +173,7 @@ class RustModule(ExtensionModule):
listify=True,
required=True,
),
- KwargInfo('output', str, required=True),
+ OUTPUT_KW,
)
def bindgen(self, state: 'ModuleState', args: T.List, kwargs: 'FuncBindgen') -> ModuleReturnValue:
"""Wrapper around bindgen to simplify it's use.