Open Bug 1316170 Opened 9 years ago Updated 3 years ago

Add a placeholder mozconfig file to $topsrcdir

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: nalexander, Unassigned)

Details

I get a steady stream of people having difficulty following the instructions to make a valid mozconfig at https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_for_Android_build#Prepare_a_Firefox_for_Android_mozconfig. The reports are that the Gradle build step fails, which is by design: I throw an informative error message saying that it's only valid for a Firefox for Android config for exactly these situations. I think a big part of the problem is that it's hard to describe where the initial mozconfig should go. No newcomer knows about $topsrcdir, and even "root of source checkout" is fairly technical. How would people feel about adding an empty or placeholder mozconfig file to $topsrcdir? Then I can link to DXR or HG to show where it should go, and talk about *editing* an existing file rather than trying to specify where a file should go. We might need to special-case an empty file here. And I know gps was big on having "no mozconfig" do a sensible, platform specific default, which this might impact. I can think of alternatives, including a mach command to help with this, or having a mozconfig.template file in the $topsrcdir, but I'd like to open this for discussion.
gps: glandium: mhoye: thoughts? Technical barriers? Things I should do to that documentation to improve it? (mhoye, please edit that MDN page as you see fit, etc.)
Flags: needinfo?(mhoye)
Flags: needinfo?(mh+mozilla)
Flags: needinfo?(gps)
(In reply to Nick Alexander :nalexander (leave until January 2017) from comment #0) > I get a steady stream of people having difficulty following the instructions > to make a valid mozconfig at > https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/ > Build_Instructions/ > Simple_Firefox_for_Android_build#Prepare_a_Firefox_for_Android_mozconfig. > The reports are that the Gradle build step fails, which is by design: I > throw an informative error message saying that it's only valid for a Firefox > for Android config for exactly these situations. > > I think a big part of the problem is that it's hard to describe where the > initial mozconfig should go. No newcomer knows about $topsrcdir, and even > "root of source checkout" is fairly technical. How about "next to the `configure` file" or "next to the `mach` script"? > How would people feel about adding an empty or placeholder mozconfig file to > $topsrcdir? Then I can link to DXR or HG to show where it should go, and > talk about *editing* an existing file rather than trying to specify where a > file should go. That's a terrible idea. For one, you can be sure someone will end up committing their changes to that in-tree mozconfig. > I can think of alternatives, including a mach command to help with this, or > having a mozconfig.template file in the $topsrcdir, but I'd like to open > this for discussion. mach bootstrap already does something like that.
Flags: needinfo?(mh+mozilla)
I've always wanted the handoff between bootstrap and build to be as seamless as possible. The ideal end state is you can run the one-line bootstrapper and it kicks off a build when it is done. For the longest time, that was blocked on the bootstrapper not doing version control clones. That is in place now. So there is no good reason why the bootstrapper can't also install an appropriate mozconfig file for the build type you've selected in bootstrap. Alternatively, I would also like to consider an additional primitive for declaring "build profiles." e.g. your mozconfig file could contain "build_profile fennec-artifact" and this would automagically include e.g. a `build/mozconfig-profiles/fennec-artifact` file. This abstraction would allow us to provide well-defined and supported build profiles while giving us control to modify them without having to worry about e.g. a template-derived mozconfig file getting out of sync with the new recommended defaults.
Flags: needinfo?(gps)
Product: Core → Firefox Build System
Flags: needinfo?(mhoye)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.