Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "interpreterbase: Add disabler exception for get_variable method #14157

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mesonbuild/interpreterbase/interpreterbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def method_call(self, node: mparser.MethodNode) -> T.Optional[InterpreterObject]
method_name = node.name.value
(h_args, h_kwargs) = self.reduce_arguments(node.args)
(args, kwargs) = self._unholder_args(h_args, h_kwargs)
if is_disabled(args, kwargs) and method_name != 'get_variable':
if is_disabled(args, kwargs):
return Disabler()
if not isinstance(obj, InterpreterObject):
raise InvalidArguments(f'{object_display_name} is not callable.')
Expand Down
5 changes: 0 additions & 5 deletions test cases/common/158 disabler/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,3 @@ foreach k, i : {'a': true, 'b': disabler(), 'c': true}
endforeach
assert(loops == 3, 'Disabler in foreach dict')
assert(disablers == 1, 'Disabler in foreach dict')

# https://github.com/mesonbuild/meson/issues/13717
bar_subproject = subproject('bar')
bar_dep = bar_subproject.get_variable('bar_dep', disabler())
assert(not is_disabler(bar_dep))
2 changes: 0 additions & 2 deletions test cases/common/158 disabler/subprojects/bar/meson.build

This file was deleted.

Loading