gecko/layout/tools
Gregory Szorc cb927ab20b Bug 808336 - Part 1: Refactor mach command handler management; r=jhammel
Previously we were tighly coupled with MozbuildObject. This was not in
the spirit of mach being a generic tool. Now, instead of passing multiple
arguments to __init__ of the class providing the mach command we either
pass 0 or 1. The number of arguments is detected when processing the
@CommandProvider decorator. The optional argument is a named tuple
containing mach run-time state.

Capturing of mach command provider information is now captured in a
class (as opposed to an anoymous tuple). We also capture these in a rich
data structure which is passed as part of the run-time data to the
command provider class. This allows mach commands to inspect the mach
environment.

Mach decorators have been moved to mach.decorators. mach.base is
reserved for generic mach data/container classes.

Existing mach command classes derived from MozbuildObject have been
replaced with either object or mozbuild.base.MachCommandBase. This
latter class translates the mach context instance passed to __init__
into the constructor arguments for MozbuildObject.__init__.

Support for registering function handlers with mach has been removed.
All handlers must be inside classes.

--HG--
rename : python/mach/mach/base.py => python/mach/mach/decorators.py
2012-11-06 16:57:41 -08:00
..
layout-debug Bug 799407: Enable FAIL_ON_WARNINGS in more of layout/ r=roc 2012-10-15 01:42:40 -04:00
reftest Bug 808336 - Part 1: Refactor mach command handler management; r=jhammel 2012-11-06 16:57:41 -08:00
tests Change in-tree users of Array.prototype.splice to not rely on non-standard behavior of deleting all elements from |k| onward for |arr.splice(k)|. r=jwalden 2011-09-22 15:43:11 -07:00