Consider adding a Mach Install Command for different Android Apps
Categories
(Fenix :: Tooling, enhancement)
Tracking
(firefox132 fixed)
Tracking | Status | |
---|---|---|
firefox132 | --- | fixed |
People
(Reporter: olivia, Assigned: adhingra, NeedInfo)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [avocado sprint])
Attachments
(1 file, 1 obsolete file)
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
Comment 1•9 months ago
|
||
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.
Updated•9 months ago
|
Comment 3•8 months ago
|
||
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?
Comment 4•8 months ago
|
||
Speaking of build performance, bug 1887646 highlighted a recent regression when mach build
ing Geckoview example.
Comment 5•8 months ago
|
||
That seems practical. :gl, can you help figure out where this fits into our priorities, and if possible, find someone to assign it to?
Reporter | ||
Comment 6•8 months ago
|
||
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.)
Comment 7•8 months ago
|
||
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.
Assignee | ||
Comment 9•4 months ago
|
||
Assignee | ||
Updated•4 months ago
|
Assignee | ||
Comment 10•4 months ago
|
||
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 togeckoview
, but acceptfenix
,focus
. - Try to work on gradle layer rather than using
ac_add_options --enable-project=
in mozconfig
Assignee | ||
Comment 11•4 months ago
|
||
Comment 12•2 months ago
|
||
Updated•2 months ago
|
Comment 13•2 months ago
|
||
bugherder |
Comment 14•2 months ago
|
||
Aaditya, was there a reason why for eg. Fenix we have to use --app=fenix
? When you want to install the TestRunner or GeckoView example the full package name is needed. So it feels a bit strange that this is not needed for Fenix and causes failures running the command. Thanks.
Assignee | ||
Comment 15•2 months ago
|
||
Hey, it was more for simplicity, you could still run --app=org.mozilla.fenix.debug
and it will give the same result! --app=fenix
is just an alias of sort. Can you please share what failures are you getting ?
Comment 16•2 months ago
|
||
(In reply to Aaditya Dhingra [:adhingra] from comment #15)
Hey, it was more for simplicity, you could still run
--app=org.mozilla.fenix.debug
and it will give the same result!--app=fenix
is just an alias of sort. Can you please share what failures are you getting ?
So I've several questions. Based on that I'm on an artifact opt build the following happens:
- I expected that when using
--app=org.mozilla.fenix
it installs the build from the current obj dir but it fails - Using
--app=org.mozilla.fenix_release
works but installs the debug build (fenix-fenix-arm64-v8a-debug.apk)? - Using
--app=fenix
installs the debug build as well. - Should we create shortcuts for the other types as well?
- Can we have a documentation update that instructs how to install the different package types?
I'm happy to file one or more new bugs depending on the above questions.
Assignee | ||
Comment 17•2 months ago
•
|
||
I expected that when using --app=org.mozilla.fenix it installs the build from the current obj dir but it fails
I apologize, I don't understand what you mean here. From your other questions, I am assuming you are able to install a debug build, is that right ? If yes what/when is it failing ? Do you have any stacktrace you can share or a command that I can try running ?
Currently, we only added debug build option for fenix and focus in this patch. We are also working to add release build for fenix (and poosiby focus) in 1891159. The plan was to add documentation/make an announcement once release build patch also lands.
The new commands added in this patch are:
./mach install --app=fenix
./mach install --app=focus
./mach run --app=fenix
./mach run --app=focus
1891159 will add commands like:
./mach install --app=org.mozilla.fenix.release
./mach run --app=org.mozilla.fenix.release
From my understanding, the default/fallback option would always be the debug build, meaning if app name is not specified exactly as org.mozilla.fenix.release
but contains fenix
it will install default build
Please feel free to create more bugs and cc me, in case we are missing anything!
Comment 18•1 month ago
|
||
(In reply to Aaditya Dhingra [:adhingra] from comment #17)
Please feel free to create more bugs and cc me, in case we are missing anything!
Sorry for the delay here. I just filed bug 1927837 and I think that the issues above are actually covered by this.
Description
•