Backed out 2 changesets (bug 1403519) for bustage on \python\mozbuild\mozbuild\test\frontend\test_reader.py on a CLOSED TREE
authorNoemi Erli <nerli@mozilla.com>
Wed, 17 Jan 2018 07:23:40 +0200
changeset 721441 46f721d7988bcc0bd1cbf22854d40abd0cf1c2b2
parent 721440 f53f8adcd578c38a432e58f482a1c486f2c2dd55
child 721442 11489f123eb8bcb6bf0ea1e78cc11866925e0046
push id95847
push userbmo:oriol-bugzilla@hotmail.com
push dateWed, 17 Jan 2018 10:32:58 +0000
bugs1403519
milestone59.0a1
backs outf53f8adcd578c38a432e58f482a1c486f2c2dd55
5b293bcd3fc71b67fd5fcbdeca83f4886d3b3cde
Backed out 2 changesets (bug 1403519) for bustage on \python\mozbuild\mozbuild\test\frontend\test_reader.py on a CLOSED TREE Backed out changeset f53f8adcd578 (bug 1403519) Backed out changeset 5b293bcd3fc7 (bug 1403519)
browser/base/moz.build
browser/experiments/moz.build
browser/moz.build
build/moz.build
dom/bindings/moz.build
gfx/moz.build
mobile/android/moz.build
moz.build
python/moz.build
python/mozbuild/mozbuild/frontend/context.py
python/mozbuild/mozbuild/schedules.py
taskcluster/ci/source-test/doc.yml
taskcluster/docs/optimization-schedules.rst
taskcluster/moz.build
testing/geckodriver/moz.build
testing/marionette/moz.build
testing/mozbase/moz.build
toolkit/components/crashes/moz.build
toolkit/components/extensions/moz.build
toolkit/components/payments/moz.build
toolkit/components/telemetry/moz.build
toolkit/components/url-classifier/moz.build
toolkit/crashreporter/moz.build
toolkit/modules/moz.build
toolkit/modules/subprocess/moz.build
toolkit/mozapps/extensions/moz.build
tools/moz.build
--- a/browser/base/moz.build
+++ b/browser/base/moz.build
@@ -4,19 +4,16 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 with Files("**"):
     BUG_COMPONENT = ("Firefox", "General")
 
 SPHINX_TREES['sslerrorreport'] = 'content/docs/sslerrorreport'
 
-with Files('content/docs/sslerrorreport/**'):
-    SCHEDULES.exclusive = ['docs']
-
 MOCHITEST_MANIFESTS += [
     'content/test/general/mochitest.ini',
 ]
 
 MOCHITEST_CHROME_MANIFESTS += [
     'content/test/chrome/chrome.ini',
 ]
 
--- a/browser/experiments/moz.build
+++ b/browser/experiments/moz.build
@@ -14,11 +14,8 @@ EXTRA_COMPONENTS += [
 
 EXTRA_JS_MODULES.experiments += [
   'Experiments.jsm',
 ]
 
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
 
 SPHINX_TREES['experiments'] = 'docs'
-
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
--- a/browser/moz.build
+++ b/browser/moz.build
@@ -3,19 +3,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 CONFIGURE_SUBST_FILES += ['installer/Makefile']
 
 SPHINX_TREES['browser'] = 'docs'
 
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 DIRS += [
     'base',
     'components',
     'experiments',
     'fonts',
     'locales',
     'modules',
     'themes',
--- a/build/moz.build
+++ b/build/moz.build
@@ -5,19 +5,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 with Files('**'):
     BUG_COMPONENT = ('Core', 'Build Config')
 
 # This cannot be named "build" because of bug 922191.
 SPHINX_TREES['buildsystem'] = 'docs'
 
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 if CONFIG['OS_ARCH'] == 'WINNT':
     DIRS += ['win32']
     if CONFIG['WIN64_CARGO_LINKER']:
         CONFIGURE_SUBST_FILES += ['win64/cargo-linker.bat']
 else:
     DIRS += ['unix']
 
 CRAMTEST_MANIFESTS += [
--- a/dom/bindings/moz.build
+++ b/dom/bindings/moz.build
@@ -144,25 +144,18 @@ if CONFIG['MOZ_DEBUG']:
         "test/TestInterfaceSetlikeNode.cpp",
         ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 SPHINX_TREES['webidl'] = 'docs'
-
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 SPHINX_PYTHON_PACKAGE_DIRS += ['mozwebidlcodegen']
 
-with Files('mozwebidlcodegen/**.py'):
-    SCHEDULES.inclusive += ['docs']
-
 if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
     # This is needed for Window.webidl
     DEFINES['HAVE_SIDEBAR'] = True
 
 
 PYTHON_UNITTEST_MANIFESTS += [
     'mozwebidlcodegen/test/python.ini',
 ]
--- a/gfx/moz.build
+++ b/gfx/moz.build
@@ -35,11 +35,8 @@ if CONFIG['MOZ_ENABLE_SKIA_PDF_SFNTLY']:
      DIRS += ['sfntly/cpp/src']
 
 if CONFIG['ENABLE_TESTS']:
     DIRS += ['tests/gtest']
 
 TEST_DIRS += ['tests']
 
 SPHINX_TREES['gfx'] = 'docs'
-
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
--- a/mobile/android/moz.build
+++ b/mobile/android/moz.build
@@ -62,11 +62,8 @@ DIRS += [
     'fonts',
 ]
 
 TEST_DIRS += [
     'tests',
 ]
 
 SPHINX_TREES['fennec'] = 'docs'
-
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
--- a/moz.build
+++ b/moz.build
@@ -51,26 +51,17 @@ with Files('README.txt'):
 with Files("nsprpub/**"):
     BUG_COMPONENT = ("NSPR", "NSPR")
 
 with Files('**/Makefile.in'):
     BUG_COMPONENT = ('Core', 'Build Config')
     FINAL = True
 
 with Files("**/*.js"):
-    SCHEDULES.inclusive += ['test-verify', 'docs']
-
-with Files("**/*.jsm"):
-    SCHEDULES.inclusive += ['docs']
-
-with Files("**/*.rst"):
-    SCHEDULES.inclusive += ['docs']
-
-with Files("**/*.md"):
-    SCHEDULES.inclusive += ['docs']
+    SCHEDULES.inclusive += ['test-verify']
 
 with Files("**/*.html"):
     SCHEDULES.inclusive += ['test-verify']
 
 with Files("**/*.xhtml"):
     SCHEDULES.inclusive += ['test-verify']
 
 with Files("**/*.xul"):
--- a/python/moz.build
+++ b/python/moz.build
@@ -32,24 +32,18 @@ with Files('l10n/**'):
 SPHINX_PYTHON_PACKAGE_DIRS += [
     'mach',
     'mozbuild/mozbuild',
     'mozbuild/mozpack',
     'mozlint/mozlint',
     'mozversioncontrol/mozversioncontrol',
 ]
 
-with Files('**.py'):
-    SCHEDULES.inclusive += ['docs']
-
 SPHINX_TREES['mach'] = 'mach/docs'
 
-with Files('mach/docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 PYTHON_UNITTEST_MANIFESTS += [
     'mach/mach/test/python.ini',
     'mozbuild/dumbmake/test/python.ini',
     'mozlint/test/python.ini',
     'mozterm/test/python.ini',
     'mozversioncontrol/test/python.ini',
 ]
 
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -843,19 +843,20 @@ class Schedules(object):
         rv._inclusive = self._inclusive + other._inclusive
         if other._exclusive == self._exclusive:
             rv._exclusive = self._exclusive
         elif self._exclusive == schedules.EXCLUSIVE_COMPONENTS:
             rv._exclusive = other._exclusive
         elif other._exclusive == schedules.EXCLUSIVE_COMPONENTS:
             rv._exclusive = self._exclusive
         else:
-            # in a case where two SCHEDULES.exclusive set different values, take
-            # the later one; this acts the way we expect assignment to work.
-            rv._exclusive = other._exclusive
+            msg = 'Two Files sections have set SCHEDULES.exclusive to different' \
+                'values; these cannot be combined: {} and {}'
+            msg = msg.format(self._exclusive, other._exclusive)
+            raise ValueError(msg)
         return rv
 
 
 @memoize
 def ContextDerivedTypedHierarchicalStringList(type):
     """Specialized HierarchicalStringList for use with ContextDerivedValue
     types."""
     class _TypedListWithItems(ContextDerivedValue, HierarchicalStringList):
--- a/python/mozbuild/mozbuild/schedules.py
+++ b/python/mozbuild/mozbuild/schedules.py
@@ -6,37 +6,28 @@
 Constants for SCHEDULES configuration in moz.build files and for
 skip-unless-schedules optimizations in task-graph generation.
 """
 
 from __future__ import absolute_import, unicode_literals, print_function
 
 # TODO: ideally these lists could be specified in moz.build itself
 
-# Inclusive components are those which are scheduled when certain files are
-# changed, but do not run by default.  These are generally added to
-# `SCHEDULES.inclusive` using `+=`, but can also be used as exclusive
-# components for files which *only* affect the named component.
 INCLUSIVE_COMPONENTS = [
-    'docs',
     'py-lint',
     'js-lint',
     'yaml-lint',
     # inclusive test suites -- these *only* run when certain files have changed
     'jittest',
     'test-verify',
     'test-verify-wpt',
     'jsreftest',
 ]
 INCLUSIVE_COMPONENTS = sorted(INCLUSIVE_COMPONENTS)
 
-# Exclusive components are those which are scheduled by default, but for which
-# some files *only* affect that component.  For example, most files affect all
-# platforms, but platform-specific files exclusively affect a single platform.
-# These components are assigned to `SCHEDULES.exclusive` with `=`.
 EXCLUSIVE_COMPONENTS = [
     # os families
     'android',
     'linux',
     'macosx',
     'windows',
     # test suites
     'awsy',
--- a/taskcluster/ci/source-test/doc.yml
+++ b/taskcluster/ci/source-test/doc.yml
@@ -14,18 +14,24 @@ generate:
               name: public/docs.tar.gz
               path: /builds/worker/checkouts/gecko/docs-out/main.tar.gz
     run:
         using: run-task
         command: >
             cd /builds/worker/checkouts/gecko &&
             ./mach doc --outdir docs-out --no-open --archive
         sparse-profile: sphinx-docs
-    optimization:
-        skip-unless-schedules: [docs]
+    when:
+        files-changed:
+            - '**/*.py'
+            - '**/*.rst'
+            - '**/*.md'
+            - 'tools/docs/**'
+            - '**/*.js'
+            - '**/*.jsm'
 
 upload:
     description: Generate and upload the Sphinx documentation
     platform: lint/opt
     treeherder:
         symbol: tc(DocUp)
         kind: test
         tier: 3
@@ -36,10 +42,13 @@ upload:
         max-run-time: 1800
         taskcluster-proxy: true
     run:
         using: run-task
         command: cd /builds/worker/checkouts/gecko && ./mach doc --upload --no-open
         sparse-profile: sphinx-docs
     scopes:
         - secrets:get:project/releng/gecko/build/level-{level}/gecko-docs-upload
-    optimization:
-        skip-unless-schedules: [docs]
+    when:
+        files-changed:
+            - '**/*.py'
+            - '**/*.rst'
+            - 'tools/docs/**'
--- a/taskcluster/docs/optimization-schedules.rst
+++ b/taskcluster/docs/optimization-schedules.rst
@@ -73,24 +73,16 @@ for inclusive components and ::
 
 for exclusive components.
 Note the use of ``+=`` for inclusive compoenents (as this is adding to the existing set of affected components) but ``=`` for exclusive components (as this is resetting the affected set to something smaller).
 For cases where an inclusive component is affected exclusively (such as the python-lint configuration in the example above), that component can be assigned to ``SCHEDULES.exclusive``::
 
     with Files('**/pep8rc'):
         SCHEDULES.exclusive = ['py-lint']
 
-If multiple stanzas set ``SCHEDULES.exclusive``, the last one will take precedence.  Thus the following will set ``SCHEDULES.exclusive`` to ``hpux`` for all files except those under ``docs/``.
-
-    with Files('**'):
-        SCHEDULES.exclusive = ['hpux']
-
-    with Files('**/docs'):
-        SCHEDULES.exclusive = ['docs']
-
 Task Annotation
 :::::::::::::::
 
 Tasks are annotated with the components they belong to using the ``"skip-unless-schedules"`` optimization, which takes a list of components for this task::
 
     task['optimization'] = {'skip-unless-schedules': ['windows', 'gtest']}
 
 For tests, this value is set automatically by the test transform based on the suite name and the platform family, doing the correct thing for inclusive test suites.
--- a/taskcluster/moz.build
+++ b/taskcluster/moz.build
@@ -23,11 +23,8 @@ with Files('scripts/**'):
 with Files('taskgraph/**'):
     BUG_COMPONENT = ('Taskcluster', 'Task Configuration')
 
 PYTHON_UNITTEST_MANIFESTS += [
     'taskgraph/test/python.ini',
 ]
 SPHINX_TREES['taskcluster'] = 'docs'
 SPHINX_PYTHON_PACKAGE_DIRS += ['taskgraph']
-
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
--- a/testing/geckodriver/moz.build
+++ b/testing/geckodriver/moz.build
@@ -7,11 +7,8 @@ RUST_PROGRAMS += ["geckodriver"]
 # https://bugzil.la/1425365
 if CONFIG["OS_ARCH"] != "WINNT":
     RustTest("geckodriver")
 
 with Files("**"):
     BUG_COMPONENT = ("Testing", "Marionette")
 
 SPHINX_TREES["geckodriver"] = "doc"
-
-with Files('doc/**'):
-    SCHEDULES.exclusive = ['docs']
--- a/testing/marionette/moz.build
+++ b/testing/marionette/moz.build
@@ -13,11 +13,8 @@ XPCSHELL_TESTS_MANIFESTS += ["unit.ini"]
 
 with Files("**"):
     BUG_COMPONENT = ("Testing", "Marionette")
 
 with Files("harness/**"):
     SCHEDULES.exclusive = ["marionette", "firefox-ui"]
 
 SPHINX_TREES["marionette"] = "doc"
-
-with Files('doc/**'):
-    SCHEDULES.exclusive = ['docs']
--- a/testing/mozbase/moz.build
+++ b/testing/mozbase/moz.build
@@ -45,13 +45,10 @@ python_modules = [
 TEST_HARNESS_FILES.mozbase += [m + '/**' for m in python_modules]
 
 TEST_HARNESS_FILES.mozbase += [
     'setup_development.py',
 ]
 
 SPHINX_TREES['/mozbase'] = 'docs'
 
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 with Files('**'):
     BUG_COMPONENT = ('Testing', 'Mozbase')
--- a/toolkit/components/crashes/moz.build
+++ b/toolkit/components/crashes/moz.build
@@ -1,19 +1,16 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SPHINX_TREES['crash-manager'] = 'docs'
 
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 XPIDL_MODULE = 'toolkit_crashservice'
 
 XPIDL_SOURCES += [
     'nsICrashService.idl',
 ]
 
 if CONFIG['MOZ_CRASHREPORTER']:
     EXTRA_COMPONENTS += [
--- a/toolkit/components/extensions/moz.build
+++ b/toolkit/components/extensions/moz.build
@@ -87,12 +87,9 @@ XPCSHELL_TESTS_MANIFESTS += [
     'test/xpcshell/native_messaging.ini',
     'test/xpcshell/xpcshell-e10s.ini',
     'test/xpcshell/xpcshell-remote.ini',
     'test/xpcshell/xpcshell.ini',
 ]
 
 SPHINX_TREES['webextensions'] = 'docs'
 
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 include('/ipc/chromium/chromium-config.mozbuild')
--- a/toolkit/components/payments/moz.build
+++ b/toolkit/components/payments/moz.build
@@ -15,16 +15,13 @@ EXTRA_COMPONENTS += [
 ]
 
 JAR_MANIFESTS += ['jar.mn']
 
 MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini']
 
 SPHINX_TREES['docs'] = 'docs'
 
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 TESTING_JS_MODULES += [
     'test/PaymentTestUtils.jsm',
 ]
 
 XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
--- a/toolkit/components/telemetry/moz.build
+++ b/toolkit/components/telemetry/moz.build
@@ -19,19 +19,16 @@ DEFINES['MOZ_APP_VERSION'] = '"%s"' % CO
 
 LOCAL_INCLUDES += [
     '/xpcom/build',
     '/xpcom/threads',
 ]
 
 SPHINX_TREES['telemetry'] = 'docs'
 
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 if CONFIG['ENABLE_TESTS']:
     DIRS += ['tests/gtest']
 
 TEST_DIRS += ['tests']
 
--- a/toolkit/components/url-classifier/moz.build
+++ b/toolkit/components/url-classifier/moz.build
@@ -88,12 +88,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
         '-Wno-maybe-uninitialized',
     ]
 
 if CONFIG['NIGHTLY_BUILD'] or CONFIG['MOZ_DEBUG']:
     DEFINES['MOZ_SAFEBROWSING_DUMP_FAILED_UPDATES'] = True
 
 SPHINX_TREES['url-classifier'] = 'docs'
 
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 include('/ipc/chromium/chromium-config.mozbuild')
--- a/toolkit/crashreporter/moz.build
+++ b/toolkit/crashreporter/moz.build
@@ -1,19 +1,16 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SPHINX_TREES['crashreporter'] = 'docs'
 
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 EXPORTS += [
     'nsExceptionHandler.h',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
 
 UNIFIED_SOURCES = [
     'nsExceptionHandlerUtils.cpp',
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
@@ -160,19 +160,16 @@ TESTING_JS_MODULES += [
     'HiddenFrame.jsm',
     'tests/modules/MockDocument.jsm',
     'tests/modules/PromiseTestUtils.jsm',
     'tests/xpcshell/TestIntegration.jsm',
 ]
 
 SPHINX_TREES['toolkit_modules'] = 'docs'
 
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 EXTRA_JS_MODULES += [
     'addons/MatchURLFilters.jsm',
     'addons/WebNavigation.jsm',
     'addons/WebNavigationContent.js',
     'addons/WebNavigationFrames.jsm',
     'addons/WebRequest.jsm',
     'addons/WebRequestCommon.jsm',
     'addons/WebRequestContent.js',
--- a/toolkit/modules/subprocess/moz.build
+++ b/toolkit/modules/subprocess/moz.build
@@ -25,11 +25,8 @@ else:
         'subprocess_shared_unix.js',
         'subprocess_unix.jsm',
         'subprocess_worker_unix.js',
     ]
 
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
 
 SPHINX_TREES['toolkit_modules/subprocess'] = ['docs']
-
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
--- a/toolkit/mozapps/extensions/moz.build
+++ b/toolkit/mozapps/extensions/moz.build
@@ -1,19 +1,16 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SPHINX_TREES['addon-manager'] = 'docs'
 
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 if CONFIG['MOZ_BUILD_APP'] == 'mobile/android':
     DEFINES['MOZ_FENNEC'] = True
 
 DIRS += ['internal']
 TEST_DIRS += ['test']
 
 XPIDL_SOURCES += [
     'amIAddonManager.idl',
--- a/tools/moz.build
+++ b/tools/moz.build
@@ -16,17 +16,16 @@ with Files("compare-locales/docs/**"):
 with Files("compare-locales/mach_commands.py"):
     BUG_COMPONENT = ("Localization Infrastructure and Tools", "compare-locales")
 
 with Files("coverity/**"):
     BUG_COMPONENT = ("Core", "Rewriting and Analysis")
 
 with Files("docs/**"):
     BUG_COMPONENT = ("Core", "Build Config")
-    SCHEDULES.exclusive = ['docs']
 
 with Files("lint/**"):
     BUG_COMPONENT = ("Testing", "Lint")
 
 with Files("mercurial/**"):
     BUG_COMPONENT = ("Core", "Build Config")
 
 with Files("profiler/**"):
@@ -43,25 +42,14 @@ with Files("rewriting/**"):
 
 with Files("tryselect/**"):
     BUG_COMPONENT = ("Testing", "General")
 
 with Files("update-packaging/**"):
     BUG_COMPONENT = ("Release Engineering", "Other")
 
 SPHINX_TREES['lint'] = 'lint/docs'
-
-with Files('lint/docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 SPHINX_TREES['compare-locales'] = 'compare-locales/docs'
-
-with Files('compare-locales/docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 SPHINX_TREES['try'] = 'tryselect/docs'
 
-with Files('tryselect/docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 CRAMTEST_MANIFESTS += [
     'tryselect/test/cram.ini',
 ]