Bug 1322025 - Don't automatically add --help dependencies to CombinedDependsFunctions. r=chmanchester
Adding those dependencies, retrospectively, only worked around the poor
handling of --help requirements by the linter, that we fixed a few
commits ago. This is now not necessary anymore.
--- a/python/mozbuild/mozbuild/configure/__init__.py
+++ b/python/mozbuild/mozbuild/configure/__init__.py
@@ -112,35 +112,23 @@ class CombinedDependsFunction(DependsFun
for d in dependencies:
if isinstance(d, CombinedDependsFunction) and d._func is func:
for d2 in d.dependencies:
if d2 not in flatten_deps:
flatten_deps.append(d2)
elif d not in flatten_deps:
flatten_deps.append(d)
- # Automatically add a --help dependency if one of the dependencies
- # depends on it.
- for d in flatten_deps:
- if (isinstance(d, DependsFunction) and
- sandbox._help_option in d.dependencies):
- flatten_deps.insert(0, sandbox._help_option)
- break
-
super(CombinedDependsFunction, self).__init__(
sandbox, func, flatten_deps)
@memoize
def result(self, need_help_dependency=False):
- # Ignore --help for the combined result
- deps = self.dependencies
- if deps[0] == self.sandbox._help_option:
- deps = deps[1:]
resolved_args = [self.sandbox._value_for(d, need_help_dependency)
- for d in deps]
+ for d in self.dependencies]
return self._func(resolved_args)
def __eq__(self, other):
return (isinstance(other, self.__class__) and
self._func is other._func and
set(self.dependencies) == set(other.dependencies))
def __ne__(self, other):