Upgrading to MozillaBuild 4.0 breaks clang-format extension until bootstrap runs
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
People
(Reporter: bthrall, Unassigned)
Details
After upgrading MozillaBuild to 4.0, I was unable to successfully follow the steps for upgrading at https://wiki.mozilla.org/MozillaBuild#To_Upgrade_From_A_Previous_Version
After upgrading, I tried to run mach clobber, but got the following error:
$ ./mach clobber
** Unknown exception encountered with possibly-broken third-party extension "clang-format" (version N/A)
** which supports versions 5.3 of Mercurial.
** Please disable "clang-format" and try your action again.
** If that fixes the bug please report it to https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox%20Build%20System&component=Lint%20and%20Formatting
** Python 3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)]
** Mercurial Distributed SCM (version 6.1+hg7.3c9bf1787bfd)
** Extensions loaded: absorb, blackbox, clang-format, evolve 10.4.1, firefoxtree, fsmonitor, histedit, js-format, push-to-try, rebase, show
<stack trace removed>
TypeError: unhashable type: 'set'
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\mozilla-build\python3\lib\threading.py", line 973, in _bootstrap_inner
self.run()
File "C:\mozilla-build\python3\lib\threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "C:\mozilla-source\mozilla-unified2\python\mach\mach\sentry.py", line 211, in _is_unmodified_mach_core
files = set(repo.get_outgoing_files()) | set(repo.get_changed_files())
File "c:\mozilla-source\mozilla-unified2\python\mozversioncontrol\mozversioncontrol\__init__.py", line 435, in get_outgoing_files
return self._run(
File "c:\mozilla-source\mozilla-unified2\python\mozversioncontrol\mozversioncontrol\__init__.py", line 343, in _run
return super(HgRepository, self)._run(*args, **runargs)
File "c:\mozilla-source\mozilla-unified2\python\mozversioncontrol\mozversioncontrol\__init__.py", line 101, in _run
return subprocess.check_output(
File "C:\mozilla-build\python3\lib\subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\mozilla-build\python3\lib\subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('C:\\mozilla-build\\python3\\Scripts\\hg.EXE', 'log', '-r', 'draft() and ancestors(.)', '--template', "{file_adds % '{file}\\n'}{file_dels % '{file}\\n'}{file_mods % '{file}\\n'}")' returned non-zero exit status 1.
Likewise, mach bootstrap produced similar messages repeatedly and was unusable because I couldn't see the interactive prompts before they scrolled out of view.
The cause of the problem was my version of clang-format leftover from my previous MozillaBuild version (in $HOME/.mozbuild\version-control-tools\hgext\clang-format) didn't support the new version of Mercurial.
Commenting out the extensions.clang-format line from mercurial.ini resolved the error and I was able to successfully run mach clobber and mach bootstrap. After mach bootstrap, the clang-format extension is working correctly.
Comment 1•3 years ago
|
||
A simpler workaround is to run ./mach vcs-setup, ignoring the warning output that appears. See this original comment describing the workaround.
Description
•