diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-12-08 10:53:08 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-12-17 12:46:50 -0800 |
| commit | bde1c23b4f3eb9eb63e835b722bb9bbcccc4c8c1 (patch) | |
| tree | 3f7ef84071483aa7cdca5337615ea2259180b172 /mesonbuild/interpreter/interpreter.py | |
| parent | f3d9a71a1bea661495c1d3c6004b26b4497fb1c9 (diff) | |
| download | meson-bde1c23b4f3eb9eb63e835b722bb9bbcccc4c8c1.tar.gz | |
interpreter|build: Use typed_kwargs for build_target(dependencies)
What is basically impossible is to handle `SubprojectHolder`, because
it's not a true holder but an interpreter object. Well, impossible
without changing SubprojectHolder into a true holder, because it's
avoiding the circular import becomes extremely convoluted otherwise, and
refactoring is difficult because the held object is itself an
Interpreter. It's a rather complex problem to solve gracefully. I've
punted to avoid the complexity, it does mean that the error message is
somewhat less exact.
I don't think this is actually a huge problem because we've really
guided people away from using `subproject()` and to instead use
dependency fallbacks, which don't have this problem to begin with.
This removes validation from the build layer, and puts it in
interpreter. For code sharing reasons this means that
`internal_dependency` also gets more fine grained error messages.
The test case for this has been modified to use the `testcase
expect_error` construct, and thus has been moved to the common tests
directory. It's also been extended to cover both the library case, which
gives coverage for the `extra_types` in `KwargInfo`
Diffstat (limited to 'mesonbuild/interpreter/interpreter.py')
| -rw-r--r-- | mesonbuild/interpreter/interpreter.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index 3a0cae041..3b87f48ea 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -3559,7 +3559,7 @@ class Interpreter(InterpreterBase, HoldableObject): for l in target.compilers.keys(): dep = self.build.stdlibs[target.for_machine].get(l, None) if dep: - target.add_deps(dep) + target.add_deps([dep]) def check_sources_exist(self, subdir, sources): for s in sources: |
