prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  get_variable with a file object as default value: Argument of type File is not held by an ObjectHolder
  **Describe the bug**
  After updating Meson, I see this error in a previously working build:
  
  ```
  build/analysis/vale/meson.build:24:0: ERROR: Argument build/analysis/vale/vale-styleguide/config/documentation.vale.ini of type File is not held by an ObjectHolder.
  
      This is a Meson bug and should be reported!
  ```
  
  The file is being specified in this manner:
  
  ```
  # Supply a style file, which will use this file instead of the default .vale.ini
  vale_config_file = get_variable('vale_config_file',
  	files('vale-styleguide/config/documentation.vale.ini'))
  ```
  
  The default variable option is being used - I'm not overriding it.
  
  The same is happening in a Doxygen module I use:
  
  ```
  doxyfile_input = get_variable('doxyfile_input', files('Doxyfile.in'))
  ```
  
  I tried moving the file object into another variable:
  
  ```
  vale_default_config_file = files('vale-styleguide/config/documentation.vale.ini')
  vale_config_file = get_variable('vale_config_file', vale_default_config_file)
  ```
  
  With teh same result - the error is reported on the `get_variable` line.
  
  **system parameters**
  * Is this a [cross build](https://mesonbuild.com/Cross-compilation.html) or just a plain native build (for the same computer)? **native**
  * what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.) **MacOS 10.15.7**
  * what Python version are you using e.g. 3.8.0 **Python 3.9.6**
  * what `meson --version` **0.59.0.rc1**
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `mesonbuild/interpreterbase/_unholder.py`
  Content:
  ```
  1 # Copyright 2013-2021 The Meson development team
  2 
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 from .baseobjects import InterpreterObject, MesonInterpreterObject, ObjectHolder, TYPE_var
  16 from .exceptions import InvalidArguments
  17 from ..mesonlib import HoldableObject, MesonBugException
  18 
  19 import typing as T
  20 
  21 def _unholder(obj: T.Union[TYPE_var, InterpreterObject], *, permissive: bool = False) -> TYPE_var:
  22     if isinstance(obj, (int, bool, str)):
  23         return obj
  24     elif isinstance(obj, list):
  25         return [_unholder(x) for x in obj]
  26     elif isinstance(obj, dict):
  27         return {k: _unholder(v) for k, v in obj.items()}
  28     elif isinstance(obj, ObjectHolder):
  29         assert isinstance(obj.held_object, HoldableObject)
  30         return obj.held_object
  31     elif isinstance(obj, MesonInterpreterObject):
  32         return obj
  33     elif isinstance(obj, HoldableObject) and permissive:
  34         return obj
  35     elif isinstance(obj, HoldableObject):
  36         raise MesonBugException(f'Argument {obj} of type {type(obj).__name__} is not held by an ObjectHolder.')
  37     elif isinstance(obj, InterpreterObject):
  38         raise InvalidArguments(f'Argument {obj} of type {type(obj).__name__} cannot be passed to a method or function')
  39     raise MesonBugException(f'Unknown object {obj} of type {type(obj).__name__} in the parameters.')
  40
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/mesonbuild/interpreterbase/_unholder.py b/mesonbuild/interpreterbase/_unholder.py
  --- a/mesonbuild/interpreterbase/_unholder.py
  +++ b/mesonbuild/interpreterbase/_unholder.py
  @@ -22,9 +22,9 @@
       if isinstance(obj, (int, bool, str)):
           return obj
       elif isinstance(obj, list):
  -        return [_unholder(x) for x in obj]
  +        return [_unholder(x, permissive=permissive) for x in obj]
       elif isinstance(obj, dict):
  -        return {k: _unholder(v) for k, v in obj.items()}
  +        return {k: _unholder(v, permissive=permissive) for k, v in obj.items()}
       elif isinstance(obj, ObjectHolder):
           assert isinstance(obj.held_object, HoldableObject)
           return obj.held_object
  
verification_info: {"golden_diff": "diff --git a/mesonbuild/interpreterbase/_unholder.py b/mesonbuild/interpreterbase/_unholder.py\n--- a/mesonbuild/interpreterbase/_unholder.py\n+++ b/mesonbuild/interpreterbase/_unholder.py\n@@ -22,9 +22,9 @@\n     if isinstance(obj, (int, bool, str)):\n         return obj\n     elif isinstance(obj, list):\n-        return [_unholder(x) for x in obj]\n+        return [_unholder(x, permissive=permissive) for x in obj]\n     elif isinstance(obj, dict):\n-        return {k: _unholder(v) for k, v in obj.items()}\n+        return {k: _unholder(v, permissive=permissive) for k, v in obj.items()}\n     elif isinstance(obj, ObjectHolder):\n         assert isinstance(obj.held_object, HoldableObject)\n         return obj.held_object\n", "issue": "get_variable with a file object as default value: Argument of type File is not held by an ObjectHolder\n**Describe the bug**\r\nAfter updating Meson, I see this error in a previously working build:\r\n\r\n```\r\nbuild/analysis/vale/meson.build:24:0: ERROR: Argument build/analysis/vale/vale-styleguide/config/documentation.vale.ini of type File is not held by an ObjectHolder.\r\n\r\n    This is a Meson bug and should be reported!\r\n```\r\n\r\nThe file is being specified in this manner:\r\n\r\n```\r\n# Supply a style file, which will use this file instead of the default .vale.ini\r\nvale_config_file = get_variable('vale_config_file',\r\n\tfiles('vale-styleguide/config/documentation.vale.ini'))\r\n```\r\n\r\nThe default variable option is being used - I'm not overriding it.\r\n\r\nThe same is happening in a Doxygen module I use:\r\n\r\n```\r\ndoxyfile_input = get_variable('doxyfile_input', files('Doxyfile.in'))\r\n```\r\n\r\nI tried moving the file object into another variable:\r\n\r\n```\r\nvale_default_config_file = files('vale-styleguide/config/documentation.vale.ini')\r\nvale_config_file = get_variable('vale_config_file', vale_default_config_file)\r\n```\r\n\r\nWith teh same result - the error is reported on the `get_variable` line.\r\n\r\n**system parameters**\r\n* Is this a [cross build](https://mesonbuild.com/Cross-compilation.html) or just a plain native build (for the same computer)? **native**\r\n* what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.) **MacOS 10.15.7**\r\n* what Python version are you using e.g. 3.8.0 **Python 3.9.6**\r\n* what `meson --version` **0.59.0.rc1**\r\n\n", "before_files": [{"content": "# Copyright 2013-2021 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n#     http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom .baseobjects import InterpreterObject, MesonInterpreterObject, ObjectHolder, TYPE_var\nfrom .exceptions import InvalidArguments\nfrom ..mesonlib import HoldableObject, MesonBugException\n\nimport typing as T\n\ndef _unholder(obj: T.Union[TYPE_var, InterpreterObject], *, permissive: bool = False) -> TYPE_var:\n    if isinstance(obj, (int, bool, str)):\n        return obj\n    elif isinstance(obj, list):\n        return [_unholder(x) for x in obj]\n    elif isinstance(obj, dict):\n        return {k: _unholder(v) for k, v in obj.items()}\n    elif isinstance(obj, ObjectHolder):\n        assert isinstance(obj.held_object, HoldableObject)\n        return obj.held_object\n    elif isinstance(obj, MesonInterpreterObject):\n        return obj\n    elif isinstance(obj, HoldableObject) and permissive:\n        return obj\n    elif isinstance(obj, HoldableObject):\n        raise MesonBugException(f'Argument {obj} of type {type(obj).__name__} is not held by an ObjectHolder.')\n    elif isinstance(obj, InterpreterObject):\n        raise InvalidArguments(f'Argument {obj} of type {type(obj).__name__} cannot be passed to a method or function')\n    raise MesonBugException(f'Unknown object {obj} of type {type(obj).__name__} in the parameters.')\n", "path": "mesonbuild/interpreterbase/_unholder.py"}], "after_files": [{"content": "# Copyright 2013-2021 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n#     http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom .baseobjects import InterpreterObject, MesonInterpreterObject, ObjectHolder, TYPE_var\nfrom .exceptions import InvalidArguments\nfrom ..mesonlib import HoldableObject, MesonBugException\n\nimport typing as T\n\ndef _unholder(obj: T.Union[TYPE_var, InterpreterObject], *, permissive: bool = False) -> TYPE_var:\n    if isinstance(obj, (int, bool, str)):\n        return obj\n    elif isinstance(obj, list):\n        return [_unholder(x, permissive=permissive) for x in obj]\n    elif isinstance(obj, dict):\n        return {k: _unholder(v, permissive=permissive) for k, v in obj.items()}\n    elif isinstance(obj, ObjectHolder):\n        assert isinstance(obj.held_object, HoldableObject)\n        return obj.held_object\n    elif isinstance(obj, MesonInterpreterObject):\n        return obj\n    elif isinstance(obj, HoldableObject) and permissive:\n        return obj\n    elif isinstance(obj, HoldableObject):\n        raise MesonBugException(f'Argument {obj} of type {type(obj).__name__} is not held by an ObjectHolder.')\n    elif isinstance(obj, InterpreterObject):\n        raise InvalidArguments(f'Argument {obj} of type {type(obj).__name__} cannot be passed to a method or function')\n    raise MesonBugException(f'Unknown object {obj} of type {type(obj).__name__} in the parameters.')\n", "path": "mesonbuild/interpreterbase/_unholder.py"}]}