Closed
Bug 1427840
Opened 7 years ago
Closed 7 years ago
Add documentation for GN support
Categories
(Firefox Build System :: General, enhancement)
Firefox Build System
General
Tracking
(firefox59 fixed)
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: chmanchester, Assigned: chmanchester)
References
Details
Attachments
(1 file)
No description provided.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•7 years ago
|
||
I couldn't get the docs to build locally for some reason, but the output can be verified from this try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=84efba54b610136a6a4485685ee55e38a2da8aad
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8939727 [details]
Bug 1427840 - Add in-tree docs for GN support in the build system.
https://reviewboard.mozilla.org/r/210040/#review216696
::: build/docs/gn.rst:13
(Diff revision 1)
> +some related projects that are vendored in mozilla-central. Rather than
> +requiring ``GN`` to build or writing our own build definitions for these projects,
> +we have support in the build system for translating GN configuration
> +files into moz.build files. In most cases these moz.build files will be like any
> +others in the tree (except that they shouldn't be modified by hand), however
> +those updating vendored code or building on platforms not exercised in
maybe s/exercised/supported/
::: build/docs/gn.rst:39
(Diff revision 1)
> +
> +If updating upstream sources or vendoring a new project, this step must be
> +performed for each supported build configuration. If adding support for a
> +specific configuration, the generated configuration may be added to existing
> +configs before re-generating the ``moz.build`` files, which should be found under
> +the ``gn-configs`` directory under the project's top-level directory.
This might confuse people, we should make it explicit that this is the top level directory of the vendored project.
Are we ok with checking in the generated json files? I had broken them out of my patch and was considering hosting them on a hg.mozilla.org user repo. This is this definitely less convienent and makes matching the version of the json files used to generate a particular set of moz.build files more error prone, but there were concerns about the size of the files.
Attachment #8939727 -
Flags: review?(dminor) → review+
Comment 4•7 years ago
|
||
Leaving a needinfo to check whether or not I should commit the generated json files in tree.
Flags: needinfo?(cmanchester)
Assignee | ||
Comment 5•7 years ago
|
||
Bloat in the tree is certainly a concern, but I think it's far preferable to have them checked in. What's the total size of the json files?
Flags: needinfo?(cmanchester) → needinfo?(dminor)
Comment 6•7 years ago
|
||
Average size for a generated json file is: 364140, total size for the current set is: 5826239.
I don't anticipate the files changing very often and I agree it would be better to have them checked in.
We could potentially post-process the generated json to remove things like compiler flags that will be ignored during moz.build generation anyway if size is a concern.
Flags: needinfo?(dminor)
Assignee | ||
Comment 7•7 years ago
|
||
That sounds pretty big but on the order of other third party imports we routinely perform. If it becomes a problem we can move them or find ways to slim them down, as you suggest.
Comment 8•7 years ago
|
||
Since we'll wind up updating these every time we update from upstream webrtc, it would be nice to make sure we're generating the JSON files in a reproducible way so that diffs will be minimal.
Comment hidden (mozreview-request) |
Comment 10•7 years ago
|
||
Pushed by cmanchester@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7e82384aac78
Add in-tree docs for GN support in the build system. r=dminor
Comment 11•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Comment 12•7 years ago
|
||
The gn page is working here: https://firefox-source-docs.mozilla.org/build/buildsystem/gn.html but seems to be missing from the index page here: https://firefox-source-docs.mozilla.org/build/buildsystem/index.html. Sorry if I missed a bad link during review. Or maybe I'm getting a stale or cached version of that page.
Flags: needinfo?(cmanchester)
Assignee | ||
Comment 13•7 years ago
|
||
It's altogether possible I got this wrong somewhere, but I see the link when I visit that page: https://screenshots.firefox.com/DNmxC1OVxbbUwYMq/firefox-source-docs.mozilla.org
Flags: needinfo?(cmanchester)
Comment 14•7 years ago
|
||
Yep, works for me now too. I guess I got a stale version of the page this morning. Thanks!
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•