зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1858776 - Remove "build tasks" tracking. r=firefox-build-system-reviewers,sergesanspaille
It was added in bug 1646794 and is now redundant with what was done more generally in bug 1850647, although bug 1850647 doesn't keep track of all arguments, but we've never made use of that information. Differential Revision: https://phabricator.services.mozilla.com/D190854
This commit is contained in:
Родитель
85cf19c25d
Коммит
7eeae1609b
|
@ -126,7 +126,7 @@ class ProcessExecutionMixin(LoggingMixin):
|
|||
except LineHandlingEarlyReturn:
|
||||
return
|
||||
|
||||
if line.startswith("BUILDTASK") or not log_name:
|
||||
if not log_name:
|
||||
return
|
||||
|
||||
self.log(log_level, log_name, {"line": line.rstrip()}, "{line}")
|
||||
|
|
|
@ -11,7 +11,6 @@ import io
|
|||
import os
|
||||
import sys
|
||||
|
||||
from mozbuild.action.util import log_build_task
|
||||
from mozbuild.util import ensureParentDir, lock_file
|
||||
|
||||
|
||||
|
@ -46,4 +45,4 @@ def main(args):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(log_build_task(main, sys.argv[1:]))
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
|
|
|
@ -12,7 +12,6 @@ import buildconfig
|
|||
from mozpack.executables import ELF, UNKNOWN, get_type
|
||||
from packaging.version import Version
|
||||
|
||||
from mozbuild.action.util import log_build_task
|
||||
from mozbuild.util import memoize
|
||||
|
||||
STDCXX_MAX_VERSION = Version("3.4.19")
|
||||
|
@ -325,4 +324,4 @@ def main(args):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(log_build_task(main, sys.argv[1:]))
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
|
|
|
@ -15,7 +15,6 @@ import traceback
|
|||
import buildconfig
|
||||
import six
|
||||
|
||||
from mozbuild.action.util import log_build_task
|
||||
from mozbuild.makeutil import Makefile
|
||||
from mozbuild.pythonutil import iter_modules_in_path
|
||||
from mozbuild.util import FileAvoidWrite
|
||||
|
@ -152,4 +151,4 @@ def main(argv):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(log_build_task(main, sys.argv[1:]))
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
import sys
|
||||
|
||||
import mozbuild.jar
|
||||
from mozbuild.action.util import log_build_task
|
||||
|
||||
|
||||
def main(args):
|
||||
|
@ -13,4 +12,4 @@ def main(args):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(log_build_task(main, sys.argv[1:]))
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
import sys
|
||||
|
||||
from mozbuild.action.util import log_build_task
|
||||
from mozbuild.preprocessor import Preprocessor
|
||||
|
||||
|
||||
|
@ -21,4 +20,4 @@ def main(args):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
log_build_task(main, sys.argv[1:])
|
||||
main(sys.argv[1:])
|
||||
|
|
|
@ -12,7 +12,6 @@ from mozpack.errors import errors
|
|||
from mozpack.files import BaseFile, FileFinder
|
||||
from mozpack.manifests import InstallManifest
|
||||
|
||||
from mozbuild.action.util import log_build_task
|
||||
from mozbuild.util import DefinesAction
|
||||
|
||||
COMPLETE = (
|
||||
|
@ -121,4 +120,4 @@ def main(argv):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
log_build_task(main, sys.argv[1:])
|
||||
main(sys.argv[1:])
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
# 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/.
|
||||
|
||||
import json
|
||||
import sys
|
||||
import time
|
||||
|
||||
|
||||
def log_build_task(f, *args, **kwargs):
|
||||
"""Run the given function, representing an entire build task, and log the
|
||||
BUILDTASK metadata row to stdout.
|
||||
"""
|
||||
start = time.monotonic()
|
||||
try:
|
||||
return f(*args, **kwargs)
|
||||
finally:
|
||||
end = time.monotonic()
|
||||
print(
|
||||
"BUILDTASK %s"
|
||||
% json.dumps(
|
||||
{"argv": sys.argv, "start": start, "end": end, "context": None}
|
||||
)
|
||||
)
|
|
@ -6,8 +6,6 @@ import sys
|
|||
|
||||
from mozwebidlcodegen import create_build_system_manager
|
||||
|
||||
from mozbuild.action.util import log_build_task
|
||||
|
||||
|
||||
def main(argv):
|
||||
"""Perform WebIDL code generation required by the build system."""
|
||||
|
@ -16,4 +14,4 @@ def main(argv):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(log_build_task(main, sys.argv[1:]))
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
|
|
|
@ -20,7 +20,6 @@ from xpidl.rust import print_rust_bindings
|
|||
from xpidl.rust_macros import print_rust_macros_bindings
|
||||
from xpidl.xpidl import IDLParser
|
||||
|
||||
from mozbuild.action.util import log_build_task
|
||||
from mozbuild.makeutil import Makefile
|
||||
from mozbuild.pythonutil import iter_modules_in_path
|
||||
from mozbuild.util import FileAvoidWrite
|
||||
|
@ -150,4 +149,4 @@ def main(argv):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
log_build_task(main, sys.argv[1:])
|
||||
main(sys.argv[1:])
|
||||
|
|
|
@ -14,8 +14,6 @@ from mozpack.errors import errors
|
|||
from mozpack.files import FileFinder
|
||||
from mozpack.path import match
|
||||
|
||||
from mozbuild.action.util import log_build_task
|
||||
|
||||
|
||||
def main(args):
|
||||
parser = argparse.ArgumentParser()
|
||||
|
@ -49,4 +47,4 @@ def main(args):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
log_build_task(main, sys.argv[1:])
|
||||
main(sys.argv[1:])
|
||||
|
|
|
@ -220,7 +220,6 @@ class BuildMonitor(MozbuildObject):
|
|||
self.instance_warnings.insert(warning.copy())
|
||||
|
||||
self._warnings_collector = WarningsCollector(on_warning, objdir=self.topobjdir)
|
||||
self._build_tasks = []
|
||||
|
||||
self.build_objects = []
|
||||
self.build_dirs = set()
|
||||
|
@ -294,16 +293,6 @@ class BuildMonitor(MozbuildObject):
|
|||
raise Exception("Unknown build status: %s" % action)
|
||||
|
||||
return BuildOutputResult(None, update_needed, message)
|
||||
elif plain_line.startswith("BUILDTASK"):
|
||||
_, data = plain_line.split(maxsplit=1)
|
||||
# Check that we can parse the JSON. Skip this line if we can't;
|
||||
# we'll be missing data, but that's not a huge deal.
|
||||
try:
|
||||
json.loads(data)
|
||||
self._build_tasks.append(data)
|
||||
except json.decoder.JSONDecodeError:
|
||||
pass
|
||||
return BuildOutputResult(None, False, None)
|
||||
|
||||
warning = None
|
||||
|
||||
|
@ -331,18 +320,6 @@ class BuildMonitor(MozbuildObject):
|
|||
self.warnings_database.prune()
|
||||
self.warnings_database.save_to_file(self._warnings_path)
|
||||
|
||||
if "MOZ_AUTOMATION" not in os.environ:
|
||||
build_tasks_path = self._get_state_filename("build_tasks.json")
|
||||
with io.open(build_tasks_path, "w", encoding="utf-8", newline="\n") as fh:
|
||||
fh.write("[")
|
||||
first = True
|
||||
for task in self._build_tasks:
|
||||
# We've already verified all of these are valid JSON, so we
|
||||
# can write the data out to the file directly.
|
||||
fh.write("%s\n %s" % ("," if not first else "", task))
|
||||
first = False
|
||||
fh.write("\n]\n")
|
||||
|
||||
# Record usage.
|
||||
if not record_usage:
|
||||
return
|
||||
|
|
Загрузка…
Ссылка в новой задаче