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
0.42
Nirbheek Chauhan 7 years ago
parent 6beefac09a
commit 66a5b0c566
  1. 1
      mesonbuild/mesonlib.py
  2. 2
      test cases/common/87 declare dep/entity/meson.build

@ -716,6 +716,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

@ -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'],

Loading…
Cancel
Save