Closed Bug 1476263 Opened Last year Closed Last year

Elaborate help text on mozconfig

Categories

(Firefox Build System :: Bootstrap Configuration, enhancement, P1)

enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: ato, Assigned: ato)

Details

Attachments

(1 file, 3 obsolete files)

One of the most frequent questions I get when mentoring new
contributors is “where is the mozconfig file?”  By pointing out
during the bootstrapping process that that the user should create
the file if it doesn’t exist we can—I hope—address a lot of new
contributor frustration.
Assignee: nobody → ato
Status: NEW → ASSIGNED
Priority: -- → P1
A frequent question when mentoring new contributors is what "your
mozconfig file" is.  By suggesting to create the file if it does
not exist, we can hopefully alleviate some new contributor frustration.

This change does unfortunately not take into account that the
mozconfig file can be named .mozconfig or even be in a designated
location defined by the MOZCONFIG environment variable, but it
seems reasonable to assume that developers who already know about
those alternatives will know which file to edit, and that what we
should optimise for during the bootstrapping process is to get new
contributors up and running quickly.

MozReview-Commit-ID: 6JUU6hHMheI
Attachment #8992617 - Flags: review?(gps)
Comment on attachment 8992617 [details] [diff] [review]
Suggest to create mozconfig if it does not exist. r?gps

Review of attachment 8992617 [details] [diff] [review]:
-----------------------------------------------------------------

This is strictly better, so r+.

An even better version would be to add quotes around the "mozconfig" file name to clarify it is a path/filename. We could also emit the full path since it is resolvable from this code. We could also link to https://firefox-source-docs.mozilla.org/build/buildsystem/mozconfigs.html. Although the content at that URL is not great. It does have the mozconfig resolution rules documented there though.
Attachment #8992617 - Flags: review?(gps) → review+
A frequent question when mentoring new contributors is what "your
mozconfig file" is.  By suggesting to create the file if it does
not exist, we can hopefully alleviate some new contributor frustration.
A frequent question when mentoring new contributors is what "your
mozconfig file" is.  By suggesting to create the file if it does
not exist, we can hopefully alleviate some new contributor frustration.
Attachment #8992617 - Attachment is obsolete: true
Attachment #8993930 - Attachment is obsolete: true
Comment on attachment 8993931 [details] [diff] [review]
Suggest to create mozconfig if it does not exist. r=gps

I’ve updated the patch to suggest the location of the mozconfig.
Since I have limited experience workingo n code under /python, let
me know if this isn’t the right way of doing it.

This could be further improved by making the templates themselves
more specific.  For example we know if the mozconfig file exists
or not, so suggesting to “create it if it does not exist” is strictly
not necessary.
Attachment #8993931 - Flags: review?(gps)
Component: Mach Core → Bootstrap Configuration
Comment on attachment 8993931 [details] [diff] [review]
Suggest to create mozconfig if it does not exist. r=gps

Review of attachment 8993931 [details] [diff] [review]:
-----------------------------------------------------------------

Unfortunately the feature creep introduced a new bug that makes this unlandable :(

I would just propose $topsrcdir/mozconfig as the mozconfig location.

::: python/mozboot/mozboot/base.py
@@ +13,5 @@
>  
>  from distutils.version import LooseVersion
>  from mozboot import rust
> +from mozbuild.base import MozbuildObject
> +from mozbuild.mozconfig import MozconfigLoader

Sadly, we cannot import these modules from mozboot. That's because mozboot has to run in "standalone" mode where a full source checkout isn't available. mozboot can only depend on the Python standard library and files in the mozboot directory.
Attachment #8993931 - Flags: review?(gps) → review-
A frequent question when mentoring new contributors is what "your
mozconfig file" is.  By suggesting to create the file if it does
not exist, we can hopefully alleviate some new contributor frustration.

This change does unfortunately not take into account that the
mozconfig file can be named .mozconfig or even be in a designated
location defined by the MOZCONFIG environment variable, but it
seems reasonable to assume that developers who already know about
those alternatives will know which file to edit, and that what we
should optimise for during the bootstrapping process is to get new
contributors up and running quickly.
Attachment #8994487 - Flags: review?(gps)
Attachment #8993931 - Attachment is obsolete: true
Attachment #8994487 - Flags: review?(gps) → review+
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/953910565893
Suggest to create mozconfig if it does not exist. r=gps
https://hg.mozilla.org/mozilla-central/rev/953910565893
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.