Closed Bug 910453 Opened 11 years ago Closed 11 years ago

Annotate processed moz.build files with tier info

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla27

People

(Reporter: gps, Assigned: glandium)

References

Details

Attachments

(2 files, 1 obsolete file)

I will explain this better in the description for the soon-to-be-attached patch.
This patch annotates the processed moz.build sandboxes with tier
metadata. The goal of this patch is to eventually enable the make-based
backend to easily generate a make file that incurs submakes for every
directory. i.e. instead of performing recursive traversal, we'll just
list each directory as a flat list and have make evaluate each one using
whatever concurrency it is capable of. This will likely be done
differently for export, libs, tools, etc. But that's followup bug
territory.

Since we may add additional metadata later, I decided to make the
metadata a dict rather than hardcode a "tier" argument/annotation
everywhere.
Attachment #796895 - Flags: review?(mh+mozilla)
Assignee: nobody → gps
While I was here, I figured we should write out the full list of tier
directories in the root backend.mk file. Next step is to modify
/Makefile.in and the tier traversal rules to leverage this data to build
non-recursively.
Attachment #796906 - Flags: review?(mh+mozilla)
(In reply to Gregory Szorc [:gps] from comment #1)
> This patch annotates the processed moz.build sandboxes with tier
> metadata. The goal of this patch is to eventually enable the make-based
> backend to easily generate a make file that incurs submakes for every
> directory. i.e. instead of performing recursive traversal, we'll just
> list each directory as a flat list and have make evaluate each one using
> whatever concurrency it is capable of.

I'm close to a patch doing that already, but i didn't need that tier info.
Comment on attachment 796895 [details] [diff] [review]
Annotate read moz.build files with tier info

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

::: python/mozbuild/mozbuild/frontend/reader.py
@@ +642,5 @@
>          # It's very tempting to use a set here. Unfortunately, the recursive
>          # make backend needs order preserved. Once we autogenerate all backend
>          # files, we should be able to convert this to a set.
> +        recurse_info = []
> +        dirs = set()

Just use an OrderedDict for recurse_info, and don't keep a separate dirs list, which will be recurse_info.keys().
Attachment #796895 - Flags: review?(mh+mozilla) → feedback+
Since i was going to add stuff on top of this, i needed it updated, so this is your patch with my review comment applied. Just getting it through you in case you have something to add.
Attachment #804814 - Flags: review?(gps)
Attachment #796895 - Attachment is obsolete: true
Assignee: gps → mh+mozilla
Status: NEW → ASSIGNED
Attachment #804814 - Flags: review?(gps) → review+
Comment on attachment 796906 [details] [diff] [review]
Part 2: Write tier directory info into make backend

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

I'm not convinced this tier summary is any useful outside the recursive make backend. That is, it doesn't seem to me something the emitter should be emitting.
Attachment #796906 - Flags: review?(mh+mozilla)
Blocks: 917086
https://hg.mozilla.org/mozilla-central/rev/fdaa11265464
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: