bug 1533831: remote: include remote agent in default build; r=firefox-build-system-reviewers,chmanchester
☠☠ backed out by 715ae7cfb2d1 ☠ ☠
authorAndreas Tolfsen <ato@sny.no>
Wed, 17 Apr 2019 16:41:38 +0000
changeset 528751 d32384388e3d28bafb8cc078d98994bb27953553
parent 528750 bd363475667fe35e455f496c0c727526d5bb9e9d
child 528752 94fd0790781ab6979840a602ddc987de5a7668f0
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, chmanchester
bugs1533831
milestone68.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 1533831: remote: include remote agent in default build; r=firefox-build-system-reviewers,chmanchester The previous commit disabled the remote agent by flipping the remote.enabled preference to false. That prevented the remote agent from initialising or being included in the --help message. This patch implies --enable-cdp in the default Firefox build on Firefox Nightly. Firefox for Android is not supported. This will cause builds to include the remote agent component that lives under remote/. Since the remote agent is disabled by default, users will first have to set the remote.enabled preference to true in order to use it. If you wish to explicitly opt out of including the remote agent when building Firefox, you may do so by using the --disable-cdp build flag in your mozconfig: ac_add_options --disable-cdp Differential Revision: https://phabricator.services.mozilla.com/D27540
remote/README
remote/doc/Building.md
toolkit/moz.configure
--- a/remote/README
+++ b/remote/README
@@ -7,17 +7,12 @@ simulate user interaction for automation
 JavaScript execution.
 
 This component provides an experimental and partial implementation
 of a remote devtools interface using the CDP protocol and transport
 layer.
 
 See https://firefox-source-docs.mozilla.org/remote/ for documentation.
 
-The remote agent is not by default included in Firefox builds.  To
-build it, put this in your mozconfig:
-
-	ac_add_options --enable-cdp
-
-This exposes a --remote-debugger flag you can use to start the
-remote agent:
+The remote agent is disabled by default, but can be enabled by
+setting a preference before running it:
 
 	% ./mach run --setpref "remote.enabled=true" --remote-debugger
--- a/remote/doc/Building.md
+++ b/remote/doc/Building.md
@@ -1,25 +1,49 @@
 Building
 ========
 
-The remote agent is by default not included in Firefox builds.
-To build it, put this in your [mozconfig]:
-
-	ac_add_options --enable-cdp
-
-This exposes a `--remote-debugger` flag you can use to start the
-remote agent:
+The remote agent is included in the default Firefox build, but
+disabled by default.  To expose the remote agent you can set the
+`remote.enabled` preference to true before running it:
 
 	% ./mach run --setpref="remote.enabled=true" --remote-debugger
 
-When you make changes to the XPCOM component you need to rebuild
+The source code is found under `$(topsrcdir)/remote`.
+
+Full build mode
+---------------
+
+The remote agent supports only Firefox, and is included when you
+build in the usual way:
+
+	% ./mach build
+
+When you make changes to XPCOM component files you need to rebuild
 in order for the changes to take effect.  The most efficient way to
 do this, provided you haven’t touched any compiled code (C++ or Rust):
 
 	% ./mach build faster
 
-Component files include the likes of RemoteAgent.js, RemoteAgent.manifest,
-moz.build files, prefs/remote.js, and jar.mn.  All the JS modules
-(files ending with `.jsm`) are symlinked into the build and can be
-changed without rebuilding.
+Component files include the likes of command-line-handler.js,
+RemoteAgent.manifest, moz.build files, prefs/remote.js, and jar.mn.
+All the JS modules (files ending with `.jsm`) are symlinked into
+the build and can be changed without rebuilding.
+
+You may also opt out of building the remote agent entirely by setting
+the `--disable-cdp` build flag in your [mozconfig]:
+
+	ac_add_options --disable-cdp
+
+
+Artifact mode
+-------------
+
+You may also use [artifact builds] when working on the remote agent.
+This fast build mode downloads pre-built components from the Mozilla
+build servers, rendering local compilation unnecessary.  To use
+them, place this in your [mozconfig]:
+
+	ac_add_options --enable-artifact-builds
+
 
 [mozconfig]: ../build/buildsystem/mozconfigs.html
+[artifact builds]: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Artifact_builds
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -914,19 +914,24 @@ add_old_configure_assignment('FT2_CFLAGS
 
 
 # Remote agent (part of CDP based remote protocol)
 # ==============================================================
 #
 # See https://firefox-source-docs.mozilla.org/remote/ for more.
 # The source code lives under ../remote.
 
-option('--enable-cdp', help='{Enable|Disable} remote agent')
+@depends(target, milestone)
+def remote_default(target, milestone):
+    return target.os != 'Android' and milestone.is_nightly
 
-@depends('--enable-cdp')
+option('--disable-cdp', default=remote_default,
+       help='{Enable|Disable} remote agent')
+
+@depends('--disable-cdp')
 def remote(value):
     if value:
         return True
 
 set_config('ENABLE_REMOTE_AGENT', remote)
 set_define('ENABLE_REMOTE_AGENT', remote)