Closed Bug 799648 Opened 12 years ago Closed 12 years ago

Move MozbuildObject functionality into mach mixins


(Firefox Build System :: Mach Core, enhancement)

Not set


(Not tracked)



(Reporter: gps, Assigned: gps)


(Blocks 1 open bug)



(4 files)

A consequence of mach's birth as an alternative front-end to mozilla-central's build system has left it tightly coupled with mozbuild, the Python package containing mozilla-central's build system Python code.

This coupling isn't desired and is constraining the usefulness of mach to other projects, like B2G.

I'll be dropping a bunch of patches that reshape mach into a standalone piece of software. Most of these patches are simply lifting code from one package to another. So, the review burden shouldn't be too high.
This patch moves logging and process execution functionality from mozbuild into mach.

In the new world, useful mach features are exposed as mixin classes. These are classes which simply provide useful methods but aren't important for class hierarchy. If someone is interested in e.g. launching a process, they inherit from the ProcessExecutionMixin.

This patch breaks some random mach commands in the tree which rely on _run_command(), which has been renamed to run_process(). These will all be updated in a subsequent patch which mass fixes all the breakage as part of the porting.
Attachment #669704 - Flags: review?(jhammel)
Comment on attachment 669704 [details] [diff] [review]
Part 1: Move logging and process execution into mixin classes, v1

This is fine for now.  I would like to get a lot of this to mozlog and then use that
Attachment #669704 - Flags: review?(jhammel) → review+
Move the core log management code into mach.

This file can eventually be uplifted to mozlog with little effort. Let's wait until mach stabilizes first, however.
Attachment #669743 - Flags: review?(jhammel)
Moving the config module into mach. Pretty straightforward.

This actually breaks gettext integration. I have a solution for that in the next patch...
Attachment #669748 - Flags: review?(jhammel)
This is a temporary patch to disable config file integration with mach.

The main reason for this is config files currently don't do anything. The only setting is the number of threads to pass to make. And, since no make targets that any mach commands currently execute need this, it is worthless and just leads to confusion.

The secondary (and arguably as important) reason is that settings integration is not very well thought out. It needs some core improvements to integrate better with command providers and with a yet-to-be-refactored MozbuildObject. Stay tuned.
Attachment #669754 - Flags: review?(jhammel)
Attachment #669743 - Flags: review?(jhammel) → review+
Attachment #669748 - Flags: review?(jhammel) → review+
Attachment #669754 - Flags: review?(jhammel) → review+
Blocks: 800527
Blocks: 800633
Product: Core → Firefox Build System
Depends on: 774135
Blocks: 774135
No longer depends on: 774135
You need to log in before you can comment on or make changes to this bug.