MDN wants to learn about developers like you: https://qsurvey.mozilla.com/s3/MDN-dev-survey

Incremental builds with filesystem watching

This page covers the steps needed to incrementally update a bleeding-edge, development version of Firefox for Desktop using watchman to monitor filesystem changes and automatically generate the changed build outputs.  Welcome, we're delighted to see you! :)

If you're having trouble following this documentation or hit a roadblock you can't get around, please contact one of:

directly so we can solve the problem for you and every new contributor after you.  For additional information, see the general Firefox build documentation.

Incremental builds with filesystem watching

Firefox for Desktop supports a fast build build mode called artifact mode.  When you're using artifact mode, you can opt-in to an even faster incremental front-end build process.

Prerequisites

You must:

  • be using artifact builds
  • be building Firefox for Desktop
  • have built Firefox for Desktop successfully
  • have watchman installed

Installing pywatchman

Incremental front-end builds require the pywatchman wrapper around watchman to be installed.  mach watch

Most Desktop developers on Mac OS X or Linux should find that

./mach watch

just works, and incrementally rebuilds local JS, CSS and packaged (e.g. images and other asset) files.

Restrictions

Things that are supported

  • Modifying JavaScript, (X)HTML, and CSS resources; and string properties and DTD files.

Essentially everything updated by mach build faster should work with mach watch.

Things that are not supported

  • Modifying build system configuration and definitions.  Kill mach watch, run mach build faster to pick up the changes to the build system istelf, and restart mach watch.

Troubleshooting

Discussion is best started on the dev-builds mailing list.  Questions are best raised in #build on IRC.  Please file bugs in Core :: Build Config, blocking bug 1384241.

Document Tags and Contributors

 Contributors to this page: nalexander
 Last updated by: nalexander,