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
pull/2312/head
Nirbheek Chauhan 7 years ago committed by Jussi Pakkanen
parent 77bf63d663
commit b3c70f495b
  1. 1
      mesonbuild/mesonlib.py
  2. 2
      test cases/common/87 declare dep/entity/meson.build

@ -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

@ -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