From b3c70f495b736ff4ebe4c5097df2a5da0ea1ab80 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 11 Sep 2017 23:21:34 +0530 Subject: [PATCH] interpreter: Always flatten when unholding arrays Otherwise we might end up with wrapper holders in the Build object and pickling will then fail, defeating the purpose of the holder objects. Closes https://github.com/mesonbuild/meson/issues/2211 --- mesonbuild/mesonlib.py | 1 + test cases/common/87 declare dep/entity/meson.build | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 305f60078..4862e23e6 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -707,6 +707,7 @@ def windows_proof_rmtree(f): def unholder_array(entries): result = [] + entries = flatten(entries) for e in entries: if hasattr(e, 'held_object'): e = e.held_object diff --git a/test cases/common/87 declare dep/entity/meson.build b/test cases/common/87 declare dep/entity/meson.build index 80bbf36fa..3bfe13cd8 100644 --- a/test cases/common/87 declare dep/entity/meson.build +++ b/test cases/common/87 declare dep/entity/meson.build @@ -1,6 +1,6 @@ entity_lib = static_library('entity', 'entity1.c') -entity_dep = declare_dependency(link_with : entity_lib, +entity_dep = declare_dependency(link_with : [[entity_lib]], include_directories : include_directories('.'), sources : 'entity2.c', compile_args : ['-DUSING_ENT=1'],