Open Bug 1883086 Opened 7 months ago Updated 2 days ago

Consider adding a Mach Install Command for different Android Apps

Categories

(Fenix :: Tooling, enhancement)

All
Android
enhancement

Tracking

(Not tracked)

People

(Reporter: olivia, Assigned: adhingra, NeedInfo)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [avocado sprint])

Attachments

(2 files)

It is possible to install GeckoView Example on a device using ./mach install (when configured for Android).

It would be a nice feature to do the same for all of the other builds we offer.

For example:

  • mach install geckoview-example
  • mach install reference-browser
  • mach install fenix
  • mach install focus

When building Firefox for desktop, the expectation is that mach build and mach run will build and start the application. Currently when building mobile/android, mach build and mach run build and start GeckoView.
I think building and running Fenix by default might be more useful.

The typical way to select which application is built is to add an ac_add_options --enable-project= line in the mozconfig file. This is documented at https://searchfox.org/mozilla-central/source/docs/setup/configuring_build_options.rst#151
I think adding for example ac_add_options --enable-project=mobile/android/focus to the mozconfig file should make it so that mach build and mach run (re)build and start Focus.

Duplicate of this bug: 1826801

Discussed with :Sylvestre, :glandium, and :florian. If mach build generates Fenix from the ground up, we would be able to get a performance profile for free. This means, we would be able to understand where the time is spent and then optimize it. This would benefit local development workflow as well as CI jobs. Given the fact the CI turn around time was a concern a few weeks before the migration, I think this would be worth considering in the foreseeable future. How does that sound to you, :jmahon?

Flags: needinfo?(jmahon)

Speaking of build performance, bug 1887646 highlighted a recent regression when mach building Geckoview example.

See Also: → 1887646

That seems practical. :gl, can you help figure out where this fits into our priorities, and if possible, find someone to assign it to?

Flags: needinfo?(jmahon) → needinfo?(gl)
See Also: → 1891539

Something like ./mach run --app=fenix should also be considered. (Likely connected to the same command as ./mach install, just to be parallel with Desktop.)

To clarify comment 1: the build system doesn't have the notion of building multiple applications. So the solution, from a build system perspective, as noted in that comment, would be to build only one application, and allow selecting which one specifically you want to build in the first place, rather than gradle somehow allowing to build them all, creating a situation that the build system can't handle.

Duplicate of this bug: 1899506
Assignee: nobody → adhingra

A few notes from call with :nalexander:

  • Start with adding parameters in mach build, mach run, mach install commands
  • Consider a “default sub-project” setting that is in moz.configure. Default it to geckoview, but accept fenix, focus.
  • Try to work on gradle layer rather than using ac_add_options --enable-project= in mozconfig
Whiteboard: [avocado sprint]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: