|
@@ -2,7 +2,7 @@
|
|
|
# User Justin Wood <Callek@gmail.com>
|
|
|
# Date 1559053320 0
|
|
|
# Node ID 41e1409393169e979098e02645f3dfe190b19ef2
|
|
|
-# Parent 645d27b4c43ebe06bf66cb8fbaccab0d2458deae
|
|
|
+# Parent c863d15a29f92ea376ce8b7026e22fdb63f6c8ba
|
|
|
Bug 1542963 - run './mach lint ... --fix' on mozbuild/mozbuild, undoes some black changes. r=glandium
|
|
|
|
|
|
Lint python/mozbuild/{mozbuild,mozpack}.
|
|
@@ -1381,7 +1381,7 @@ diff --git a/python/mozbuild/mozbuild/artifacts.py b/python/mozbuild/mozbuild/ar
|
|
|
diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbuild/backend/common.py
|
|
|
--- a/python/mozbuild/mozbuild/backend/common.py
|
|
|
+++ b/python/mozbuild/mozbuild/backend/common.py
|
|
|
-@@ -49,16 +49,17 @@ from mozbuild.jar import (
|
|
|
+@@ -48,16 +48,17 @@ from mozbuild.jar import (
|
|
|
from mozbuild.preprocessor import Preprocessor
|
|
|
from mozpack.chrome.manifest import parse_manifest_line
|
|
|
|
|
@@ -1399,7 +1399,7 @@ diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbui
|
|
|
self.topobjdir = config.topobjdir
|
|
|
|
|
|
self.idls = {}
|
|
|
-@@ -99,16 +100,17 @@ class XPIDLManager(object):
|
|
|
+@@ -98,16 +99,17 @@ class XPIDLManager(object):
|
|
|
|
|
|
class BinariesCollection(object):
|
|
|
"""Tracks state of binaries produced by the build."""
|
|
@@ -1417,10 +1417,10 @@ diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbui
|
|
|
self._binaries = BinariesCollection()
|
|
|
self._configs = set()
|
|
|
self._generated_sources = set()
|
|
|
-@@ -170,17 +172,18 @@ class CommonBackend(BuildBackend):
|
|
|
- if obj.required_during_compile or obj.required_before_compile:
|
|
|
- for f in itertools.chain(obj.required_before_compile,
|
|
|
- obj.required_during_compile):
|
|
|
+@@ -168,17 +170,18 @@ class CommonBackend(BuildBackend):
|
|
|
+ elif isinstance(obj, GeneratedFile):
|
|
|
+ if obj.required_for_compile:
|
|
|
+ for f in obj.required_for_compile:
|
|
|
fullpath = ObjDirPath(obj._context, '!' + f).full_path
|
|
|
self._handle_generated_sources([fullpath])
|
|
|
return False
|
|
@@ -1437,7 +1437,7 @@ diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbui
|
|
|
# These are only handled by special purpose build backends,
|
|
|
# ignore them here.
|
|
|
return True
|
|
|
-@@ -190,17 +193,16 @@ class CommonBackend(BuildBackend):
|
|
|
+@@ -188,17 +191,16 @@ class CommonBackend(BuildBackend):
|
|
|
|
|
|
return True
|
|
|
|
|
@@ -1455,7 +1455,7 @@ diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbui
|
|
|
with self._write_file(mozpath.join(topobjdir, 'binaries.json')) as fh:
|
|
|
d = {
|
|
|
'shared_libraries': [s.to_dict() for s in self._binaries.shared_libraries],
|
|
|
-@@ -310,17 +312,18 @@ class CommonBackend(BuildBackend):
|
|
|
+@@ -308,17 +310,18 @@ class CommonBackend(BuildBackend):
|
|
|
|
|
|
mkdir(objdir)
|
|
|
with self._write_file(list_file_path) as fh:
|
|
@@ -1475,7 +1475,7 @@ diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbui
|
|
|
all_inputs = set(webidls.all_static_sources())
|
|
|
for s in webidls.all_non_static_basenames():
|
|
|
all_inputs.add(mozpath.join(bindings_dir, s))
|
|
|
-@@ -374,17 +377,17 @@ class CommonBackend(BuildBackend):
|
|
|
+@@ -372,17 +375,17 @@ class CommonBackend(BuildBackend):
|
|
|
'so it cannot be built in unified mode."\n'
|
|
|
'#undef PL_ARENA_CONST_ALIGN_MASK\n'
|
|
|
'#endif\n'
|
|
@@ -2091,7 +2091,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
if not isinstance(obj, ContextDerived):
|
|
|
return False
|
|
|
|
|
|
-@@ -604,29 +605,29 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -600,29 +601,29 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
backend_file.write('EXTRA_MDDEPEND_FILES += %s\n' % dep_file)
|
|
|
|
|
|
backend_file.write("""{stub}: {script}{inputs}{backend}{force}
|
|
@@ -2134,7 +2134,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
elif isinstance(obj, RustProgram):
|
|
|
self._process_rust_program(obj, backend_file)
|
|
|
# Hook the program into the compile graph.
|
|
|
-@@ -776,29 +777,29 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -772,29 +773,29 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
|
|
|
root_deps_mk = Makefile()
|
|
|
|
|
@@ -2167,7 +2167,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
# - nodes that have no dependencies of their own. Technically, this is
|
|
|
# not necessary, because other things have dependencies on them, and
|
|
|
# they all end up rooting to nodes from the above category. But the
|
|
|
-@@ -890,18 +891,18 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -886,18 +887,18 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
makefile.add_statement(explanation)
|
|
|
|
|
|
all_sources = ' '.join(source for source, _ in unified_source_mapping)
|
|
@@ -2188,7 +2188,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
|
|
|
def _check_blacklisted_variables(self, makefile_in, makefile_content):
|
|
|
if b'EXTERNALLY_MANAGED_MAKE_FILE' in makefile_content:
|
|
|
-@@ -937,58 +938,58 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -933,58 +934,58 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
makefile_in = mozpath.join(srcdir, 'Makefile.in')
|
|
|
makefile = mozpath.join(objdir, 'Makefile')
|
|
|
|
|
@@ -2252,7 +2252,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
self._fill_root_mk()
|
|
|
|
|
|
# Make the master test manifest files.
|
|
|
-@@ -1058,17 +1059,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -1054,17 +1055,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
|
|
|
def relativize(base, dirs):
|
|
|
return (mozpath.relpath(d.translated, base) for d in dirs)
|
|
@@ -2271,7 +2271,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
def _process_defines(self, obj, backend_file, which='DEFINES'):
|
|
|
"""Output the DEFINES rules to the given backend file."""
|
|
|
defines = list(obj.get_defines())
|
|
|
-@@ -1082,17 +1083,18 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -1078,17 +1079,18 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
# much as possible here to avoid breaking things.
|
|
|
if obj.xpiname:
|
|
|
backend_file.write('XPI_NAME = %s\n' % (obj.xpiname))
|
|
@@ -2291,7 +2291,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
build_files = self._install_manifests['xpidl']
|
|
|
|
|
|
for p in ('Makefile', 'backend.mk', '.deps/.mkdir.done'):
|
|
|
-@@ -1101,17 +1103,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -1097,17 +1099,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
for idl in manager.idls.values():
|
|
|
self._install_manifests['dist_idl'].add_link(idl['source'],
|
|
|
idl['basename'])
|
|
@@ -2310,7 +2310,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
|
|
|
mk = Makefile()
|
|
|
|
|
|
-@@ -1162,19 +1164,19 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -1158,19 +1160,19 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
|
|
|
# Create dependency for output header so we force regeneration if the
|
|
|
# header was deleted. This ideally should not be necessary. However,
|
|
@@ -2332,7 +2332,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
interfaces_manifests = ' '.join(interfaces_manifests),
|
|
|
xpidl_rules=rules.getvalue(),
|
|
|
xpidl_modules=' '.join(xpt_modules),
|
|
|
-@@ -1244,45 +1246,45 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -1240,45 +1242,45 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
self._install_manifests['_tests'].add_optional_exists(
|
|
|
mozpath.join(obj.install_target[len('_tests') + 1:],
|
|
|
dest_basename))
|
|
@@ -2381,7 +2381,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
if isinstance(obj.manifest, ReftestManifest):
|
|
|
# Mark included files as part of the build backend so changes
|
|
|
# result in re-config.
|
|
|
-@@ -1303,17 +1305,18 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -1299,17 +1301,18 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
if quoted_path != path:
|
|
|
path = quoted_path[0] + d + quoted_path[1:]
|
|
|
else:
|
|
@@ -2401,7 +2401,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
|
|
|
def _process_non_default_target(self, libdef, target_name, backend_file):
|
|
|
backend_file.write("%s:: %s\n" % (libdef.output_category, target_name))
|
|
|
-@@ -1364,17 +1367,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -1362,17 +1365,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
def _process_host_shared_library(self, libdef, backend_file):
|
|
|
backend_file.write('HOST_SHARED_LIBRARY = %s\n' % libdef.lib_name)
|
|
|
|
|
@@ -2420,7 +2420,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
|
|
|
topobjdir = mozpath.normsep(obj.topobjdir)
|
|
|
# This will create the node even if there aren't any linked libraries.
|
|
|
-@@ -1419,17 +1422,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -1417,17 +1420,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
pgo_objs_ref = ' \\\n '.join(os.path.relpath(o, obj.objdir)
|
|
|
for o in profile_gen_objs)
|
|
|
# Don't bother with a list file if we're only linking objects built
|
|
@@ -2439,7 +2439,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
write_obj_deps(obj_target, objs_ref, pgo_objs_ref)
|
|
|
elif not isinstance(obj, (HostLibrary, StaticLibrary)):
|
|
|
list_file_path = '%s.list' % obj.name.replace('.', '_')
|
|
|
-@@ -1657,17 +1660,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -1652,17 +1655,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
]
|
|
|
rule.add_commands(['$(call py_action,buildlist,%s)' % ' '.join(args)])
|
|
|
fragment.dump(backend_file.fh, removal_guard=False)
|
|
@@ -2458,7 +2458,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
def _write_master_test_manifest(self, path, manifests):
|
|
|
with self._write_file(path) as master:
|
|
|
master.write(
|
|
|
-@@ -1694,17 +1697,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -1689,17 +1692,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
When the stub argument is True, no source file is used, and a stub
|
|
|
makefile with the default header and footer only is created.
|
|
|
'''
|
|
@@ -2477,7 +2477,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
pp.handleLine(b'VPATH := @srcdir@\n')
|
|
|
pp.handleLine(b'relativesrcdir := @relativesrcdir@\n')
|
|
|
pp.handleLine(b'include $(DEPTH)/config/@autoconfmk@\n')
|
|
|
-@@ -1738,37 +1741,37 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -1733,37 +1736,37 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
for source in sorted_nonstatic_ipdl_sources:
|
|
|
basename = os.path.basename(source)
|
|
|
sorted_nonstatic_ipdl_basenames.append(basename)
|
|
@@ -2519,7 +2519,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
# We pass WebIDL info to make via a completely generated make file.
|
|
|
mk = Makefile()
|
|
|
mk.add_statement('nonstatic_webidl_files := %s' % ' '.join(
|
|
|
-@@ -1789,18 +1792,18 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -1784,18 +1787,18 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
rule = mk.create_rule([basename])
|
|
|
rule.add_dependencies([source, '$(GLOBAL_DEPS)'])
|
|
|
rule.add_commands([
|
|
@@ -3075,7 +3075,7 @@ diff --git a/python/mozbuild/mozbuild/base.py b/python/mozbuild/mozbuild/base.py
|
|
|
strings.
|
|
|
srcdir -- If True, invoke make from the source directory tree.
|
|
|
Otherwise, make will be invoked from the object directory.
|
|
|
-@@ -783,21 +788,21 @@ class MozbuildObject(ProcessExecutionMix
|
|
|
+@@ -785,21 +790,21 @@ class MozbuildObject(ProcessExecutionMix
|
|
|
result, xcode_lisense_error_tmp = validate_make(make)
|
|
|
if result:
|
|
|
return [make]
|
|
@@ -3099,7 +3099,7 @@ diff --git a/python/mozbuild/mozbuild/base.py b/python/mozbuild/mozbuild/base.py
|
|
|
|
|
|
def _run_command_in_objdir(self, **args):
|
|
|
return self.run_process(cwd=self.topobjdir, **args)
|
|
|
-@@ -812,32 +817,32 @@ class MozbuildObject(ProcessExecutionMix
|
|
|
+@@ -814,32 +819,32 @@ class MozbuildObject(ProcessExecutionMix
|
|
|
"""Create a new MozbuildObject-derived class instance from ourselves.
|
|
|
|
|
|
This is used as a convenience method to create other
|
|
@@ -3135,7 +3135,7 @@ diff --git a/python/mozbuild/mozbuild/base.py b/python/mozbuild/mozbuild/base.py
|
|
|
raise Exception('Pipfile not found: %s.' % pipfile)
|
|
|
self.ensure_pipenv()
|
|
|
self.virtualenv_manager.activate_pipenv(pipfile, populate, python)
|
|
|
-@@ -853,59 +858,59 @@ class MachCommandBase(MozbuildObject):
|
|
|
+@@ -855,59 +860,59 @@ class MachCommandBase(MozbuildObject):
|
|
|
def __init__(self, context):
|
|
|
# Attempt to discover topobjdir through environment detection, as it is
|
|
|
# more reliable than mozconfig when cwd is inside an objdir.
|
|
@@ -4682,7 +4682,7 @@ diff --git a/python/mozbuild/mozbuild/dotproperties.py b/python/mozbuild/mozbuil
|
|
|
diff --git a/python/mozbuild/mozbuild/faster_daemon.py b/python/mozbuild/mozbuild/faster_daemon.py
|
|
|
--- a/python/mozbuild/mozbuild/faster_daemon.py
|
|
|
+++ b/python/mozbuild/mozbuild/faster_daemon.py
|
|
|
-@@ -102,18 +102,18 @@ class Daemon(object):
|
|
|
+@@ -103,18 +103,18 @@ class Daemon(object):
|
|
|
'allof',
|
|
|
['type', 'f'],
|
|
|
['not',
|
|
@@ -6388,7 +6388,7 @@ diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuil
|
|
|
# when we don't have a compile environment. The required
|
|
|
# config keys won't be available, but the instance variables
|
|
|
# that we don't set should never be accessed by the actual
|
|
|
-@@ -865,18 +870,18 @@ class TestManifest(ContextDerived):
|
|
|
+@@ -878,18 +883,18 @@ class TestManifest(ContextDerived):
|
|
|
'source_relpaths',
|
|
|
|
|
|
# If this manifest is a duplicate of another one, this is the
|
|
@@ -6409,7 +6409,7 @@ diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuil
|
|
|
self.directory = mozpath.dirname(path)
|
|
|
self.manifest = manifest
|
|
|
self.flavor = flavor
|
|
|
-@@ -1009,17 +1014,17 @@ class UnifiedSources(BaseSources):
|
|
|
+@@ -1022,17 +1027,17 @@ class UnifiedSources(BaseSources):
|
|
|
# On Windows, path names have a maximum length of 255 characters,
|
|
|
# so avoid creating extremely long path names.
|
|
|
unified_prefix = context.relsrcdir
|
|
@@ -6428,7 +6428,7 @@ diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuil
|
|
|
|
|
|
class InstallationTarget(ContextDerived):
|
|
|
"""Describes the rules that affect where files get installed to."""
|
|
|
-@@ -1073,16 +1078,17 @@ class FinalTargetPreprocessedFiles(Conte
|
|
|
+@@ -1086,16 +1091,17 @@ class FinalTargetPreprocessedFiles(Conte
|
|
|
FINAL_TARGET_PP_FILES.
|
|
|
"""
|
|
|
__slots__ = ('files')
|
|
@@ -8509,7 +8509,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
'gkrust-gtest': 'toolkit/library/gtest/rust',
|
|
|
'js': 'js/rust',
|
|
|
'mozjs_sys': 'js/src',
|
|
|
-@@ -325,40 +325,42 @@ class CargoProvider(MachCommandBase):
|
|
|
+@@ -324,40 +324,42 @@ class CargoProvider(MachCommandBase):
|
|
|
ret = self._run_make(srcdir=False, directory=root,
|
|
|
ensure_exit_code=0, silent=True,
|
|
|
print_directory=False, target=check_targets)
|
|
@@ -8557,7 +8557,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
Sometimes it is necessary to clean up these files in order to make
|
|
|
things work again. This command can be used to perform that cleanup.
|
|
|
|
|
|
-@@ -382,20 +384,20 @@ class Clobber(MachCommandBase):
|
|
|
+@@ -381,20 +383,20 @@ class Clobber(MachCommandBase):
|
|
|
|
|
|
ret = 0
|
|
|
if 'objdir' in what:
|
|
@@ -8581,7 +8581,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
cmd = ['hg', 'purge', '--all', '-I', 'glob:**.py[cdo]',
|
|
|
'-I', 'path:python/', '-I', 'path:third_party/python/']
|
|
|
elif conditions.is_git(self):
|
|
|
-@@ -411,26 +413,27 @@ class Clobber(MachCommandBase):
|
|
|
+@@ -410,26 +412,27 @@ class Clobber(MachCommandBase):
|
|
|
|
|
|
@property
|
|
|
def substs(self):
|
|
@@ -8612,7 +8612,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
if os.isatty(sys.stdout.fileno()):
|
|
|
env = dict(os.environ)
|
|
|
if 'LESS' not in env:
|
|
|
-@@ -492,52 +495,52 @@ class Warnings(MachCommandBase):
|
|
|
+@@ -491,52 +494,52 @@ class Warnings(MachCommandBase):
|
|
|
database = WarningsDatabase()
|
|
|
|
|
|
if os.path.exists(path):
|
|
@@ -8675,7 +8675,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
topsrcdir = mozpath.normpath(self.topsrcdir)
|
|
|
|
|
|
if directory:
|
|
|
-@@ -559,53 +562,52 @@ class Warnings(MachCommandBase):
|
|
|
+@@ -558,53 +561,52 @@ class Warnings(MachCommandBase):
|
|
|
if directory and not filename.startswith(directory):
|
|
|
continue
|
|
|
|
|
@@ -8742,7 +8742,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
config = self.config_environment
|
|
|
except Exception:
|
|
|
print("Please run |./mach build| before |./mach gtest|.")
|
|
|
-@@ -623,17 +625,17 @@ class GTestCommands(MachCommandBase):
|
|
|
+@@ -622,17 +624,17 @@ class GTestCommands(MachCommandBase):
|
|
|
print("Could not build xul-gtest")
|
|
|
return res
|
|
|
|
|
@@ -8761,7 +8761,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
|
|
|
if not os.path.isdir(cwd):
|
|
|
os.makedirs(cwd)
|
|
|
-@@ -665,30 +667,32 @@ class GTestCommands(MachCommandBase):
|
|
|
+@@ -664,30 +666,32 @@ class GTestCommands(MachCommandBase):
|
|
|
return self.run_process(args=args,
|
|
|
append_env=gtest_env,
|
|
|
cwd=cwd,
|
|
@@ -8798,7 +8798,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
if status:
|
|
|
exit_code = status
|
|
|
|
|
|
-@@ -732,20 +736,21 @@ class GTestCommands(MachCommandBase):
|
|
|
+@@ -731,20 +735,21 @@ class GTestCommands(MachCommandBase):
|
|
|
print("The --debugger_args you passed require a real shell to parse them.")
|
|
|
print("(We can't handle the %r character.)" % e.char)
|
|
|
return 1
|
|
@@ -8821,7 +8821,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
def on_line(line):
|
|
|
elements = [s.strip() for s in line.split('=', 1)]
|
|
|
|
|
|
-@@ -790,105 +795,106 @@ class ClangCommands(MachCommandBase):
|
|
|
+@@ -789,105 +794,106 @@ class ClangCommands(MachCommandBase):
|
|
|
print('-I%s/ipc/ipdl/_ipdlheaders' % self.topobjdir)
|
|
|
|
|
|
|
|
@@ -8956,7 +8956,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
return 1
|
|
|
from mozrunner.devices.android_device import verify_android_device, run_firefox_for_android
|
|
|
if not (debug or debugger or debugger_args):
|
|
|
-@@ -899,33 +905,33 @@ class RunProgram(MachCommandBase):
|
|
|
+@@ -898,33 +904,33 @@ class RunProgram(MachCommandBase):
|
|
|
|
|
|
else:
|
|
|
from mozprofile import Profile, Preferences
|
|
@@ -8993,7 +8993,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
if params:
|
|
|
args.extend(params)
|
|
|
|
|
|
-@@ -1019,31 +1025,33 @@ class RunProgram(MachCommandBase):
|
|
|
+@@ -1018,31 +1024,33 @@ class RunProgram(MachCommandBase):
|
|
|
dmd_params.append('--show-dump-stats=yes')
|
|
|
|
|
|
if dmd_params:
|
|
@@ -9030,7 +9030,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
'DEPTH': ('@DEPTH@',),
|
|
|
'topsrcdir': ('@top_srcdir@',),
|
|
|
'srcdir': ('@srcdir@',),
|
|
|
-@@ -1073,40 +1081,41 @@ class Makefiles(MachCommandBase):
|
|
|
+@@ -1072,40 +1080,41 @@ class Makefiles(MachCommandBase):
|
|
|
return False
|
|
|
|
|
|
return True
|
|
@@ -9078,7 +9078,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
# and the content hasn't changed.
|
|
|
from mozbuild.util import FileAvoidWrite
|
|
|
with FileAvoidWrite(output) as out:
|
|
|
-@@ -1161,16 +1170,17 @@ class MachDebug(MachCommandBase):
|
|
|
+@@ -1160,16 +1169,17 @@ class MachDebug(MachCommandBase):
|
|
|
print('\t%s: %s' % (k, config.substs[k]), file=out)
|
|
|
|
|
|
print('config defines:', file=out)
|
|
@@ -9096,7 +9096,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
'topobjdir': obj.topobjdir,
|
|
|
'mozconfig': obj.mozconfig,
|
|
|
}
|
|
|
-@@ -1192,33 +1202,33 @@ class ArtifactSubCommand(SubCommand):
|
|
|
+@@ -1191,33 +1201,33 @@ class ArtifactSubCommand(SubCommand):
|
|
|
'linux',
|
|
|
'linux64',
|
|
|
'macosx64',
|
|
@@ -9134,7 +9134,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
artifacts from Mozilla automation, replacing whatever may be in your
|
|
|
object directory. Use |mach artifact last| to see what binary artifacts
|
|
|
were last used.
|
|
|
-@@ -1243,69 +1253,69 @@ class PackageFrontend(MachCommandBase):
|
|
|
+@@ -1242,69 +1252,69 @@ class PackageFrontend(MachCommandBase):
|
|
|
from mozbuild.artifacts import Artifacts
|
|
|
artifacts = Artifacts(tree, self.substs, self.defines, job,
|
|
|
log=self.log, cache_dir=cache_dir,
|
|
@@ -9229,7 +9229,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
open_manifest,
|
|
|
unpack_file,
|
|
|
)
|
|
|
-@@ -1389,17 +1399,17 @@ class PackageFrontend(MachCommandBase):
|
|
|
+@@ -1388,17 +1398,17 @@ class PackageFrontend(MachCommandBase):
|
|
|
except Exception:
|
|
|
pass
|
|
|
for algorithm, digest in (data.get('artifacts', {})
|
|
@@ -9248,7 +9248,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
records = OrderedDict()
|
|
|
downloaded = []
|
|
|
|
|
|
-@@ -1569,16 +1579,17 @@ class PackageFrontend(MachCommandBase):
|
|
|
+@@ -1568,16 +1578,17 @@ class PackageFrontend(MachCommandBase):
|
|
|
|
|
|
if artifacts:
|
|
|
ensureParentDir(artifact_manifest)
|
|
@@ -9266,7 +9266,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
help='Print verbose output.'),
|
|
|
]
|
|
|
for arg in args:
|
|
|
-@@ -1727,17 +1738,18 @@ class StaticAnalysis(MachCommandBase):
|
|
|
+@@ -1726,17 +1737,18 @@ class StaticAnalysis(MachCommandBase):
|
|
|
self._clang_tidy_config = self._get_clang_tidy_config()
|
|
|
args = self._get_clang_tidy_command(
|
|
|
checks=checks, header_filter=header_filter, sources=source, jobs=jobs, fix=fix)
|
|
@@ -9286,7 +9286,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
# Write output file
|
|
|
if output is not None:
|
|
|
output_manager.write(output, format)
|
|
|
-@@ -1897,17 +1909,17 @@ class StaticAnalysis(MachCommandBase):
|
|
|
+@@ -1896,17 +1908,17 @@ class StaticAnalysis(MachCommandBase):
|
|
|
'-checks=%s' % checks,
|
|
|
'-extra-arg=-DMOZ_CLANG_PLUGIN']
|
|
|
|
|
@@ -9305,7 +9305,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
if cfg:
|
|
|
common_args += ['-config=%s' % yaml.dump(cfg)]
|
|
|
|
|
|
-@@ -2018,17 +2030,18 @@ class StaticAnalysis(MachCommandBase):
|
|
|
+@@ -2017,17 +2029,18 @@ class StaticAnalysis(MachCommandBase):
|
|
|
# 1. Checker attribute 'publish' is False.
|
|
|
not_published = not bool(item.get('publish', True))
|
|
|
# 2. Checker has restricted-platforms and current platform is not of them.
|
|
@@ -9325,7 +9325,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
checkers_test_batch.append(item['name'])
|
|
|
futures.append(executor.submit(self._verify_checker, item))
|
|
|
|
|
|
-@@ -2332,17 +2345,17 @@ class StaticAnalysis(MachCommandBase):
|
|
|
+@@ -2331,17 +2344,17 @@ class StaticAnalysis(MachCommandBase):
|
|
|
checks = '-*'
|
|
|
try:
|
|
|
config = self._clang_tidy_config
|
|
@@ -9344,7 +9344,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
config_list = []
|
|
|
checker_config = {}
|
|
|
try:
|
|
|
-@@ -2356,17 +2369,17 @@ class StaticAnalysis(MachCommandBase):
|
|
|
+@@ -2355,17 +2368,17 @@ class StaticAnalysis(MachCommandBase):
|
|
|
# 2. Option -> that will become CheckerName.Option
|
|
|
if not checker_option['key'].startswith(checker['name']):
|
|
|
checker_option['key'] = "{}.{}".format(
|
|
@@ -9363,7 +9363,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
ran_configure = False
|
|
|
config = None
|
|
|
builder = Build(self._mach_context)
|
|
|
-@@ -2802,48 +2815,48 @@ class Vendor(MachCommandBase):
|
|
|
+@@ -2801,48 +2814,48 @@ class Vendor(MachCommandBase):
|
|
|
description='Vendor third-party dependencies into the source repository.')
|
|
|
def vendor(self):
|
|
|
self.parser.print_usage()
|
|
@@ -9424,7 +9424,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
@SubCommand('vendor', 'python',
|
|
|
description='Vendor Python packages from pypi.org into third_party/python')
|
|
|
@CommandArgument('--with-windows-wheel', action='store_true',
|
|
|
-@@ -2862,31 +2875,32 @@ class Vendor(MachCommandBase):
|
|
|
+@@ -2861,31 +2874,32 @@ class Vendor(MachCommandBase):
|
|
|
help='Manifest files to work on')
|
|
|
@CommandArgumentGroup('verify')
|
|
|
@CommandArgument('--verify', '-v', action='store_true', group='verify',
|
|
@@ -9464,7 +9464,7 @@ diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuil
|
|
|
if debug or debugger or debugger_args:
|
|
|
args = self.prepend_debugger_args(args, debugger, debugger_args)
|
|
|
|
|
|
-@@ -2924,69 +2938,69 @@ class Repackage(MachCommandBase):
|
|
|
+@@ -2923,69 +2937,69 @@ class Repackage(MachCommandBase):
|
|
|
@Command('repackage', category='misc',
|
|
|
description='Repackage artifacts into different formats.')
|
|
|
def repackage(self):
|
|
@@ -10714,7 +10714,7 @@ diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/pytho
|
|
|
def test_generated_files(self):
|
|
|
"""Ensure GENERATED_FILES is handled properly."""
|
|
|
env = self._consume('generated-files', RecursiveMakeBackend)
|
|
|
-@@ -559,17 +561,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
+@@ -562,17 +564,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
|
|
|
def test_exports_generated(self):
|
|
|
"""Ensure EXPORTS that are listed in GENERATED_FILES
|
|
@@ -10733,7 +10733,7 @@ diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/pytho
|
|
|
self.assertIn('bar.h', m)
|
|
|
self.assertIn('mozilla/mozilla2.h', m)
|
|
|
self.assertIn('mozilla/dom/dom2.h', m)
|
|
|
-@@ -597,17 +599,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
+@@ -600,17 +602,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
self.assertEqual(lines, expected)
|
|
|
|
|
|
def test_resources(self):
|
|
@@ -10752,7 +10752,7 @@ diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/pytho
|
|
|
self.assertIn('res/bar.res.in', m)
|
|
|
self.assertIn('res/tests/test.manifest', m)
|
|
|
self.assertIn('res/tests/extra.manifest', m)
|
|
|
-@@ -629,17 +631,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
+@@ -632,17 +634,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
'[include:dir1/xpcshell.ini]',
|
|
|
'[include:xpcshell.ini]',
|
|
|
])
|
|
@@ -10771,7 +10771,7 @@ diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/pytho
|
|
|
self.assertIn('support/**', entries[0])
|
|
|
|
|
|
def test_test_manifest_deffered_installs_written(self):
|
|
|
-@@ -682,17 +684,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
+@@ -685,17 +687,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
self.assertEqual(info, m._dests[item])
|
|
|
|
|
|
def test_xpidl_generation(self):
|
|
@@ -10790,7 +10790,7 @@ diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/pytho
|
|
|
self.assertIn('bar.idl', m)
|
|
|
self.assertIn('foo.idl', m)
|
|
|
|
|
|
-@@ -709,17 +711,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
+@@ -712,17 +714,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
p = mozpath.join(env.topobjdir, 'config/makefiles/xpidl')
|
|
|
self.assertTrue(os.path.isdir(p))
|
|
|
|
|
@@ -10809,7 +10809,7 @@ diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/pytho
|
|
|
|
|
|
def test_old_install_manifest_deleted(self):
|
|
|
# Simulate an install manifest from a previous backend version. Ensure
|
|
|
-@@ -771,17 +773,18 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
+@@ -774,17 +776,18 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
|
|
|
manifest_path = mozpath.join(env.topobjdir, 'ipdlsrcs.mk')
|
|
|
lines = [l.strip() for l in open(manifest_path, 'rt').readlines()]
|
|
@@ -10829,7 +10829,7 @@ diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/pytho
|
|
|
'CPPSRCS',
|
|
|
'IPDLDIRS'))]
|
|
|
self.assertEqual(found, expected)
|
|
|
-@@ -948,18 +951,18 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
+@@ -951,18 +954,18 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
]
|
|
|
expected[mozpath.join(env.topobjdir, 'final-target')] = [
|
|
|
'FINAL_TARGET = $(DEPTH)/random-final-target'
|
|
@@ -10850,7 +10850,7 @@ diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/pytho
|
|
|
|
|
|
backend_path = mozpath.join(env.topobjdir, 'backend.mk')
|
|
|
lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
|
|
|
-@@ -1148,17 +1151,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
+@@ -1151,17 +1154,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
|
|
|
lines = [line.rstrip() for line in lines]
|
|
|
|
|
@@ -15130,7 +15130,7 @@ diff --git a/python/mozbuild/mozbuild/vendor_rust.py b/python/mozbuild/mozbuild/
|
|
|
# Default if this tree isn't configured.
|
|
|
import which
|
|
|
return which.which('cargo')
|
|
|
-@@ -57,17 +58,18 @@ class VendorRust(MozbuildObject):
|
|
|
+@@ -56,17 +57,18 @@ class VendorRust(MozbuildObject):
|
|
|
|
|
|
def check_modified_files(self):
|
|
|
'''
|
|
@@ -15150,7 +15150,7 @@ diff --git a/python/mozbuild/mozbuild/vendor_rust.py b/python/mozbuild/mozbuild/
|
|
|
|
|
|
Please commit or stash these changes before vendoring, or re-run with `--ignore-modified`.
|
|
|
'''.format(files='\n'.join(sorted(modified))))
|
|
|
-@@ -231,25 +233,25 @@ Please commit or stash these changes bef
|
|
|
+@@ -228,25 +230,25 @@ Please commit or stash these changes bef
|
|
|
|
|
|
def verify_acceptable_license(package, license):
|
|
|
self.log(logging.DEBUG, 'package_license', {},
|
|
@@ -15178,7 +15178,7 @@ diff --git a/python/mozbuild/mozbuild/vendor_rust.py b/python/mozbuild/mozbuild/
|
|
|
'''.format(package, license))
|
|
|
return False
|
|
|
|
|
|
-@@ -259,18 +261,20 @@ Please commit or stash these changes bef
|
|
|
+@@ -256,18 +258,20 @@ Please commit or stash these changes bef
|
|
|
|
|
|
toml_file = os.path.join(vendor_dir, package, 'Cargo.toml')
|
|
|
|
|
@@ -15201,7 +15201,7 @@ diff --git a/python/mozbuild/mozbuild/vendor_rust.py b/python/mozbuild/mozbuild/
|
|
|
'package {} does not provide a license'.format(package))
|
|
|
return False
|
|
|
|
|
|
-@@ -296,33 +300,35 @@ Please commit or stash these changes bef
|
|
|
+@@ -293,33 +297,35 @@ Please commit or stash these changes bef
|
|
|
'''Package {} has an unreviewed license file: {}.
|
|
|
|
|
|
Please request review on the provided license; if approved, the package can be added
|
|
@@ -15239,7 +15239,7 @@ diff --git a/python/mozbuild/mozbuild/vendor_rust.py b/python/mozbuild/mozbuild/
|
|
|
self.log_manager.enable_unstructured()
|
|
|
if not ignore_modified:
|
|
|
self.check_modified_files()
|
|
|
-@@ -333,17 +339,18 @@ license file's hash.
|
|
|
+@@ -330,17 +336,18 @@ license file's hash.
|
|
|
|
|
|
relative_vendor_dir = 'third_party/rust'
|
|
|
vendor_dir = mozpath.join(self.topsrcdir, relative_vendor_dir)
|