So, another subject:
when I do a full build in parallel (win/pymake or using mach) and there
is some build error, it is always very hard to track the error down in
the log, it is almost always hidden among many other lines. I just hit
some compilation error caused by some recent patch in conjunction with
my build config and mach has just failed with a python trace back:
File "./mach", line 48, in <module>
mach.run(sys.argv[1:])
File "c:\Mozilla\src\mozilla-central\python/mach\mach\main.py", line
146, in run
self._run(argv)
File "c:\Mozilla\src\mozilla-central\python/mach\mach\main.py", line
202, in _run
fn(**stripped)
File "c:\Mozilla\src\mozilla-central\python/mach\mach\build.py", line
45, in build
log=False, print_directory=False)
File
"c:\Mozilla\src\mozilla-central\python/mozbuild\mozbuild\base.py", line
256, in _run_make
fn(**params)
File
"c:\Mozilla\src\mozilla-central\python/mozbuild\mozbuild\base.py", line
279, in _run_command_in_srcdir
self._run_command(cwd=self.topsrcdir, **args)
File
"c:\Mozilla\src\mozilla-central\python/mozbuild\mozbuild\base.py", line
338, in _run_command
raise Exception('Process executed with non-0 exit code: %s' % args)
Exception: Process executed with non-0 exit code:
[u'c:/Mozilla/mozilla-build/msys/bin/sh.exe', u'-c',
u'c:/Mozilla/src/mozilla-central/build/pymake/make.py
f client.mk -j8 -s']
There was no warning log as well. I was a bit hoping that mach would
help with this (tracking build error in parallel builds), but it
didn't. Would it possible to let mach track and show the actual error
in the log somehow to make it simpler to find?
Otherwise, thanks for this work!
-hb-
On 9/27/2012 3:12 AM, Gregory Szorc wrote:
The next time you pull mozilla-central, you'll find a new tool in the
root directory: mach
$ ./mach build
0.09 /usr/bin/make -f client.mk -j8 -s
0.25 Adding client.mk options from
/Users/gps/src/services-central/.mozconfig:
0.25 MOZ_OBJDIR=$(TOPSRCDIR)/objdir
0.25 MOZ_MAKE_FLAGS=-j9 -s
0.33 TEST-PASS | check-sync-dirs.py |
/Users/gps/src/services-central/js/src/build <=
/Users/gps/src/services-central/build
0.34 Generating /Users/gps/src/services-central/configure using autoconf
1.55 cd /Users/gps/src/services-central/objdir
1.55 /Users/gps/src/services-central/configure
1.57 Adding configure options from
/Users/gps/src/services-central/.mozconfig:
1.57 --enable-application=browser
1.57 --enable-optimize
1.70 loading cache ./config.cache
<snip>
> 335.19 309 compiler warnings present.
$ ./mach warnings-summary
> <snip>
10 -Wlogical-op-parentheses
10 -Wtautological-compare
13 -Wsometimes-uninitialized
26 -Wconversion
30 -Wunused-variable
34 -Wunused-function
34 -Wdeprecated-declarations
47 -Wtautological-constant-out-of-range-compare
67 -Wunused-private-field
309 Total
$ ./mach warnings-list
> <snip>
content/base/src/nsContentUtils.cpp:279:15 [-Wunused-private-field]
private field 'mKey' is not used
content/base/src/nsDocumentEncoder.cpp:2014:78
[-Wlogical-op-parentheses] '&&' within '||'
content/xbl/src/nsBindingManager.cpp:433:1
[-Wdelete-non-virtual-dtor] delete called on 'nsBindingManager' that
has virtual functions but non-virtual destructor
content/xbl/src/nsXBLProtoImpl.cpp:22:21 [-Wunused-private-field]
private field 'cx' is not used
content/xbl/src/nsXBLProtoImpl.cpp:23:13 [-Wunused-private-field]
private field 'versionBefore' is not used
<snip>
$ ./mach mochitest-browser browser/base/content/test/
> <expected mochitest output here>
(Yes, you can tab complete test paths in your shell instead of going
through some silly environment variable dance).
If you get lost:
$ ./mach help
(Try doing that with make!)
Read more about mach at [1].
I want to stress that mach is still in its infancy. It is currently
only a fraction of what I want it to be. However, mach today is
infinitely more than what it was yesterday: non-existent. That's
progress. If you have a feature request or a work flow, please file a
bug. Even better, contribute a patch! You only need to know beginner's
Python to add new commands to mach.
I hope you enjoy using mach. I look forward to many new and exciting
features in the near future.
[1] http://gregoryszorc.com/blog/2012/09/26/mach-has-landed/
Gregory
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform