Bug 1322025 - Don't automatically add --help dependencies to CombinedDependsFunctions. r=chmanchester, a=IanN CLOSED TREE DONTBUILD SEAMONKEY_2_49_ESR_RELBRANCH
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 25 Jan 2017 17:10:03 +0900
branchSEAMONKEY_2_49_ESR_RELBRANCH
changeset 357449 e7762fd623b92c2256cf0081860277d9ba920d2b
parent 357448 01c6332e22b0ec6858748f8f4a5ffa4e476bd413
child 357450 d87d2f649f437c59f29180d6edf856edbdfc55ad
push id7834
push userfrgrahl@gmx.net
push dateSun, 13 Jan 2019 12:17:02 +0000
treeherdermozilla-esr52@6e4ad8a8f2e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester, IanN
bugs1322025
milestone52.9.1
Bug 1322025 - Don't automatically add --help dependencies to CombinedDependsFunctions. r=chmanchester, a=IanN CLOSED TREE DONTBUILD mozilla-esr52 SEAMONKEY_2_49_ESR_RELBRANCH 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.
python/mozbuild/mozbuild/configure/__init__.py
--- 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):