Bug 1384396 - Detect Watchman in configure; r=nalexander
authorGregory Szorc <gps@mozilla.com>
Tue, 25 Jul 2017 22:04:53 -0700
changeset 371495 3db186a5de7dbcf9d762b1dbcc54e9a5f8d7e057
parent 371494 abd5c5d03d1cc14b92d1cf2e9a8bce3b3b5dd2f0
child 371496 6504499c1689d9199c355e07164b849f9144ca2f
push id32249
push usercbook@mozilla.com
push dateFri, 28 Jul 2017 13:23:04 +0000
treeherdermozilla-central@09a412e3cc3b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1384396
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1384396 - Detect Watchman in configure; r=nalexander It is an optional build dependency. While we detect the version, we don't do any minimum version checking because nothing uses it... yet. MozReview-Commit-ID: 1tPo9AnD4fV
moz.configure
--- a/moz.configure
+++ b/moz.configure
@@ -360,16 +360,29 @@ check_prog('GMAKE', possible_makes)
 def tup_progs(build_backends):
     for backend in build_backends:
         if 'Tup' in backend:
             return ['tup']
     return None
 
 tup = check_prog('TUP', tup_progs)
 
+# watchman detection
+# ==============================================================
+
+watchman = check_prog('WATCHMAN', ('watchman',), allow_missing=True)
+
+@depends_if(watchman)
+@checking('for watchman version')
+@imports('json')
+def watchman_version(watchman):
+    out = check_cmd_output(watchman, 'version')
+    res = json.loads(out)
+    return Version(res['version'])
+
 # Miscellaneous programs
 # ==============================================================
 check_prog('DOXYGEN', ('doxygen',), allow_missing=True)
 check_prog('XARGS', ('xargs',))
 
 @depends(target)
 def extra_programs(target):
     if target.kernel == 'Darwin':